From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============4890446217660891046==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH v6 31/39] kasan, vmalloc: only tag normal vmalloc allocations Date: Tue, 25 Jan 2022 12:19:04 +0800 Message-ID: <202201251257.quQ9h8XG-lkp@intel.com> In-Reply-To: List-Id: --===============4890446217660891046== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi, I love your patch! Perhaps something to improve: [auto build test WARNING on linus/master] [also build test WARNING on v5.17-rc1 next-20220124] [cannot apply to arm64/for-next/core rostedt-trace/for-next hnaz-mm/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/0day-ci/linux/commits/andrey-konovalov-linux-dev= /kasan-vmalloc-arm64-add-vmalloc-tagging-support-for-SW-HW_TAGS/20220125-02= 1005 base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git = dd81e1c7d5fb126e5fbc5c9e334d7b3ec29a16a0 config: x86_64-randconfig-s022-20220124 (https://download.01.org/0day-ci/ar= chive/20220125/202201251257.quQ9h8XG-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/e53c62ef4d4998f3bdd75ec88= 7bc39a1ef2dd740 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review andrey-konovalov-linux-dev/kasan-v= malloc-arm64-add-vmalloc-tagging-support-for-SW-HW_TAGS/20220125-021005 git checkout e53c62ef4d4998f3bdd75ec887bc39a1ef2dd740 # 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 mm/kasan/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot sparse warnings: (new ones prefixed by >>) >> mm/kasan/shadow.c:495:15: sparse: sparse: restricted kasan_vmalloc_flags= _t degrades to integer vim +495 mm/kasan/shadow.c 477 = 478 void *__kasan_unpoison_vmalloc(const void *start, unsigned long size, 479 kasan_vmalloc_flags_t flags) 480 { 481 /* 482 * Software KASAN modes unpoison both VM_ALLOC and non-VM_ALLOC 483 * mappings, so the KASAN_VMALLOC_VM_ALLOC flag is ignored. 484 * Software KASAN modes can't optimize zeroing memory by combining = it 485 * with setting memory tags, so the KASAN_VMALLOC_INIT flag is igno= red. 486 */ 487 = 488 if (!is_vmalloc_or_module_addr(start)) 489 return (void *)start; 490 = 491 /* 492 * Don't tag executable memory. 493 * The kernel doesn't tolerate having the PC register tagged. 494 */ > 495 if (!(flags & KASAN_VMALLOC_PROT_NORMAL)) 496 return (void *)start; 497 = 498 start =3D set_tag(start, kasan_random_tag()); 499 kasan_unpoison(start, size, false); 500 return (void *)start; 501 } 502 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============4890446217660891046==--