From: kernel test robot <lkp@intel.com>
To: Haibo Li <haibo.li@mediatek.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Linux Memory Management List <linux-mm@kvack.org>,
Andrey Konovalov <andreyknvl@gmail.com>
Subject: mm/kasan/report.c:637 kasan_non_canonical_hook() warn: unsigned 'addr' is never less than zero.
Date: Mon, 27 Nov 2023 08:25:28 +0800 [thread overview]
Message-ID: <202311270743.3oTCwYPd-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d2da77f431ac49b5763b88751a75f70daa46296c
commit: babddbfb7d7d70ae7f10fedd75a45d8ad75fdddf kasan: print the original fault addr when access invalid shadow
date: 6 weeks ago
config: loongarch-randconfig-r071-20231126 (https://download.01.org/0day-ci/archive/20231127/202311270743.3oTCwYPd-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20231127/202311270743.3oTCwYPd-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311270743.3oTCwYPd-lkp@intel.com/
smatch warnings:
mm/kasan/report.c:637 kasan_non_canonical_hook() warn: unsigned 'addr' is never less than zero.
vim +/addr +637 mm/kasan/report.c
bb2f967ce2130b Andrey Konovalov 2022-03-24 623
2f004eea0fc8f8 Jann Horn 2019-12-19 624 /*
babddbfb7d7d70 Haibo Li 2023-10-09 625 * With CONFIG_KASAN, accesses to bogus pointers (outside the high
2f004eea0fc8f8 Jann Horn 2019-12-19 626 * canonical half of the address space) cause out-of-bounds shadow memory reads
2f004eea0fc8f8 Jann Horn 2019-12-19 627 * before the actual access. For addresses in the low canonical half of the
2f004eea0fc8f8 Jann Horn 2019-12-19 628 * address space, as well as most non-canonical addresses, that out-of-bounds
2f004eea0fc8f8 Jann Horn 2019-12-19 629 * shadow memory access lands in the non-canonical part of the address space.
2f004eea0fc8f8 Jann Horn 2019-12-19 630 * Help the user figure out what the original bogus pointer was.
2f004eea0fc8f8 Jann Horn 2019-12-19 631 */
2f004eea0fc8f8 Jann Horn 2019-12-19 632 void kasan_non_canonical_hook(unsigned long addr)
2f004eea0fc8f8 Jann Horn 2019-12-19 633 {
2f004eea0fc8f8 Jann Horn 2019-12-19 634 unsigned long orig_addr;
2f004eea0fc8f8 Jann Horn 2019-12-19 635 const char *bug_type;
2f004eea0fc8f8 Jann Horn 2019-12-19 636
2f004eea0fc8f8 Jann Horn 2019-12-19 @637 if (addr < KASAN_SHADOW_OFFSET)
:::::: The code at line 637 was first introduced by commit
:::::: 2f004eea0fc8f86b45dfc2007add2d4986de8d02 x86/kasan: Print original address on #GP
:::::: TO: Jann Horn <jannh@google.com>
:::::: CC: Borislav Petkov <bp@suse.de>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2023-11-27 0:26 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=202311270743.3oTCwYPd-lkp@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=andreyknvl@gmail.com \
--cc=haibo.li@mediatek.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=oe-kbuild-all@lists.linux.dev \
/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;
as well as URLs for NNTP newsgroup(s).