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>] [thread-next>] [day] [month] [year] [list]
Message-ID: <202012291139.8JYuVQ00-lkp@intel.com>
Date:   Tue, 29 Dec 2020 11:26:45 +0800
From:   kernel test robot <lkp@...el.com>
To:     Herbert Xu <herbert@...dor.apana.org.au>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: drivers/crypto/stm32/stm32-cryp.c:1232:47: sparse: sparse: incorrect
 type in argument 2 (different base types)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   dea8dcf2a9fa8cc540136a6cd885c3beece16ec3
commit: bbb2832620ac4e136416aa97af7310636422dea9 crypto: stm32 - Fix sparse warnings
date:   4 months ago
config: arm-randconfig-s032-20201220 (attached as .config)
compiler: arm-linux-gnueabi-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-184-g1b896707-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bbb2832620ac4e136416aa97af7310636422dea9
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout bbb2832620ac4e136416aa97af7310636422dea9
        # 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=arm 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>


"sparse warnings: (new ones prefixed by >>)"
>> drivers/crypto/stm32/stm32-cryp.c:1232:47: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected restricted __be32 [usertype] *[assigned] iv @@     got unsigned int [usertype] * @@
   drivers/crypto/stm32/stm32-cryp.c:1232:47: sparse:     expected restricted __be32 [usertype] *[assigned] iv
   drivers/crypto/stm32/stm32-cryp.c:1232:47: sparse:     got unsigned int [usertype] *

vim +1232 drivers/crypto/stm32/stm32-cryp.c

9d3b5030bc1e44f Fabien DESSENNE 2018-02-07  1215  
9e054ec21ef8344 Fabien DESSENNE 2017-10-19  1216  static void stm32_cryp_check_ctr_counter(struct stm32_cryp *cryp)
9e054ec21ef8344 Fabien DESSENNE 2017-10-19  1217  {
9e054ec21ef8344 Fabien DESSENNE 2017-10-19  1218  	u32 cr;
9e054ec21ef8344 Fabien DESSENNE 2017-10-19  1219  
9e054ec21ef8344 Fabien DESSENNE 2017-10-19  1220  	if (unlikely(cryp->last_ctr[3] == 0xFFFFFFFF)) {
9e054ec21ef8344 Fabien DESSENNE 2017-10-19  1221  		cryp->last_ctr[3] = 0;
9e054ec21ef8344 Fabien DESSENNE 2017-10-19  1222  		cryp->last_ctr[2]++;
9e054ec21ef8344 Fabien DESSENNE 2017-10-19  1223  		if (!cryp->last_ctr[2]) {
9e054ec21ef8344 Fabien DESSENNE 2017-10-19  1224  			cryp->last_ctr[1]++;
9e054ec21ef8344 Fabien DESSENNE 2017-10-19  1225  			if (!cryp->last_ctr[1])
9e054ec21ef8344 Fabien DESSENNE 2017-10-19  1226  				cryp->last_ctr[0]++;
9e054ec21ef8344 Fabien DESSENNE 2017-10-19  1227  		}
9e054ec21ef8344 Fabien DESSENNE 2017-10-19  1228  
9e054ec21ef8344 Fabien DESSENNE 2017-10-19  1229  		cr = stm32_cryp_read(cryp, CRYP_CR);
9e054ec21ef8344 Fabien DESSENNE 2017-10-19  1230  		stm32_cryp_write(cryp, CRYP_CR, cr & ~CR_CRYPEN);
9e054ec21ef8344 Fabien DESSENNE 2017-10-19  1231  
9e054ec21ef8344 Fabien DESSENNE 2017-10-19 @1232  		stm32_cryp_hw_write_iv(cryp, (u32 *)cryp->last_ctr);
9e054ec21ef8344 Fabien DESSENNE 2017-10-19  1233  
9e054ec21ef8344 Fabien DESSENNE 2017-10-19  1234  		stm32_cryp_write(cryp, CRYP_CR, cr);
9e054ec21ef8344 Fabien DESSENNE 2017-10-19  1235  	}
9e054ec21ef8344 Fabien DESSENNE 2017-10-19  1236  
9e054ec21ef8344 Fabien DESSENNE 2017-10-19  1237  	cryp->last_ctr[0] = stm32_cryp_read(cryp, CRYP_IV0LR);
9e054ec21ef8344 Fabien DESSENNE 2017-10-19  1238  	cryp->last_ctr[1] = stm32_cryp_read(cryp, CRYP_IV0RR);
9e054ec21ef8344 Fabien DESSENNE 2017-10-19  1239  	cryp->last_ctr[2] = stm32_cryp_read(cryp, CRYP_IV1LR);
9e054ec21ef8344 Fabien DESSENNE 2017-10-19  1240  	cryp->last_ctr[3] = stm32_cryp_read(cryp, CRYP_IV1RR);
9e054ec21ef8344 Fabien DESSENNE 2017-10-19  1241  }
9e054ec21ef8344 Fabien DESSENNE 2017-10-19  1242  

:::::: The code at line 1232 was first introduced by commit
:::::: 9e054ec21ef8344345b28603fb272fe999f735db crypto: stm32 - Support for STM32 CRYP crypto module

:::::: TO: Fabien DESSENNE <fabien.dessenne@...com>
:::::: CC: Herbert Xu <herbert@...dor.apana.org.au>

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

Download attachment ".config.gz" of type "application/gzip" (31907 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ