From: kernel test robot <lkp@intel.com>
To: Andrey Konovalov <andreyknvl@google.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Linux Memory Management List <linux-mm@kvack.org>
Subject: mm/kasan/shadow.c:496:15: sparse: sparse: restricted kasan_vmalloc_flags_t degrades to integer
Date: Sun, 27 Mar 2022 23:13:57 +0800 [thread overview]
Message-ID: <202203272343.oME5HaYV-lkp@intel.com> (raw)
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
reply other threads:[~2022-03-27 15:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202203272343.oME5HaYV-lkp@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=andreyknvl@google.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox