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] [day] [month] [year] [list]
Message-ID: <f5454635-a857-b563-0a44-6dc135872b1d@gmail.com>
Date:   Wed, 10 Nov 2021 09:14:23 +0100
From:   Heiner Kallweit <hkallweit1@...il.com>
To:     Bastian Germann <bage@...utronix.de>, Andrew Lunn <andrew@...n.ch>
Cc:     Russell King <linux@...linux.org.uk>, davem@...emloft.net,
        netdev@...r.kernel.org,
        Benedikt Spranger <b.spranger@...utronix.de>
Subject: Re: [PATCH] phy: phy_ethtool_ksettings_set: Don't discard
 phy_start_aneg's return

On 08.11.2021 15:25, Bastian Germann wrote:
> Am 06.11.21 um 22:52 schrieb Heiner Kallweit:
>> On 05.11.2021 16:36, bage@...utronix.de wrote:
>>> From: Bastian Germann <bage@...utronix.de>
>>>
>>> Take the return of phy_start_aneg into account so that ethtool will handle
>>> negotiation errors and not silently accept invalid input.
>>>
>>> Fixes: 2d55173e71b0 ("phy: add generic function to support ksetting support")
>>> Signed-off-by: Bastian Germann <bage@...utronix.de>
>>> Reviewed-by: Benedikt Spranger <b.spranger@...utronix.de>
>>
>> In addition to what Andrew said already:
>>
>> - This patch won't apply on net due to a4db9055fdb9.
> 
> Hi Heiner,
> 
> Thanks for your remarks. I would have gotten the first one right if the netdev
> tree was documented in the MAINTAINERS file (T: ...) and not only in netdev-FAQ.
> 
> Maybe you want to address that.
> 

I'd interpret the MAINTAINERS structure in a way that if no T: entry is given
the one from the next upper directory should be used. And for drivers/net/
the T: entries are available.

It's a typical case that a subsystem has a bigger number of drivers which
use the repo of the subsystem, and just few drivers have an own repo,
working with pull requests.
IMO having to add the subsystem T: entries to every driver entry would be
not needed overhead.

Not sure however which userspace tools use the T: entries and whether they are
smart enough to consider entry hierarchies.

> Thanks,
> Bastian
> 
>> - Patch misses the "net" annotation.
>> - Prefix should be "net: phy:", not "phy:".
>>
>> At least the formal aspects should have been covered by the internal review.
>>
>>> ---
>>>   drivers/net/phy/phy.c | 6 ++++--
>>>   1 file changed, 4 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
>>> index a3bfb156c83d..f740b533abba 100644
>>> --- a/drivers/net/phy/phy.c
>>> +++ b/drivers/net/phy/phy.c
>>> @@ -770,6 +770,8 @@ static int phy_poll_aneg_done(struct phy_device *phydev)
>>>   int phy_ethtool_ksettings_set(struct phy_device *phydev,
>>>                     const struct ethtool_link_ksettings *cmd)
>>>   {
>>> +    int ret = 0;
>>
>> Why initializing ret?
>>
>>> +
>>>       __ETHTOOL_DECLARE_LINK_MODE_MASK(advertising);
>>>       u8 autoneg = cmd->base.autoneg;
>>>       u8 duplex = cmd->base.duplex;
>>> @@ -815,10 +817,10 @@ int phy_ethtool_ksettings_set(struct phy_device *phydev,
>>>       phydev->mdix_ctrl = cmd->base.eth_tp_mdix_ctrl;
>>>         /* Restart the PHY */
>>> -    _phy_start_aneg(phydev);
>>> +    ret = _phy_start_aneg(phydev);
>>>         mutex_unlock(&phydev->lock);
>>> -    return 0;
>>> +    return ret;
>>>   }
>>>   EXPORT_SYMBOL(phy_ethtool_ksettings_set);
>>>  
>>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ