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]
Date:   Mon, 20 Sep 2021 20:40:22 +0300
From:   Vladimir Oltean <olteanv@...il.com>
To:     Florian Fainelli <f.fainelli@...il.com>
Cc:     Rafał Miłecki <zajec5@...il.com>,
        Network Development <netdev@...r.kernel.org>,
        Andrew Lunn <andrew@...n.ch>,
        Heiner Kallweit <hkallweit1@...il.com>,
        Russell King <rmk+kernel@...linux.org.uk>,
        Saravana Kannan <saravanak@...gle.com>
Subject: Re: Race between "Generic PHY" and "bcm53xx" drivers after
 -EPROBE_DEFER

On Mon, Sep 20, 2021 at 10:14:48AM -0700, Florian Fainelli wrote:
> The SPROM is a piece of NVRAM that is intended to describe in a set of
> key/value pairs various platform configuration details. There can be up
> to 3 GMACs on the SoC which you can connect in a variety of ways towards
> internal/external PHYs or internal/external Ethernet switches. The SPROM
> is used to describe whether you connect to a regular PHY (not at PHY
> address 30 decimal, so not the Broadcom pseudo-PHY) or an Ethernet
> switch pseudo-PHY via MDIO.
> 
> What appears to be missing here is that we should not be executing this
> block of code for phyaddr == BGMAC_PHY_NOREGS because we will not have a
> PHY device proper to begin with and this collides with registering the
> b53_mdio driver.

Who provisions the SPROM exactly? It still seems pretty broken to me
that one of the GMACs has a bgmac->phyaddr pointing to a switch.
Special-casing the Broadcom switch seems not enough, the same thing
could happen with a Marvell switch or others. How about looking up the
device tree whether the bgmac->mii_bus' OF node has any child with a
"reg" of bgmac->phyaddr, and if it does, whether of_mdiobus_child_is_phy
actually returns true for it?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ