[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202111040340.6sti69Cb-lkp@intel.com>
Date: Thu, 4 Nov 2021 03:33:50 +0800
From: kernel test robot <lkp@...el.com>
To: Andrey Konovalov <andreyknvl@...gle.com>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
Marco Elver <elver@...gle.com>,
Alexander Potapenko <glider@...gle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Linux Memory Management List <linux-mm@...ck.org>
Subject: lib/test_kasan_module.c:90:26: sparse: sparse: incompatible types in
comparison expression (different address spaces):
Hi Andrey,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 655fedaad36c0b31a6f6cb8f469b739b2359d74f
commit: 5d92bdffd2d53f98de683229c0ad7d028703fdba kasan: rename CONFIG_TEST_KASAN_MODULE
date: 8 months ago
config: s390-randconfig-s031-20211103 (attached as .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=5d92bdffd2d53f98de683229c0ad7d028703fdba
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 5d92bdffd2d53f98de683229c0ad7d028703fdba
# save the attached .config to linux build tree
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
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
sparse warnings: (new ones prefixed by >>)
>> lib/test_kasan_module.c:90:26: sparse: sparse: incompatible types in comparison expression (different address spaces):
>> lib/test_kasan_module.c:90:26: sparse: struct kasan_rcu_info [noderef] __rcu *
>> lib/test_kasan_module.c:90:26: sparse: struct kasan_rcu_info *
vim +90 lib/test_kasan_module.c
73228c7ecc5e40 Patricia Alfonso 2020-10-13 78
73228c7ecc5e40 Patricia Alfonso 2020-10-13 79 static noinline void __init kasan_rcu_uaf(void)
73228c7ecc5e40 Patricia Alfonso 2020-10-13 80 {
73228c7ecc5e40 Patricia Alfonso 2020-10-13 81 struct kasan_rcu_info *ptr;
73228c7ecc5e40 Patricia Alfonso 2020-10-13 82
73228c7ecc5e40 Patricia Alfonso 2020-10-13 83 pr_info("use-after-free in kasan_rcu_reclaim\n");
73228c7ecc5e40 Patricia Alfonso 2020-10-13 84 ptr = kmalloc(sizeof(struct kasan_rcu_info), GFP_KERNEL);
73228c7ecc5e40 Patricia Alfonso 2020-10-13 85 if (!ptr) {
73228c7ecc5e40 Patricia Alfonso 2020-10-13 86 pr_err("Allocation failed\n");
73228c7ecc5e40 Patricia Alfonso 2020-10-13 87 return;
73228c7ecc5e40 Patricia Alfonso 2020-10-13 88 }
73228c7ecc5e40 Patricia Alfonso 2020-10-13 89
73228c7ecc5e40 Patricia Alfonso 2020-10-13 @90 global_rcu_ptr = rcu_dereference_protected(ptr, NULL);
73228c7ecc5e40 Patricia Alfonso 2020-10-13 91 call_rcu(&global_rcu_ptr->rcu, kasan_rcu_reclaim);
73228c7ecc5e40 Patricia Alfonso 2020-10-13 92 }
73228c7ecc5e40 Patricia Alfonso 2020-10-13 93
:::::: The code at line 90 was first introduced by commit
:::::: 73228c7ecc5e40c0851c4703c5ec6ed38123e989 KASAN: port KASAN Tests to KUnit
:::::: TO: Patricia Alfonso <trishalfonso@...gle.com>
:::::: CC: Linus Torvalds <torvalds@...ux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (15125 bytes)
Powered by blists - more mailing lists