From: kernel test robot <lkp@intel.com>
To: Aaron Tomlin <atomlin@redhat.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
Luis Chamberlain <mcgrof@kernel.org>,
Christophe Leroy <christophe.leroy@csgroup.eu>
Subject: kernel/module/main.c:4169:1: sparse: sparse: Using plain integer as NULL pointer
Date: Sun, 19 Feb 2023 06:55:56 +0800 [thread overview]
Message-ID: <202302190638.fKs1ga5r-lkp@intel.com> (raw)
Hi Aaron,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 5e725d112e1a54c2611d5dffd124a79415d0f0de
commit: cfc1d277891eb499b3b5354df33b30f598683e90 module: Move all into module/
date: 11 months ago
config: s390-randconfig-s052-20230219 (https://download.01.org/0day-ci/archive/20230219/202302190638.fKs1ga5r-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 12.1.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-39-gce1a6720-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cfc1d277891eb499b3b5354df33b30f598683e90
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout cfc1d277891eb499b3b5354df33b30f598683e90
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=s390 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.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 where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202302190638.fKs1ga5r-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
kernel/module/main.c:2761:23: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct mod_kallsyms [noderef] __rcu *kallsyms @@ got void * @@
kernel/module/main.c:2761:23: sparse: expected struct mod_kallsyms [noderef] __rcu *kallsyms
kernel/module/main.c:2761:23: sparse: got void *
>> kernel/module/main.c:4169:1: sparse: sparse: Using plain integer as NULL pointer
>> kernel/module/main.c:4169:1: sparse: sparse: Using plain integer as NULL pointer
>> kernel/module/main.c:4169:1: sparse: sparse: Using plain integer as NULL pointer
>> kernel/module/main.c:4169:1: sparse: sparse: Using plain integer as NULL pointer
kernel/module/main.c:4189:1: sparse: sparse: Using plain integer as NULL pointer
kernel/module/main.c:4189:1: sparse: sparse: Using plain integer as NULL pointer
kernel/module/main.c: note: in included file (through include/linux/mm_types.h, include/linux/buildid.h, include/linux/module.h, ...):
include/linux/rbtree.h:74:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
include/linux/rbtree.h:74:9: sparse: struct rb_node [noderef] __rcu *
include/linux/rbtree.h:74:9: sparse: struct rb_node *
include/linux/rbtree.h:74:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
include/linux/rbtree.h:74:9: sparse: struct rb_node [noderef] __rcu *
include/linux/rbtree.h:74:9: sparse: struct rb_node *
vim +4169 kernel/module/main.c
b99b87f70c7785 kernel/module.c Peter Oberparleiter 2009-06-17 4168
17da2bd90abf42 kernel/module.c Heiko Carstens 2009-01-14 @4169 SYSCALL_DEFINE3(init_module, void __user *, umod,
17da2bd90abf42 kernel/module.c Heiko Carstens 2009-01-14 4170 unsigned long, len, const char __user *, uargs)
^1da177e4c3f41 kernel/module.c Linus Torvalds 2005-04-16 4171 {
34e1169d996ab1 kernel/module.c Kees Cook 2012-10-16 4172 int err;
34e1169d996ab1 kernel/module.c Kees Cook 2012-10-16 4173 struct load_info info = { };
^1da177e4c3f41 kernel/module.c Linus Torvalds 2005-04-16 4174
34e1169d996ab1 kernel/module.c Kees Cook 2012-10-16 4175 err = may_init_module();
34e1169d996ab1 kernel/module.c Kees Cook 2012-10-16 4176 if (err)
34e1169d996ab1 kernel/module.c Kees Cook 2012-10-16 4177 return err;
^1da177e4c3f41 kernel/module.c Linus Torvalds 2005-04-16 4178
34e1169d996ab1 kernel/module.c Kees Cook 2012-10-16 4179 pr_debug("init_module: umod=%p, len=%lu, uargs=%p\n",
34e1169d996ab1 kernel/module.c Kees Cook 2012-10-16 4180 umod, len, uargs);
^1da177e4c3f41 kernel/module.c Linus Torvalds 2005-04-16 4181
34e1169d996ab1 kernel/module.c Kees Cook 2012-10-16 4182 err = copy_module_from_user(umod, len, &info);
34e1169d996ab1 kernel/module.c Kees Cook 2012-10-16 4183 if (err)
34e1169d996ab1 kernel/module.c Kees Cook 2012-10-16 4184 return err;
^1da177e4c3f41 kernel/module.c Linus Torvalds 2005-04-16 4185
2f3238aebedb24 kernel/module.c Rusty Russell 2012-10-22 4186 return load_module(&info, uargs, 0);
e24e2e64c468c8 kernel/module.c Alexey Dobriyan 2008-03-10 4187 }
94462ad3b14739 kernel/module.c Steven Rostedt 2010-11-29 4188
:::::: The code at line 4169 was first introduced by commit
:::::: 17da2bd90abf428523de0fb98f7075e00e3ed42e [CVE-2009-0029] System call wrappers part 08
:::::: TO: Heiko Carstens <heiko.carstens@de.ibm.com>
:::::: CC: Heiko Carstens <heiko.carstens@de.ibm.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
reply other threads:[~2023-02-18 22:59 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=202302190638.fKs1ga5r-lkp@intel.com \
--to=lkp@intel.com \
--cc=atomlin@redhat.com \
--cc=christophe.leroy@csgroup.eu \
--cc=linux-kernel@vger.kernel.org \
--cc=mcgrof@kernel.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
all inboxes | Powered by JetHome®