public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Subject: fs/jfs/jfs_debug.c:36:13: sparse: sparse: incorrect type in argument 1 (different address spaces)
Date: Wed, 20 Jan 2021 08:17:25 +0800	[thread overview]
Message-ID: <202101200803.QRam8MT0-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 8305 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   1e2a199f6ccdc15cf111d68d212e2fd4ce65682e
commit: e5fc436f06eef54ef512ea55a9db8eb9f2e76959 sparse: use static inline for __chk_{user,io}_ptr()
date:   5 months ago
config: sh-randconfig-s031-20210120 (attached as .config)
compiler: sh4-linux-gcc (GCC) 9.3.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.3-208-g46a52ca4-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e5fc436f06eef54ef512ea55a9db8eb9f2e76959
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout e5fc436f06eef54ef512ea55a9db8eb9f2e76959
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=sh 

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 >>)"
   fs/jfs/jfs_debug.c:36:13: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected char const *__gu_addr @@     got char const [noderef] __user *buffer @@
   fs/jfs/jfs_debug.c:36:13: sparse:     expected char const *__gu_addr
   fs/jfs/jfs_debug.c:36:13: sparse:     got char const [noderef] __user *buffer
>> fs/jfs/jfs_debug.c:36:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __user *ptr @@     got char const *__gu_addr @@
   fs/jfs/jfs_debug.c:36:13: sparse:     expected void const volatile [noderef] __user *ptr
   fs/jfs/jfs_debug.c:36:13: sparse:     got char const *__gu_addr
--
   lib/test_user_copy.c:165:16: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *addr @@     got void [noderef] __user *__cl_addr @@
   lib/test_user_copy.c:165:16: sparse:     expected void *addr
   lib/test_user_copy.c:165:16: sparse:     got void [noderef] __user *__cl_addr
   lib/test_user_copy.c:239:9: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected unsigned char const *__gu_addr @@     got unsigned char [noderef] [usertype] __user * @@
   lib/test_user_copy.c:239:9: sparse:     expected unsigned char const *__gu_addr
   lib/test_user_copy.c:239:9: sparse:     got unsigned char [noderef] [usertype] __user *
>> lib/test_user_copy.c:239:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __user *ptr @@     got unsigned char const *__gu_addr @@
   lib/test_user_copy.c:239:9: sparse:     expected void const volatile [noderef] __user *ptr
   lib/test_user_copy.c:239:9: sparse:     got unsigned char const *__gu_addr
   lib/test_user_copy.c:240:9: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected unsigned short const *__gu_addr @@     got unsigned short [noderef] [usertype] __user * @@
   lib/test_user_copy.c:240:9: sparse:     expected unsigned short const *__gu_addr
   lib/test_user_copy.c:240:9: sparse:     got unsigned short [noderef] [usertype] __user *
>> lib/test_user_copy.c:240:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __user *ptr @@     got unsigned short const *__gu_addr @@
   lib/test_user_copy.c:240:9: sparse:     expected void const volatile [noderef] __user *ptr
   lib/test_user_copy.c:240:9: sparse:     got unsigned short const *__gu_addr
   lib/test_user_copy.c:241:9: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected unsigned int const *__gu_addr @@     got unsigned int [noderef] [usertype] __user * @@
   lib/test_user_copy.c:241:9: sparse:     expected unsigned int const *__gu_addr
   lib/test_user_copy.c:241:9: sparse:     got unsigned int [noderef] [usertype] __user *
>> lib/test_user_copy.c:241:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __user *ptr @@     got unsigned int const *__gu_addr @@
   lib/test_user_copy.c:241:9: sparse:     expected void const volatile [noderef] __user *ptr
   lib/test_user_copy.c:241:9: sparse:     got unsigned int const *__gu_addr
   lib/test_user_copy.c:302:9: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected unsigned char const *__gu_addr @@     got unsigned char [noderef] [usertype] __user * @@
   lib/test_user_copy.c:302:9: sparse:     expected unsigned char const *__gu_addr
   lib/test_user_copy.c:302:9: sparse:     got unsigned char [noderef] [usertype] __user *
   lib/test_user_copy.c:302:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __user *ptr @@     got unsigned char const *__gu_addr @@
   lib/test_user_copy.c:302:9: sparse:     expected void const volatile [noderef] __user *ptr
   lib/test_user_copy.c:302:9: sparse:     got unsigned char const *__gu_addr
   lib/test_user_copy.c:303:9: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected unsigned short const *__gu_addr @@     got unsigned short [noderef] [usertype] __user * @@
   lib/test_user_copy.c:303:9: sparse:     expected unsigned short const *__gu_addr
   lib/test_user_copy.c:303:9: sparse:     got unsigned short [noderef] [usertype] __user *
   lib/test_user_copy.c:303:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __user *ptr @@     got unsigned short const *__gu_addr @@
   lib/test_user_copy.c:303:9: sparse:     expected void const volatile [noderef] __user *ptr
   lib/test_user_copy.c:303:9: sparse:     got unsigned short const *__gu_addr
   lib/test_user_copy.c:304:9: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected unsigned int const *__gu_addr @@     got unsigned int [noderef] [usertype] __user * @@
   lib/test_user_copy.c:304:9: sparse:     expected unsigned int const *__gu_addr
   lib/test_user_copy.c:304:9: sparse:     got unsigned int [noderef] [usertype] __user *
   lib/test_user_copy.c:304:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __user *ptr @@     got unsigned int const *__gu_addr @@
   lib/test_user_copy.c:304:9: sparse:     expected void const volatile [noderef] __user *ptr
   lib/test_user_copy.c:304:9: sparse:     got unsigned int const *__gu_addr

vim +36 fs/jfs/jfs_debug.c

^1da177e4c3f4152 Linus Torvalds  2005-04-16  30  
b2e03ca7485cac03 Alexey Dobriyan 2008-05-13  31  static ssize_t jfs_loglevel_proc_write(struct file *file,
b2e03ca7485cac03 Alexey Dobriyan 2008-05-13  32  		const char __user *buffer, size_t count, loff_t *ppos)
^1da177e4c3f4152 Linus Torvalds  2005-04-16  33  {
^1da177e4c3f4152 Linus Torvalds  2005-04-16  34  	char c;
^1da177e4c3f4152 Linus Torvalds  2005-04-16  35  
^1da177e4c3f4152 Linus Torvalds  2005-04-16 @36  	if (get_user(c, buffer))
^1da177e4c3f4152 Linus Torvalds  2005-04-16  37  		return -EFAULT;
^1da177e4c3f4152 Linus Torvalds  2005-04-16  38  
^1da177e4c3f4152 Linus Torvalds  2005-04-16  39  	/* yes, I know this is an ASCIIism.  --hch */
^1da177e4c3f4152 Linus Torvalds  2005-04-16  40  	if (c < '0' || c > '9')
^1da177e4c3f4152 Linus Torvalds  2005-04-16  41  		return -EINVAL;
^1da177e4c3f4152 Linus Torvalds  2005-04-16  42  	jfsloglevel = c - '0';
^1da177e4c3f4152 Linus Torvalds  2005-04-16  43  	return count;
^1da177e4c3f4152 Linus Torvalds  2005-04-16  44  }
b2e03ca7485cac03 Alexey Dobriyan 2008-05-13  45  

:::::: The code at line 36 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2

:::::: TO: Linus Torvalds <torvalds@ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds@ppc970.osdl.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 32831 bytes --]

                 reply	other threads:[~2021-01-20  0:20 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=202101200803.QRam8MT0-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luc.vanoostenryck@gmail.com \
    --cc=miguel.ojeda.sandonis@gmail.com \
    /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