mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: [kas:lam 6/10] drivers/char/ipmi/ipmi_watchdog.c:776:37: sparse: sparse: incorrect type in argument 1 (different address spaces)
Date: Sat, 9 Apr 2022 07:44:27 +0800	[thread overview]
Message-ID: <202204090719.r9wPivY6-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/kas/linux.git lam
head:   73447e771c55e18598a6fbf6adee1002aee18ea0
commit: 92948bd2c12648f2fb8256ae69dd092ce4398a3a [6/10] x86/uaccess: Remove tags from the address before checking
config: x86_64-randconfig-s022 (https://download.01.org/0day-ci/archive/20220409/202204090719.r9wPivY6-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.2.0-19) 11.2.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.4-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/kas/linux.git/commit/?id=92948bd2c12648f2fb8256ae69dd092ce4398a3a
        git remote add kas https://git.kernel.org/pub/scm/linux/kernel/git/kas/linux.git
        git fetch --no-tags kas lam
        git checkout 92948bd2c12648f2fb8256ae69dd092ce4398a3a
        # save the config file to linux build tree
        mkdir build_dir
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash

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 >>)
>> drivers/char/ipmi/ipmi_watchdog.c:776:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __user *ptr @@     got char const *__ptr_clean @@
   drivers/char/ipmi/ipmi_watchdog.c:776:37: sparse:     expected void const volatile [noderef] __user *ptr
   drivers/char/ipmi/ipmi_watchdog.c:776:37: sparse:     got char const *__ptr_clean

vim +776 drivers/char/ipmi/ipmi_watchdog.c

55929332c92e5d Arnd Bergmann  2010-04-27  758  
^1da177e4c3f41 Linus Torvalds 2005-04-16  759  static ssize_t ipmi_write(struct file *file,
^1da177e4c3f41 Linus Torvalds 2005-04-16  760  			  const char  __user *buf,
^1da177e4c3f41 Linus Torvalds 2005-04-16  761  			  size_t      len,
^1da177e4c3f41 Linus Torvalds 2005-04-16  762  			  loff_t      *ppos)
^1da177e4c3f41 Linus Torvalds 2005-04-16  763  {
^1da177e4c3f41 Linus Torvalds 2005-04-16  764  	int rv;
^1da177e4c3f41 Linus Torvalds 2005-04-16  765  
^1da177e4c3f41 Linus Torvalds 2005-04-16  766  	if (len) {
^1da177e4c3f41 Linus Torvalds 2005-04-16  767  		if (!nowayout) {
^1da177e4c3f41 Linus Torvalds 2005-04-16  768  			size_t i;
^1da177e4c3f41 Linus Torvalds 2005-04-16  769  
^1da177e4c3f41 Linus Torvalds 2005-04-16  770  			/* In case it was set long ago */
^1da177e4c3f41 Linus Torvalds 2005-04-16  771  			expect_close = 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16  772  
^1da177e4c3f41 Linus Torvalds 2005-04-16  773  			for (i = 0; i != len; i++) {
^1da177e4c3f41 Linus Torvalds 2005-04-16  774  				char c;
^1da177e4c3f41 Linus Torvalds 2005-04-16  775  
^1da177e4c3f41 Linus Torvalds 2005-04-16 @776  				if (get_user(c, buf + i))
^1da177e4c3f41 Linus Torvalds 2005-04-16  777  					return -EFAULT;
^1da177e4c3f41 Linus Torvalds 2005-04-16  778  				if (c == 'V')
^1da177e4c3f41 Linus Torvalds 2005-04-16  779  					expect_close = 42;
^1da177e4c3f41 Linus Torvalds 2005-04-16  780  			}
^1da177e4c3f41 Linus Torvalds 2005-04-16  781  		}
^1da177e4c3f41 Linus Torvalds 2005-04-16  782  		rv = ipmi_heartbeat();
^1da177e4c3f41 Linus Torvalds 2005-04-16  783  		if (rv)
^1da177e4c3f41 Linus Torvalds 2005-04-16  784  			return rv;
^1da177e4c3f41 Linus Torvalds 2005-04-16  785  	}
3976df9b04c113 Mark Rustad    2008-07-10  786  	return len;
^1da177e4c3f41 Linus Torvalds 2005-04-16  787  }
^1da177e4c3f41 Linus Torvalds 2005-04-16  788  

:::::: The code at line 776 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
https://01.org/lkp

                 reply	other threads:[~2022-04-08 23:44 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=202204090719.r9wPivY6-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    /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®