* mm/kasan/shadow.c:496:15: sparse: sparse: restricted kasan_vmalloc_flags_t degrades to integer
@ 2022-03-27 15:13 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-03-27 15:13 UTC (permalink / raw)
To: Andrey Konovalov
Cc: kbuild-all, linux-kernel, Andrew Morton,
Linux Memory Management List
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f022814633e1c600507b3a99691b4d624c2813f0
commit: f6e39794f4b6da7ca9b77f2f9ad11fd6f0ac83e5 kasan, vmalloc: only tag normal vmalloc allocations
date: 3 days ago
config: s390-randconfig-s031-20220327 (https://download.01.org/0day-ci/archive/20220327/202203272343.oME5HaYV-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 11.2.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.4-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f6e39794f4b6da7ca9b77f2f9ad11fd6f0ac83e5
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout f6e39794f4b6da7ca9b77f2f9ad11fd6f0ac83e5
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=s390 SHELL=/bin/bash mm/kasan/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
>> mm/kasan/shadow.c:496:15: sparse: sparse: restricted kasan_vmalloc_flags_t degrades to integer
vim +496 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 with the tag-based mode.
493 * The kernel doesn't tolerate having the PC register tagged.
494 */
495 if (IS_ENABLED(CONFIG_KASAN_SW_TAGS) &&
> 496 !(flags & KASAN_VMALLOC_PROT_NORMAL))
497 return (void *)start;
498
499 start = set_tag(start, kasan_random_tag());
500 kasan_unpoison(start, size, false);
501 return (void *)start;
502 }
503
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-03-27 15:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-27 15:13 mm/kasan/shadow.c:496:15: sparse: sparse: restricted kasan_vmalloc_flags_t degrades to integer kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.