[xlnx:xlnx_rebase_v5.4 1005/1697] crypto/af_alg.c:267:54: sparse: sparse: incorrect type in argument 2 (different address spaces)
kernel test robot
lkp at intel.com
Wed Jan 13 01:04:59 EST 2021
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.4
head: 629150468791671b5fde21363e643e87c5815b17
commit: 7132d44df68f906bc3d12d6b1437d208f91c88e5 [1005/1697] crypto: Adds user space interface for ALG_SET_KEY_TYPE
config: alpha-randconfig-s031-20210113 (attached as .config)
compiler: alpha-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-208-g46a52ca4-dirty
# https://github.com/Xilinx/linux-xlnx/commit/7132d44df68f906bc3d12d6b1437d208f91c88e5
git remote add xlnx https://github.com/Xilinx/linux-xlnx
git fetch --no-tags xlnx xlnx_rebase_v5.4
git checkout 7132d44df68f906bc3d12d6b1437d208f91c88e5
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=alpha
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>
"sparse warnings: (new ones prefixed by >>)"
>> crypto/af_alg.c:267:54: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected unsigned char const [usertype] *keytype @@ got char [noderef] <asn:1> *optval @@
crypto/af_alg.c:267:54: sparse: expected unsigned char const [usertype] *keytype
crypto/af_alg.c:267:54: sparse: got char [noderef] <asn:1> *optval
vim +267 crypto/af_alg.c
227
228 static int alg_setsockopt(struct socket *sock, int level, int optname,
229 char __user *optval, unsigned int optlen)
230 {
231 struct sock *sk = sock->sk;
232 struct alg_sock *ask = alg_sk(sk);
233 const struct af_alg_type *type;
234 int err = -EBUSY;
235
236 lock_sock(sk);
237 if (ask->refcnt)
238 goto unlock;
239
240 type = ask->type;
241
242 err = -ENOPROTOOPT;
243 if (level != SOL_ALG || !type)
244 goto unlock;
245
246 switch (optname) {
247 case ALG_SET_KEY:
248 if (sock->state == SS_CONNECTED)
249 goto unlock;
250 if (!type->setkey)
251 goto unlock;
252
253 err = alg_setkey(sk, optval, optlen);
254 break;
255 case ALG_SET_AEAD_AUTHSIZE:
256 if (sock->state == SS_CONNECTED)
257 goto unlock;
258 if (!type->setauthsize)
259 goto unlock;
260 err = type->setauthsize(ask->private, optlen);
261 break;
262 case ALG_SET_KEY_TYPE:
263 if (sock->state == SS_CONNECTED)
264 goto unlock;
265 if (!type->setkeytype)
266 goto unlock;
> 267 err = type->setkeytype(ask->private, optval, optlen);
268 }
269
270 unlock:
271 release_sock(sk);
272
273 return err;
274 }
275
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 24915 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20210113/3acda0df/attachment-0001.gz>
More information about the linux-arm-kernel
mailing list