Re: [PATCH v2 1/3] bpf: Add bpf_verify_pkcs7_signature() helper

From: kernel test robot
Date: Wed Jun 08 2022 - 11:06:22 EST


Hi Roberto,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on bpf-next/master]
[also build test WARNING on bpf/master]
[cannot apply to horms-ipvs/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url: https://github.com/intel-lab-lkp/linux/commits/Roberto-Sassu/bpf-Add-bpf_verify_pkcs7_signature-helper/20220608-192110
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20220608/202206082219.09oAvCwe-lkp@xxxxxxxxx/config)
compiler: powerpc-linux-gcc (GCC) 11.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/223914a2278b692d4120315d2fc7a29e3b89512a
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Roberto-Sassu/bpf-Add-bpf_verify_pkcs7_signature-helper/20220608-192110
git checkout 223914a2278b692d4120315d2fc7a29e3b89512a
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash kernel/bpf/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

kernel/bpf/bpf_lsm.c: In function '____bpf_verify_pkcs7_signature':
>> kernel/bpf/bpf_lsm.c:146:38: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
146 | (struct key *)keyring,
| ^


vim +146 kernel/bpf/bpf_lsm.c

135
136 BPF_CALL_5(bpf_verify_pkcs7_signature, u8 *, data, u32, datalen, u8 *, sig,
137 u32, siglen, u64, keyring)
138 {
139 int ret = -EOPNOTSUPP;
140
141 #ifdef CONFIG_SYSTEM_DATA_VERIFICATION
142 if (keyring > (unsigned long)VERIFY_USE_PLATFORM_KEYRING)
143 return -EINVAL;
144
145 ret = verify_pkcs7_signature(data, datalen, sig, siglen,
> 146 (struct key *)keyring,
147 VERIFYING_UNSPECIFIED_SIGNATURE, NULL,
148 NULL);
149 #endif
150 return ret;
151 }
152

--
0-DAY CI Kernel Test Service
https://01.org/lkp