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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <df1f93ec-e360-4cb3-adf4-454f427851dc@lunn.ch>
Date: Fri, 19 Sep 2025 14:45:12 +0200
From: Andrew Lunn <andrew@...n.ch>
To: yicongsrfy@....com
Cc: linux@...linux.org.uk, Frank.Sae@...or-comm.com, davem@...emloft.net,
	edumazet@...gle.com, hkallweit1@...il.com, kuba@...nel.org,
	linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
	pabeni@...hat.com, yicong@...inos.cn
Subject: Re: [PATCH] net: phy: avoid config_init failure on unattached PHY
 during resume

> Since this issue cannot be fundamentally resolved within phylib,
> we need to seek a solution within the PHY driver itself.

How about this...

Allow a node in DT which looks like this:

mdio {
	phy@0 {
		# Broadcast address, ignore
		compatible = "ethernet-phy-idffff.ffff";
		reg = <0>;
	}

	phy@16 {
		# The real address of the PHY
		reg = <16>;
	}
}

The idea being, you can use a compatible to correct the ID of a PHY.
The ID of mostly F is considered to mean there is no PHY there, its
just the pull-up resistor on the data line. So the PHY is returning
the wrong ID...

of_mdiobus_child_is_phy() then needs to change from a bool to an int,
and return -ENODEV for "ethernet-phy-idffff.ffff", and the caller
needs to correctly handle that and not create the device.

I would also suggest the PHY driver disables the broadcast address
when it gets probed on its real address.

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ