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] [thread-next>] [day] [month] [year] [list]
Message-ID: <YSf/Mps9E77/6kZX@lunn.ch>
Date:   Thu, 26 Aug 2021 22:53:06 +0200
From:   Andrew Lunn <andrew@...n.ch>
To:     Saravana Kannan <saravanak@...gle.com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Linus Walleij <linus.walleij@...aro.org>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        Vladimir Oltean <olteanv@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>, Len Brown <lenb@...nel.org>,
        Alvin Sipraga <ALSI@...g-olufsen.dk>, kernel-team@...roid.com,
        linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
        linux-acpi@...r.kernel.org
Subject: Re: [PATCH v1 1/2] driver core: fw_devlink: Add support for
 FWNODE_FLAG_BROKEN_PARENT

> The  DT node in [2] is probed by realtek_smi_probe() [3]. The call flow is:
> realtek_smi_probe()
>   -> dsa_register_switch()
>     -> dsa_switch_probe()
>       -> dsa_tree_setup()
>         -> dsa_tree_setup_switches()
>           -> dsa_switch_setup()
>             -> ds->ops->setup(ds)
>               -> rtl8366rb_setup()
>                 -> realtek_smi_setup_mdio()
>                   -> of_mdiobus_register()
>                      This scans the MDIO bus/DT and device_add()s the PHYs
>           -> dsa_port_setup()
>             -> dsa_port_link_register_of()
>               -> dsa_port_phylink_register()
>                 -> phylink_of_phy_connect()
>                   -> phylink_fwnode_phy_connect()
>                     -> phy_attach_direct()
>                        This checks if PHY device has already probed (by
>                        checking for dev->driver). If not, it forces the
>                        probe of the PHY using one of the generic PHY
>                        drivers.
> 
> So within dsa_register_switch() the PHY device is added and then
> expected to have probed in the same thread/calling context. As stated
> earlier, this is not guaranteed by the driver core.

Have you looked at:

commit 16983507742cbcaa5592af530872a82e82fb9c51
Author: Heiner Kallweit <hkallweit1@...il.com>
Date:   Fri Mar 27 01:00:22 2020 +0100

    net: phy: probe PHY drivers synchronously

See the full commit message, but the code change is:

iff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index 3b8f6b0b47b5..d543df282365 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -2577,6 +2577,7 @@ int phy_driver_register(struct phy_driver *new_driver, struct module *owner)
        new_driver->mdiodrv.driver.probe = phy_probe;
        new_driver->mdiodrv.driver.remove = phy_remove;
        new_driver->mdiodrv.driver.owner = owner;
+       new_driver->mdiodrv.driver.probe_type = PROBE_FORCE_SYNCHRONOUS;
 
        retval = driver_register(&new_driver->mdiodrv.driver);
        if (retval) {

How does this add to the overall picture?

    Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ