Content-Type: multipart/mixed; boundary="===============9045006291766312954==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH 20/43] instrumented.h: add KMSAN support Date: Wed, 15 Dec 2021 18:05:40 +0800 Message-ID: <202112151809.wxOe39yF-lkp@intel.com> In-Reply-To: <20211214162050.660953-21-glider@google.com> List-Id: --===============9045006291766312954== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Alexander, I love your patch! Perhaps something to improve: [auto build test WARNING on tip/x86/mm] [also build test WARNING on linus/master v5.16-rc5] [cannot apply to tip/x86/core hnaz-mm/master next-20211214] [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/0day-ci/linux/commits/Alexander-Potapenko/Add-Ke= rnelMemorySanitizer-infrastructure/20211215-003033 base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 35fa745= 286ac44ee26ed100c2bd2553368ad193b config: x86_64-randconfig-s021-20211214 (https://download.01.org/0day-ci/ar= chive/20211215/202112151809.wxOe39yF-lkp(a)intel.com/config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.4-dirty # https://github.com/0day-ci/linux/commit/9faa0d15bc0e13d7f3d4737ac= 4b8b9f7d33bc641 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Alexander-Potapenko/Add-KernelMemo= rySanitizer-infrastructure/20211215-003033 git checkout 9faa0d15bc0e13d7f3d4737ac4b8b9f7d33bc641 # save the config file to linux build tree mkdir build_dir make W=3D1 C=3D1 CF=3D'-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=3D= build_dir ARCH=3Dx86_64 SHELL=3D/bin/bash arch/x86/kernel/fpu/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot sparse warnings: (new ones prefixed by >>) arch/x86/kernel/fpu/signal.c: note: in included file (through include/as= m-generic/bitops/instrumented-atomic.h, arch/x86/include/asm/bitops.h, incl= ude/linux/bitops.h, ...): >> include/linux/instrumented.h:121:28: sparse: sparse: incorrect type in a= rgument 1 (different address spaces) @@ expected void const *to @@ = got void [noderef] __user *to @@ include/linux/instrumented.h:121:28: sparse: expected void const *to include/linux/instrumented.h:121:28: sparse: got void [noderef] __us= er *to >> include/linux/instrumented.h:121:28: sparse: sparse: incorrect type in a= rgument 1 (different address spaces) @@ expected void const *to @@ = got void [noderef] __user *to @@ include/linux/instrumented.h:121:28: sparse: expected void const *to include/linux/instrumented.h:121:28: sparse: got void [noderef] __us= er *to vim +121 include/linux/instrumented.h 105 = 106 /** 107 * instrument_copy_to_user - instrument reads of copy_to_user 108 * 109 * Instrument reads from kernel memory, that are due to copy_to_user= (and 110 * variants). The instrumentation must be inserted before the access= es. 111 * 112 * @to destination address 113 * @from source address 114 * @n number of bytes to copy 115 */ 116 static __always_inline void 117 instrument_copy_to_user(void __user *to, const void *from, unsigned = long n) 118 { 119 kasan_check_read(from, n); 120 kcsan_check_read(from, n); > 121 kmsan_copy_to_user(to, from, n, 0); 122 } 123 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============9045006291766312954==--