lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202208172048.fQ9UABUn-lkp@intel.com>
Date:   Wed, 17 Aug 2022 21:00:45 +0800
From:   kernel test robot <lkp@...el.com>
To:     "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [kas:lam 5/13] drivers/char/ipmi/ipmi_watchdog.c:768:37: sparse:
 sparse: incorrect type in assignment (different address spaces)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/kas/linux.git lam
head:   8836fbd6cd3120383a0bc63cd54c7dd55639ed49
commit: 2600a472582e2968633831d430c2a1366ad3e8b1 [5/13] x86/uaccess: Provide untagged_addr() and remove tags before address check
config: x86_64-randconfig-s021-20220815
compiler: gcc-11 (Debian 11.3.0-5) 11.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.4-39-gce1a6720-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/kas/linux.git/commit/?id=2600a472582e2968633831d430c2a1366ad3e8b1
        git remote add kas https://git.kernel.org/pub/scm/linux/kernel/git/kas/linux.git
        git fetch --no-tags kas lam
        git checkout 2600a472582e2968633831d430c2a1366ad3e8b1
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        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 where applicable
Reported-by: kernel test robot <lkp@...el.com>

sparse warnings: (new ones prefixed by >>)
>> drivers/char/ipmi/ipmi_watchdog.c:768:37: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected char const [noderef] __user *__ptr_clean @@     got char const * @@
   drivers/char/ipmi/ipmi_watchdog.c:768:37: sparse:     expected char const [noderef] __user *__ptr_clean
   drivers/char/ipmi/ipmi_watchdog.c:768:37: sparse:     got char const *
--
>> drivers/input/serio/serport.c:216:21: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected unsigned long [noderef] __user *__ptr_clean @@     got unsigned long * @@
   drivers/input/serio/serport.c:216:21: sparse:     expected unsigned long [noderef] __user *__ptr_clean
   drivers/input/serio/serport.c:216:21: sparse:     got unsigned long *

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

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

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

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

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (136669 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ