tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: c6d7e3b385f19869ab96e9404c92ff1abc34f2c8 commit: 20adc3e8f39ad4ce68795b6d3f9847f45ccd931a [3345/4062] highmem: Make kunmap_{local,atomic}() take pointers to const void config: um-i386_defconfig (https://download.01.org/0day-ci/archive/20220617/202206170317.wxLpoEbx-lkp@xxxxxxxxx/config) compiler: gcc-11 (Debian 11.3.0-3) 11.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.4-30-g92122700-dirty # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=20adc3e8f39ad4ce68795b6d3f9847f45ccd931a git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git fetch --no-tags linux-next master git checkout 20adc3e8f39ad4ce68795b6d3f9847f45ccd931a # save the config file mkdir build_dir && cp config build_dir/.config make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=um SUBARCH=i386 SHELL=/bin/bash If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot <lkp@xxxxxxxxx> sparse warnings: (new ones prefixed by >>) arch/um/kernel/skas/uaccess.c:273:15: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected unsigned int [noderef] [usertype] __user *uaddr @@ got unsigned int [usertype] * @@ arch/um/kernel/skas/uaccess.c:273:15: sparse: expected unsigned int [noderef] [usertype] __user *uaddr arch/um/kernel/skas/uaccess.c:273:15: sparse: got unsigned int [usertype] * arch/um/kernel/skas/uaccess.c:348:15: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected unsigned int [noderef] [usertype] __user *uaddr @@ got void * @@ arch/um/kernel/skas/uaccess.c:348:15: sparse: expected unsigned int [noderef] [usertype] __user *uaddr arch/um/kernel/skas/uaccess.c:348:15: sparse: got void * arch/um/kernel/skas/uaccess.c:353:15: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile *v @@ got unsigned int [noderef] [usertype] __user *__ai_ptr @@ arch/um/kernel/skas/uaccess.c:353:15: sparse: expected void const volatile *v arch/um/kernel/skas/uaccess.c:353:15: sparse: got unsigned int [noderef] [usertype] __user *__ai_ptr arch/um/kernel/skas/uaccess.c:353:15: sparse: sparse: cast removes address space '__user' of expression arch/um/kernel/skas/uaccess.c:353:15: sparse: sparse: cast removes address space '__user' of expression arch/um/kernel/skas/uaccess.c:353:15: sparse: sparse: cast removes address space '__user' of expression arch/um/kernel/skas/uaccess.c:353:15: sparse: sparse: cast removes address space '__user' of expression >> arch/um/kernel/skas/uaccess.c:358:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const *addr @@ got unsigned int [noderef] [usertype] __user *uaddr @@ arch/um/kernel/skas/uaccess.c:358:9: sparse: expected void const *addr arch/um/kernel/skas/uaccess.c:358:9: sparse: got unsigned int [noderef] [usertype] __user *uaddr arch/um/kernel/skas/uaccess.c:274:19: sparse: sparse: dereference of noderef expression arch/um/kernel/skas/uaccess.c:280:18: sparse: sparse: dereference of noderef expression arch/um/kernel/skas/uaccess.c:283:18: sparse: sparse: dereference of noderef expression arch/um/kernel/skas/uaccess.c:286:18: sparse: sparse: dereference of noderef expression arch/um/kernel/skas/uaccess.c:289:18: sparse: sparse: dereference of noderef expression arch/um/kernel/skas/uaccess.c:292:18: sparse: sparse: dereference of noderef expression arch/um/kernel/skas/uaccess.c:351:18: sparse: sparse: dereference of noderef expression vim +358 arch/um/kernel/skas/uaccess.c dd3035a21ba7cc Anton Ivanov 2021-03-12 350 dd3035a21ba7cc Anton Ivanov 2021-03-12 351 *uval = *uaddr; dd3035a21ba7cc Anton Ivanov 2021-03-12 352 dd3035a21ba7cc Anton Ivanov 2021-03-12 353 ret = cmpxchg(uaddr, oldval, newval); dd3035a21ba7cc Anton Ivanov 2021-03-12 354 dd3035a21ba7cc Anton Ivanov 2021-03-12 355 #ifdef CONFIG_64BIT dd3035a21ba7cc Anton Ivanov 2021-03-12 356 pagefault_enable(); dd3035a21ba7cc Anton Ivanov 2021-03-12 357 #else dd3035a21ba7cc Anton Ivanov 2021-03-12 @358 kunmap_atomic(uaddr); :::::: The code at line 358 was first introduced by commit :::::: dd3035a21ba7ccaa883d7107d357ad06320d78fc um: add a UML specific futex implementation :::::: TO: Anton Ivanov <anton.ivanov@xxxxxxxxxxxxxxxxxx> :::::: CC: Richard Weinberger <richard@xxxxxx> -- 0-DAY CI Kernel Test Service https://01.org/lkp