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: <202102091145.CI8Xz82i-lkp@intel.com>
Date:   Tue, 9 Feb 2021 11:07:56 +0800
From:   kernel test robot <lkp@...el.com>
To:     Kefeng Wang <wangkefeng.wang@...wei.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Palmer Dabbelt <palmerdabbelt@...gle.com>
Subject: drivers/scsi/bnx2i/bnx2i_hwi.c:220:9: sparse: sparse: cast from
 restricted __le32

Hi Kefeng,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   61556703b610a104de324e4f061dc6cf7b218b46
commit: ed1ed4c0da5447c5e322481ce2ef9f03336c6ffb riscv: mmiowb: Fix implicit declaration of function 'smp_processor_id'
date:   9 months ago
config: riscv-randconfig-s031-20210209 (attached as .config)
compiler: riscv64-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-215-g0fb77bb6-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ed1ed4c0da5447c5e322481ce2ef9f03336c6ffb
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout ed1ed4c0da5447c5e322481ce2ef9f03336c6ffb
        # 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=riscv 

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/scsi/bnx2i/bnx2i_hwi.c:220:9: sparse: sparse: cast from restricted __le32
   drivers/scsi/bnx2i/bnx2i_hwi.c:347:25: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned short [usertype] tsih @@     got restricted __be16 [usertype] tsih @@
   drivers/scsi/bnx2i/bnx2i_hwi.c:347:25: sparse:     expected unsigned short [usertype] tsih
   drivers/scsi/bnx2i/bnx2i_hwi.c:347:25: sparse:     got restricted __be16 [usertype] tsih
   drivers/scsi/bnx2i/bnx2i_hwi.c:350:24: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned short [usertype] cid @@     got restricted __be16 [usertype] cid @@
   drivers/scsi/bnx2i/bnx2i_hwi.c:350:24: sparse:     expected unsigned short [usertype] cid
   drivers/scsi/bnx2i/bnx2i_hwi.c:350:24: sparse:     got restricted __be16 [usertype] cid
   drivers/scsi/bnx2i/bnx2i_hwi.c:427:54: sparse: sparse: restricted itt_t degrades to integer
   drivers/scsi/bnx2i/bnx2i_hwi.c:430:39: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] ref_itt @@     got restricted itt_t [usertype] @@
   drivers/scsi/bnx2i/bnx2i_hwi.c:430:39: sparse:     expected unsigned int [usertype] ref_itt
   drivers/scsi/bnx2i/bnx2i_hwi.c:430:39: sparse:     got restricted itt_t [usertype]
   drivers/scsi/bnx2i/bnx2i_hwi.c:433:32: sparse: sparse: cast to restricted __be32
   drivers/scsi/bnx2i/bnx2i_hwi.c:433:32: sparse: sparse: cast to restricted __be32
   drivers/scsi/bnx2i/bnx2i_hwi.c:433:32: sparse: sparse: cast to restricted __be32
   drivers/scsi/bnx2i/bnx2i_hwi.c:433:32: sparse: sparse: cast to restricted __be32
   drivers/scsi/bnx2i/bnx2i_hwi.c:433:32: sparse: sparse: cast to restricted __be32
   drivers/scsi/bnx2i/bnx2i_hwi.c:433:32: sparse: sparse: cast to restricted __be32
   drivers/scsi/bnx2i/bnx2i_hwi.c:434:32: sparse: sparse: cast to restricted __be32
   drivers/scsi/bnx2i/bnx2i_hwi.c:434:32: sparse: sparse: cast to restricted __be32
   drivers/scsi/bnx2i/bnx2i_hwi.c:434:32: sparse: sparse: cast to restricted __be32
   drivers/scsi/bnx2i/bnx2i_hwi.c:434:32: sparse: sparse: cast to restricted __be32
   drivers/scsi/bnx2i/bnx2i_hwi.c:434:32: sparse: sparse: cast to restricted __be32
   drivers/scsi/bnx2i/bnx2i_hwi.c:434:32: sparse: sparse: cast to restricted __be32
   drivers/scsi/bnx2i/bnx2i_hwi.c:1350:48: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected restricted itt_t [usertype] @@     got int @@
   drivers/scsi/bnx2i/bnx2i_hwi.c:1350:48: sparse:     expected restricted itt_t [usertype]
   drivers/scsi/bnx2i/bnx2i_hwi.c:1350:48: sparse:     got int
   drivers/scsi/bnx2i/bnx2i_hwi.c:1446:45: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected restricted itt_t [usertype] @@     got int @@
   drivers/scsi/bnx2i/bnx2i_hwi.c:1446:45: sparse:     expected restricted itt_t [usertype]
   drivers/scsi/bnx2i/bnx2i_hwi.c:1446:45: sparse:     got int
   drivers/scsi/bnx2i/bnx2i_hwi.c:1513:50: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected restricted itt_t [usertype] @@     got int @@
   drivers/scsi/bnx2i/bnx2i_hwi.c:1513:50: sparse:     expected restricted itt_t [usertype]
   drivers/scsi/bnx2i/bnx2i_hwi.c:1513:50: sparse:     got int
   drivers/scsi/bnx2i/bnx2i_hwi.c:1573:47: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected restricted itt_t [usertype] @@     got int @@
   drivers/scsi/bnx2i/bnx2i_hwi.c:1573:47: sparse:     expected restricted itt_t [usertype]
   drivers/scsi/bnx2i/bnx2i_hwi.c:1573:47: sparse:     got int
   drivers/scsi/bnx2i/bnx2i_hwi.c:1612:46: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected restricted itt_t [usertype] @@     got int @@
   drivers/scsi/bnx2i/bnx2i_hwi.c:1612:46: sparse:     expected restricted itt_t [usertype]
   drivers/scsi/bnx2i/bnx2i_hwi.c:1612:46: sparse:     got int
   drivers/scsi/bnx2i/bnx2i_hwi.c:1627:26: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __be16 [usertype] t2wait @@     got restricted __be32 [usertype] @@
   drivers/scsi/bnx2i/bnx2i_hwi.c:1627:26: sparse:     expected restricted __be16 [usertype] t2wait
   drivers/scsi/bnx2i/bnx2i_hwi.c:1627:26: sparse:     got restricted __be32 [usertype]
   drivers/scsi/bnx2i/bnx2i_hwi.c:1628:28: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __be16 [usertype] t2retain @@     got restricted __be32 [usertype] @@
   drivers/scsi/bnx2i/bnx2i_hwi.c:1628:28: sparse:     expected restricted __be16 [usertype] t2retain
   drivers/scsi/bnx2i/bnx2i_hwi.c:1628:28: sparse:     got restricted __be32 [usertype]
   drivers/scsi/bnx2i/bnx2i_hwi.c:1657:46: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected restricted itt_t [usertype] @@     got int @@
   drivers/scsi/bnx2i/bnx2i_hwi.c:1657:46: sparse:     expected restricted itt_t [usertype]
   drivers/scsi/bnx2i/bnx2i_hwi.c:1657:46: sparse:     got int
   drivers/scsi/bnx2i/bnx2i_hwi.c:1707:29: sparse: sparse: cast from restricted itt_t
   drivers/scsi/bnx2i/bnx2i_hwi.c:1716:27: sparse: sparse: cast to restricted itt_t
   drivers/scsi/bnx2i/bnx2i_hwi.c:1812:25: sparse: sparse: cast from restricted itt_t
   drivers/scsi/bnx2i/bnx2i_hwi.c:1812:25: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int [usertype] val @@     got restricted itt_t [usertype] @@
   drivers/scsi/bnx2i/bnx2i_hwi.c:1812:25: sparse:     expected unsigned int [usertype] val
   drivers/scsi/bnx2i/bnx2i_hwi.c:1812:25: sparse:     got restricted itt_t [usertype]
   drivers/scsi/bnx2i/bnx2i_hwi.c:1812:25: sparse: sparse: cast from restricted itt_t
   drivers/scsi/bnx2i/bnx2i_hwi.c:1812:25: sparse: sparse: cast from restricted itt_t
   drivers/scsi/bnx2i/bnx2i_hwi.c:1812:25: sparse: sparse: cast from restricted itt_t
   drivers/scsi/bnx2i/bnx2i_hwi.c:1812:25: sparse: sparse: cast from restricted itt_t
   drivers/scsi/bnx2i/bnx2i_hwi.c:1837:44: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected restricted itt_t [usertype] @@     got int @@
   drivers/scsi/bnx2i/bnx2i_hwi.c:1837:44: sparse:     expected restricted itt_t [usertype]
   drivers/scsi/bnx2i/bnx2i_hwi.c:1837:44: sparse:     got int
   drivers/scsi/bnx2i/bnx2i_hwi.c:1909:43: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected restricted itt_t [usertype] @@     got int @@
   drivers/scsi/bnx2i/bnx2i_hwi.c:1909:43: sparse:     expected restricted itt_t [usertype]
   drivers/scsi/bnx2i/bnx2i_hwi.c:1909:43: sparse:     got int
   drivers/scsi/bnx2i/bnx2i_hwi.c:1979:44: sparse: sparse: cast from restricted itt_t

vim +220 drivers/scsi/bnx2i/bnx2i_hwi.c

cf4e6363859d30 Michael Chan 2009-06-08  208  
cf4e6363859d30 Michael Chan 2009-06-08  209  
cf4e6363859d30 Michael Chan 2009-06-08  210  static void bnx2i_ring_577xx_doorbell(struct bnx2i_conn *conn)
cf4e6363859d30 Michael Chan 2009-06-08  211  {
cf4e6363859d30 Michael Chan 2009-06-08  212  	struct bnx2i_5771x_dbell dbell;
cf4e6363859d30 Michael Chan 2009-06-08  213  	u32 msg;
cf4e6363859d30 Michael Chan 2009-06-08  214  
cf4e6363859d30 Michael Chan 2009-06-08  215  	memset(&dbell, 0, sizeof(dbell));
cf4e6363859d30 Michael Chan 2009-06-08  216  	dbell.dbell.header = (B577XX_ISCSI_CONNECTION_TYPE <<
cf4e6363859d30 Michael Chan 2009-06-08  217  			      B577XX_DOORBELL_HDR_CONN_TYPE_SHIFT);
cf4e6363859d30 Michael Chan 2009-06-08  218  	msg = *((u32 *)&dbell);
cf4e6363859d30 Michael Chan 2009-06-08  219  	/* TODO : get doorbell register mapping */
cf4e6363859d30 Michael Chan 2009-06-08 @220  	writel(cpu_to_le32(msg), conn->ep->qp.ctx_base);
cf4e6363859d30 Michael Chan 2009-06-08  221  }
cf4e6363859d30 Michael Chan 2009-06-08  222  

:::::: The code at line 220 was first introduced by commit
:::::: cf4e6363859d30f24f8cd3e8930dbff399cc3550 [SCSI] bnx2i: Add bnx2i iSCSI driver.

:::::: TO: Michael Chan <mchan@...adcom.com>
:::::: CC: James Bottomley <James.Bottomley@...senPartnership.com>

---
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" (35065 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ