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] [thread-next>] [day] [month] [year] [list]
Message-ID: <aRJfrUQ0hSKETbxp@shell.armlinux.org.uk>
Date: Mon, 10 Nov 2025 21:57:01 +0000
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Heiner Kallweit <hkallweit1@...il.com>
Cc: Andrew Lunn <andrew@...n.ch>, Jakub Kicinski <kuba@...nel.org>,
	Paolo Abeni <pabeni@...hat.com>, Eric Dumazet <edumazet@...gle.com>,
	David Miller <davem@...emloft.net>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next] net: phy: fixed_phy: use genphy_read_abilities
 to simplify the code

On Mon, Nov 10, 2025 at 10:11:24PM +0100, Heiner Kallweit wrote:
> Populating phy->supported can be achieved easier by using
> genphy_read_abilities().

Are you sure about that?

> -	switch (status->speed) {
> -	case SPEED_1000:
> -		linkmode_set_bit(ETHTOOL_LINK_MODE_1000baseT_Half_BIT,
> -				 phy->supported);
> -		linkmode_set_bit(ETHTOOL_LINK_MODE_1000baseT_Full_BIT,
> -				 phy->supported);
> -		fallthrough;
> -	case SPEED_100:
> -		linkmode_set_bit(ETHTOOL_LINK_MODE_100baseT_Half_BIT,
> -				 phy->supported);
> -		linkmode_set_bit(ETHTOOL_LINK_MODE_100baseT_Full_BIT,
> -				 phy->supported);
> -		fallthrough;
> -	case SPEED_10:
> -	default:
> -		linkmode_set_bit(ETHTOOL_LINK_MODE_10baseT_Half_BIT,
> -				 phy->supported);
> -		linkmode_set_bit(ETHTOOL_LINK_MODE_10baseT_Full_BIT,
> -				 phy->supported);

This code sets both HD and FD for each speed, and if at 1G it sets
100M and 10M as well, if at 100M, it sets 10M as well.

However, swphy emulation (including what was reported through BMSR
and ESTAT) has only ever indicated one speed and duplex supported
via the normal ability bits in these registers. So, "simplifying"
the code introduces user visible changes. This needs to be mentioned
in the commit message.

The next questions are:
1. does this difference matter?
2. is it a bug fix?
3. is swphy wrong?

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ