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: <57728908-1ae3-cbe9-8721-81f06ab688b8@gmail.com>
Date:   Wed, 2 Dec 2020 19:42:40 -0800
From:   Florian Fainelli <f.fainelli@...il.com>
To:     Grant Edwards <grant.b.edwards@...il.com>, netdev@...r.kernel.org
Subject: Re: net: macb: fail when there's no PHY



On 12/2/2020 7:03 PM, Grant Edwards wrote:
> On 2020-12-02, Andrew Lunn <andrew@...n.ch> wrote:
> 
>>>> So it will access the MDIO bus of the PHY that is attached to the
>>>> MAC.
>>>
>>> If that's the case, wouldn't the ioctl() calls "just work" even when
>>> only the fixed-phy mdio bus and fake PHY are declared in the device
>>> tree?
>>
>> The fixed-link PHY is connected to the MAC. So the IOCTL calls will be
>> made to the fixed-link fake MDIO bus.
> 
> Ah! When you said "the PHY that is attached to the MAC" above, I
> thought you meant electrically attached to the MAC via the mdio bus.
> 
> Then how does Forian Fainelli's solution below work? Won't the first
> phy found be the fixed one, and then the ioctl() calls will use the
> fixed-link bus?

You would have to have a local hack that intercepts the macb_ioctl() and
instead of calling phylink_mii_ioctl() it would have to implement a
custom ioctl() that does what drivers/net/phy/phy.c::phy_mii_ioctl does
except the mdiobus should be pointed to the MACB MDIO bus instance and
not be derived from the phy_device instance (because that one points to
the fixed PHY).
-- 
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ