[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202311270743.3oTCwYPd-lkp@intel.com>
Date: Mon, 27 Nov 2023 08:25:28 +0800
From: kernel test robot <lkp@...el.com>
To: Haibo Li <haibo.li@...iatek.com>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
Linux Memory Management List <linux-mm@...ck.org>,
Andrey Konovalov <andreyknvl@...il.com>
Subject: mm/kasan/report.c:637 kasan_non_canonical_hook() warn: unsigned
'addr' is never less than zero.
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@...el.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@...gle.com>
:::::: CC: Borislav Petkov <bp@...e.de>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists