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: <758cac1a76541e0e419a54af14d0cd20@walle.cc>
Date:   Sun, 14 Feb 2021 21:48:53 +0100
From:   Michael Walle <michael@...le.cc>
To:     Vladimir Oltean <olteanv@...il.com>
Cc:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        Andrew Lunn <andrew@...n.ch>,
        Heiner Kallweit <hkallweit1@...il.com>,
        Russell King <linux@...linux.org.uk>,
        "David S . Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>
Subject: Re: [PATCH net-next 2/2] net: phy: at803x: use proper locking in
 at803x_aneg_done()

Am 2021-02-14 03:24, schrieb Vladimir Oltean:
> On Sun, Feb 14, 2021 at 03:18:49AM +0100, Michael Walle wrote:
>> Am 14. Februar 2021 02:57:33 MEZ schrieb Vladimir Oltean 
>> <olteanv@...il.com>:
>> >Hi Michael,
>> >
>> >On Sun, Feb 14, 2021 at 02:04:05AM +0100, Michael Walle wrote:
>> >> at803x_aneg_done() checks if auto-negotiation is completed on the
>> >SGMII
>> >> side. This doesn't take the mdio bus lock and the page switching is
>> >> open-coded. Now that we have proper page support, just use
>> >> phy_read_paged(). Also use phydev->interface to check if we have an
>> >> SGMII link instead of reading the mode register and be a bit more
>> >> precise on the warning message.
>> >>
>> >> Signed-off-by: Michael Walle <michael@...le.cc>
>> >> ---
>> >
>> >How did you test this patch?
>> 
>> I'm afraid it's just compile time tested.
> 
> I'm asking because at803x_aneg_done has been dead code for more than 2
> years now. Unreachable. And while it was reachable it was buggy and an
> abuse of the phylib API. So you might want to just delete this function
> instead. Context:
> https://lkml.org/lkml/2020/5/30/375

Are you sure? While it isn't called from phylib, it might be called from
some drivers directly or indirectly if they use phy_speed_down(). But
it is questionable if this is much of a use then.

That being said, if no one objects, I'd remove it, too.

-michael

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ