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:   Tue, 12 Nov 2019 22:06:24 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Jose Abreu <Jose.Abreu@...opsys.com>
Cc:     kbuild-all@...ts.01.org, netdev@...r.kernel.org
Subject: [net-next:master 1285/1291]
 drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c:760:32: sparse: sparse:
 restricted __le16 degrades to integer

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master
head:   ca22d6977b9b4ab0fd2e7909b57e32ba5b95046f
commit: a24cae7012b59bfe1aed01fe3fc13d81b7b97b08 [1285/1291] net: stmmac: Fix sparse warning
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.1-29-g781bc5d-dirty
        git checkout a24cae7012b59bfe1aed01fe3fc13d81b7b97b08
        make ARCH=x86_64 allmodconfig
        make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

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


sparse warnings: (new ones prefixed by >>)

>> drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c:760:32: sparse: sparse: restricted __le16 degrades to integer
--
>> drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c:594:32: sparse: sparse: restricted __le16 degrades to integer

vim +760 drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c

4ce84f4da7c472 Jose Abreu 2019-05-24  734  
c1be0022df0dae Jose Abreu 2019-09-10  735  static void dwmac4_update_vlan_hash(struct mac_device_info *hw, u32 hash,
a24cae7012b59b Jose Abreu 2019-11-11  736  				    __le16 perfect_match, bool is_double)
c1be0022df0dae Jose Abreu 2019-09-10  737  {
c1be0022df0dae Jose Abreu 2019-09-10  738  	void __iomem *ioaddr = hw->pcsr;
c1be0022df0dae Jose Abreu 2019-09-10  739  
c1be0022df0dae Jose Abreu 2019-09-10  740  	writel(hash, ioaddr + GMAC_VLAN_HASH_TABLE);
c1be0022df0dae Jose Abreu 2019-09-10  741  
c1be0022df0dae Jose Abreu 2019-09-10  742  	if (hash) {
c1be0022df0dae Jose Abreu 2019-09-10  743  		u32 value = GMAC_VLAN_VTHM | GMAC_VLAN_ETV;
c1be0022df0dae Jose Abreu 2019-09-10  744  		if (is_double) {
c1be0022df0dae Jose Abreu 2019-09-10  745  			value |= GMAC_VLAN_EDVLP;
c1be0022df0dae Jose Abreu 2019-09-10  746  			value |= GMAC_VLAN_ESVL;
c1be0022df0dae Jose Abreu 2019-09-10  747  			value |= GMAC_VLAN_DOVLTC;
c1be0022df0dae Jose Abreu 2019-09-10  748  		}
c1be0022df0dae Jose Abreu 2019-09-10  749  
c1be0022df0dae Jose Abreu 2019-09-10  750  		writel(value, ioaddr + GMAC_VLAN_TAG);
c7ab0b8088d7f0 Jose Abreu 2019-10-06  751  	} else if (perfect_match) {
c7ab0b8088d7f0 Jose Abreu 2019-10-06  752  		u32 value = GMAC_VLAN_ETV;
c7ab0b8088d7f0 Jose Abreu 2019-10-06  753  
c7ab0b8088d7f0 Jose Abreu 2019-10-06  754  		if (is_double) {
c7ab0b8088d7f0 Jose Abreu 2019-10-06  755  			value |= GMAC_VLAN_EDVLP;
c7ab0b8088d7f0 Jose Abreu 2019-10-06  756  			value |= GMAC_VLAN_ESVL;
c7ab0b8088d7f0 Jose Abreu 2019-10-06  757  			value |= GMAC_VLAN_DOVLTC;
c7ab0b8088d7f0 Jose Abreu 2019-10-06  758  		}
c7ab0b8088d7f0 Jose Abreu 2019-10-06  759  
c7ab0b8088d7f0 Jose Abreu 2019-10-06 @760  		writel(value | perfect_match, ioaddr + GMAC_VLAN_TAG);
c1be0022df0dae Jose Abreu 2019-09-10  761  	} else {
c1be0022df0dae Jose Abreu 2019-09-10  762  		u32 value = readl(ioaddr + GMAC_VLAN_TAG);
c1be0022df0dae Jose Abreu 2019-09-10  763  
c1be0022df0dae Jose Abreu 2019-09-10  764  		value &= ~(GMAC_VLAN_VTHM | GMAC_VLAN_ETV);
c1be0022df0dae Jose Abreu 2019-09-10  765  		value &= ~(GMAC_VLAN_EDVLP | GMAC_VLAN_ESVL);
c1be0022df0dae Jose Abreu 2019-09-10  766  		value &= ~GMAC_VLAN_DOVLTC;
c1be0022df0dae Jose Abreu 2019-09-10  767  		value &= ~GMAC_VLAN_VID;
c1be0022df0dae Jose Abreu 2019-09-10  768  
c1be0022df0dae Jose Abreu 2019-09-10  769  		writel(value, ioaddr + GMAC_VLAN_TAG);
c1be0022df0dae Jose Abreu 2019-09-10  770  	}
c1be0022df0dae Jose Abreu 2019-09-10  771  }
c1be0022df0dae Jose Abreu 2019-09-10  772  

:::::: The code at line 760 was first introduced by commit
:::::: c7ab0b8088d7f023f543013963f23aecc7e47efb net: stmmac: Fallback to VLAN Perfect filtering if HASH is not available

:::::: TO: Jose Abreu <joabreu@...opsys.com>
:::::: CC: David S. Miller <davem@...emloft.net>

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ