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...
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/archive/20220125/202201251257.quQ9h8XG-lk...)
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/e53c62ef4d4998f3bdd75ec887bc39a1e...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
andrey-konovalov-linux-dev/kasan-vmalloc-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=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir
ARCH=x86_64 SHELL=/bin/bash mm/kasan/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
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 ignored.
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 = 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@lists.01.org