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-prev] [day] [month] [year] [list]
Date:   Fri, 25 Sep 2020 15:38:58 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     kbuild@...ts.01.org, Dan Murphy <dmurphy@...com>,
        davem@...emloft.net, andrew@...n.ch, f.fainelli@...il.com,
        hkallweit1@...il.com
Cc:     lkp@...el.com, kbuild-all@...ts.01.org, mkubecek@...e.cz,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        Dan Murphy <dmurphy@...com>
Subject: [kbuild] Re: [PATCH net-next v4 1/2] net: phy: dp83869: support Wake
 on LAN

Hi Dan,

url:    https://github.com/0day-ci/linux/commits/Dan-Murphy/DP83869-WoL-and-Speed-optimization/20200925-002844 
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git  3fc826f121d89c5aa4afd7b3408b07e0ff59466b
config: x86_64-randconfig-m001-20200925 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

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

New smatch warnings:
drivers/net/phy/dp83869.c:205 dp83869_set_wol() warn: impossible condition '(val_rxcfg < 0) => (0-u16max < 0)'
drivers/net/phy/dp83869.c:209 dp83869_set_wol() warn: impossible condition '(val_micr < 0) => (0-u16max < 0)'
drivers/net/phy/dp83869.c:301 dp83869_get_wol() warn: impossible condition '(value < 0) => (0-u16max < 0)'
drivers/net/phy/dp83869.c:318 dp83869_get_wol() warn: impossible condition '(sopass_val < 0) => (0-u16max < 0)'

Old smatch warnings:
drivers/net/phy/dp83869.c:328 dp83869_get_wol() warn: impossible condition '(sopass_val < 0) => (0-u16max < 0)'
drivers/net/phy/dp83869.c:338 dp83869_get_wol() warn: impossible condition '(sopass_val < 0) => (0-u16max < 0)'

vim +205 drivers/net/phy/dp83869.c

cfd39675171ca5b Dan Murphy 2020-09-24  196  static int dp83869_set_wol(struct phy_device *phydev,
cfd39675171ca5b Dan Murphy 2020-09-24  197  			   struct ethtool_wolinfo *wol)
cfd39675171ca5b Dan Murphy 2020-09-24  198  {
cfd39675171ca5b Dan Murphy 2020-09-24  199  	struct net_device *ndev = phydev->attached_dev;
cfd39675171ca5b Dan Murphy 2020-09-24  200  	u16 val_rxcfg, val_micr;
cfd39675171ca5b Dan Murphy 2020-09-24  201  	u8 *mac;
cfd39675171ca5b Dan Murphy 2020-09-24  202  	int ret;
cfd39675171ca5b Dan Murphy 2020-09-24  203  
cfd39675171ca5b Dan Murphy 2020-09-24  204  	val_rxcfg = phy_read_mmd(phydev, DP83869_DEVADDR, DP83869_RXFCFG);
cfd39675171ca5b Dan Murphy 2020-09-24 @205  	if (val_rxcfg < 0)
                                                    ^^^^^^^^^^^^^
This needs to be int instead of u16.

cfd39675171ca5b Dan Murphy 2020-09-24  206  		return val_rxcfg;
cfd39675171ca5b Dan Murphy 2020-09-24  207  
cfd39675171ca5b Dan Murphy 2020-09-24  208  	val_micr = phy_read(phydev, MII_DP83869_MICR);
cfd39675171ca5b Dan Murphy 2020-09-24 @209  	if (val_micr < 0)
cfd39675171ca5b Dan Murphy 2020-09-24  210  		return val_micr;
cfd39675171ca5b Dan Murphy 2020-09-24  211  
cfd39675171ca5b Dan Murphy 2020-09-24  212  	if (wol->wolopts & (WAKE_MAGIC | WAKE_MAGICSECURE | WAKE_UCAST |
cfd39675171ca5b Dan Murphy 2020-09-24  213  			    WAKE_BCAST)) {

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

_______________________________________________
kbuild mailing list -- kbuild@...ts.01.org
To unsubscribe send an email to kbuild-leave@...ts.01.org

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ