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]
Message-ID: <202410300125.K125vk3f-lkp@intel.com>
Date: Wed, 30 Oct 2024 01:57:29 +0800
From: kernel test robot <lkp@...el.com>
To: Romain Gantois <romain.gantois@...tlin.com>,
	Andrew Lunn <andrew@...n.ch>,
	Heiner Kallweit <hkallweit1@...il.com>,
	Russell King <linux@...linux.org.uk>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Dan Murphy <dmurphy@...com>,
	Florian Fainelli <f.fainelli@...il.com>
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
	netdev@...r.kernel.org,
	Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
	Maxime Chevallier <maxime.chevallier@...tlin.com>,
	linux-kernel@...r.kernel.org, stable@...r.kernel.org,
	Romain Gantois <romain.gantois@...tlin.com>
Subject: Re: [PATCH net] net: phy: dp83869: fix status reporting for
 1000base-x autonegotiation

Hi Romain,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 94c11e852955b2eef5c4f0b36cfeae7dcf11a759]

url:    https://github.com/intel-lab-lkp/linux/commits/Romain-Gantois/net-phy-dp83869-fix-status-reporting-for-1000base-x-autonegotiation/20241029-173146
base:   94c11e852955b2eef5c4f0b36cfeae7dcf11a759
patch link:    https://lore.kernel.org/r/20241029-dp83869-1000base-x-v1-1-fcafe360bd98%40bootlin.com
patch subject: [PATCH net] net: phy: dp83869: fix status reporting for 1000base-x autonegotiation
config: arm-randconfig-004-20241029 (https://download.01.org/0day-ci/archive/20241030/202410300125.K125vk3f-lkp@intel.com/config)
compiler: clang version 16.0.6 (https://github.com/llvm/llvm-project 7cbf1a2591520c2491aa35339f227775f4d3adf6)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241030/202410300125.K125vk3f-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202410300125.K125vk3f-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/net/phy/dp83869.c:197:3: warning: variable 'adv' is uninitialized when used here [-Wuninitialized]
                   adv |= DP83869_BP_FULL_DUPLEX;
                   ^~~
   drivers/net/phy/dp83869.c:174:9: note: initialize the variable 'adv' to silence this warning
           u32 adv;
                  ^
                   = 0
   1 warning generated.


vim +/adv +197 drivers/net/phy/dp83869.c

   168	
   169	static int dp83869_config_aneg(struct phy_device *phydev)
   170	{
   171		struct dp83869_private *dp83869 = phydev->priv;
   172		unsigned long *advertising;
   173		int err, changed = false;
   174		u32 adv;
   175	
   176		if (dp83869->mode != DP83869_RGMII_1000_BASE)
   177			return genphy_config_aneg(phydev);
   178	
   179		/* Forcing speed or duplex isn't supported in 1000base-x mode */
   180		if (phydev->autoneg != AUTONEG_ENABLE)
   181			return 0;
   182	
   183		/* In fiber modes, register locations 0xc0... get mapped to offset 0.
   184		 * Unfortunately, the fiber-specific autonegotiation advertisement
   185		 * register at address 0xc04 does not have the same bit layout as the
   186		 * corresponding standard MII_ADVERTISE register. Thus, functions such
   187		 * as genphy_config_advert() will write the advertisement register
   188		 * incorrectly.
   189		 */
   190		advertising = phydev->advertising;
   191	
   192		/* Only allow advertising what this PHY supports */
   193		linkmode_and(advertising, advertising,
   194			     phydev->supported);
   195	
   196		if (linkmode_test_bit(ETHTOOL_LINK_MODE_1000baseX_Full_BIT, advertising))
 > 197			adv |= DP83869_BP_FULL_DUPLEX;
   198		if (linkmode_test_bit(ETHTOOL_LINK_MODE_Pause_BIT, advertising))
   199			adv |= DP83869_BP_PAUSE;
   200		if (linkmode_test_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT, advertising))
   201			adv |= DP83869_BP_ASYMMETRIC_PAUSE;
   202	
   203		err = phy_modify_changed(phydev, DP83869_FX_ANADV,
   204					 DP83869_BP_FULL_DUPLEX | DP83869_BP_PAUSE |
   205					 DP83869_BP_ASYMMETRIC_PAUSE,
   206					 adv);
   207	
   208		if (err < 0)
   209			return err;
   210		else if (err)
   211			changed = true;
   212	
   213		return genphy_check_and_restart_aneg(phydev, changed);
   214	}
   215	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ