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
| ||
|
Date: Tue, 30 Jun 2020 02:45:43 +0200 From: Andrew Lunn <andrew@...n.ch> To: Claudiu Beznea <claudiu.beznea@...rochip.com> Cc: f.fainelli@...il.com, hkallweit1@...il.com, linux@...linux.org.uk, robh+dt@...nel.org, frowand.list@...il.com, netdev@...r.kernel.org, devicetree@...r.kernel.org, linux-kernel@...r.kernel.org Subject: Re: [PATCH] of: of_mdio: count number of regitered phys On Mon, Jun 29, 2020 at 10:26:36AM +0300, Claudiu Beznea wrote: > In case of_mdiobus_register_phy()/of_mdiobus_register_device() > returns -ENODEV for all PHYs in device tree or for all scanned > PHYs there is a chance that of_mdiobus_register() to > return success code although no PHY devices were registered. > Add a counter that increments every time a PHY was registered > to avoid the above scenario. Hi Claudiu There is a danger here this will break something. Without this patch, an empty bus is O.K. But with this patch, a bus without a PHY is a problem. Take for example FEC. It often comes in pairs. Each has an MDIO bus. But to save pins, there are some designs which place two PHYs on one bus, leaving the other empty. The driver unconditionally calls of_mdiobus_register() and if it returns an error, it will error out the probe. So i would not be too surprised if you get reports of missing interfaces with this patch. Andrew
Powered by blists - more mailing lists