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]
Date:   Sun, 23 Oct 2022 08:18:05 +0800
From:   kernel test robot <lkp@...el.com>
To:     "Jason A. Donenfeld" <zx2c4@...nel.org>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: drivers/soc/ux500/ux500-soc-id.c:179:31: sparse: sparse: incorrect
 type in argument 1 (different address spaces)

Hi Jason,

FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   4da34b7d175dc99b8befebd69e96546c960d526c
commit: a19402634c435a4eae226df53c141cdbb9922e7b random: make consistent use of buf and len
date:   5 months ago
config: arm-randconfig-s052-20221023
compiler: arm-linux-gnueabi-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=a19402634c435a4eae226df53c141cdbb9922e7b
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout a19402634c435a4eae226df53c141cdbb9922e7b
        # 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=arm SHELL=/bin/bash drivers/remoteproc/ drivers/soc/ux500/ lib/

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/soc/ux500/ux500-soc-id.c:179:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const *buf @@     got void [noderef] __iomem *[assigned] uid @@
   drivers/soc/ux500/ux500-soc-id.c:179:31: sparse:     expected void const *buf
   drivers/soc/ux500/ux500-soc-id.c:179:31: sparse:     got void [noderef] __iomem *[assigned] uid
   drivers/soc/ux500/ux500-soc-id.c:181:26: sparse: sparse: cast removes address space '__iomem' of expression
   drivers/soc/ux500/ux500-soc-id.c:181:26: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got unsigned int [usertype] * @@
   drivers/soc/ux500/ux500-soc-id.c:181:26: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/soc/ux500/ux500-soc-id.c:181:26: sparse:     got unsigned int [usertype] *
   drivers/soc/ux500/ux500-soc-id.c:182:26: sparse: sparse: cast removes address space '__iomem' of expression
   drivers/soc/ux500/ux500-soc-id.c:182:26: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got unsigned int [usertype] * @@
   drivers/soc/ux500/ux500-soc-id.c:182:26: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/soc/ux500/ux500-soc-id.c:182:26: sparse:     got unsigned int [usertype] *
   drivers/soc/ux500/ux500-soc-id.c:182:47: sparse: sparse: cast removes address space '__iomem' of expression
   drivers/soc/ux500/ux500-soc-id.c:182:47: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got unsigned int [usertype] * @@
   drivers/soc/ux500/ux500-soc-id.c:182:47: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/soc/ux500/ux500-soc-id.c:182:47: sparse:     got unsigned int [usertype] *
   drivers/soc/ux500/ux500-soc-id.c:183:26: sparse: sparse: cast removes address space '__iomem' of expression
   drivers/soc/ux500/ux500-soc-id.c:183:26: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got unsigned int [usertype] * @@
   drivers/soc/ux500/ux500-soc-id.c:183:26: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/soc/ux500/ux500-soc-id.c:183:26: sparse:     got unsigned int [usertype] *
   drivers/soc/ux500/ux500-soc-id.c:183:47: sparse: sparse: cast removes address space '__iomem' of expression
   drivers/soc/ux500/ux500-soc-id.c:183:47: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got unsigned int [usertype] * @@
   drivers/soc/ux500/ux500-soc-id.c:183:47: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/soc/ux500/ux500-soc-id.c:183:47: sparse:     got unsigned int [usertype] *

vim +179 drivers/soc/ux500/ux500-soc-id.c

d7a1a4f47d804b drivers/soc/ux500/ux500-soc-id.c Sudeep Holla  2020-05-23  166  
18a992787896fe drivers/soc/ux500/ux500-soc-id.c Arnd Bergmann 2016-06-22  167  static const char *db8500_read_soc_id(struct device_node *backupram)
cd1dc431d02afd arch/arm/mach-ux500/id.c         Arnd Bergmann 2016-06-20  168  {
18a992787896fe drivers/soc/ux500/ux500-soc-id.c Arnd Bergmann 2016-06-22  169  	void __iomem *base;
cd1dc431d02afd arch/arm/mach-ux500/id.c         Arnd Bergmann 2016-06-20  170  	void __iomem *uid;
cd1dc431d02afd arch/arm/mach-ux500/id.c         Arnd Bergmann 2016-06-20  171  	const char *retstr;
cd1dc431d02afd arch/arm/mach-ux500/id.c         Arnd Bergmann 2016-06-20  172  
18a992787896fe drivers/soc/ux500/ux500-soc-id.c Arnd Bergmann 2016-06-22  173  	base = of_iomap(backupram, 0);
18a992787896fe drivers/soc/ux500/ux500-soc-id.c Arnd Bergmann 2016-06-22  174  	if (!base)
cd1dc431d02afd arch/arm/mach-ux500/id.c         Arnd Bergmann 2016-06-20  175  		return NULL;
18a992787896fe drivers/soc/ux500/ux500-soc-id.c Arnd Bergmann 2016-06-22  176  	uid = base + 0x1fc0;
18a992787896fe drivers/soc/ux500/ux500-soc-id.c Arnd Bergmann 2016-06-22  177  
cd1dc431d02afd arch/arm/mach-ux500/id.c         Arnd Bergmann 2016-06-20  178  	/* Throw these device-specific numbers into the entropy pool */
cd1dc431d02afd arch/arm/mach-ux500/id.c         Arnd Bergmann 2016-06-20 @179  	add_device_randomness(uid, 0x14);
cd1dc431d02afd arch/arm/mach-ux500/id.c         Arnd Bergmann 2016-06-20  180  	retstr = kasprintf(GFP_KERNEL, "%08x%08x%08x%08x%08x",
cd1dc431d02afd arch/arm/mach-ux500/id.c         Arnd Bergmann 2016-06-20  181  			 readl((u32 *)uid+0),
cd1dc431d02afd arch/arm/mach-ux500/id.c         Arnd Bergmann 2016-06-20  182  			 readl((u32 *)uid+1), readl((u32 *)uid+2),
cd1dc431d02afd arch/arm/mach-ux500/id.c         Arnd Bergmann 2016-06-20  183  			 readl((u32 *)uid+3), readl((u32 *)uid+4));
18a992787896fe drivers/soc/ux500/ux500-soc-id.c Arnd Bergmann 2016-06-22  184  	iounmap(base);
cd1dc431d02afd arch/arm/mach-ux500/id.c         Arnd Bergmann 2016-06-20  185  	return retstr;
cd1dc431d02afd arch/arm/mach-ux500/id.c         Arnd Bergmann 2016-06-20  186  }
cd1dc431d02afd arch/arm/mach-ux500/id.c         Arnd Bergmann 2016-06-20  187  

:::::: The code at line 179 was first introduced by commit
:::::: cd1dc431d02afda521bed53b7c87a678a3ac246f ARM: ux500: consolidate soc_device code in id.c

:::::: TO: Arnd Bergmann <arnd@...db.de>
:::::: CC: Linus Walleij <linus.walleij@...aro.org>

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ