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: <90952624-d473-45b1-8bae-8fc31d36213f@gmail.com>
Date: Sun, 18 Feb 2024 18:31:53 +0100
From: Heiner Kallweit <hkallweit1@...il.com>
To: Andrew Lunn <andrew@...n.ch>
Cc: Pavan Chebbi <pavan.chebbi@...adcom.com>,
 Michael Chan <mchan@...adcom.com>, Jakub Kicinski <kuba@...nel.org>,
 David Miller <davem@...emloft.net>, Paolo Abeni <pabeni@...hat.com>,
 Eric Dumazet <edumazet@...gle.com>,
 Russell King - ARM Linux <linux@...linux.org.uk>,
 "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next] tg3: copy only needed fields from
 userspace-provided EEE data

On 18.02.2024 18:04, Andrew Lunn wrote:
> On Sun, Feb 18, 2024 at 03:49:55PM +0100, Heiner Kallweit wrote:
>> The current code overwrites fields in tp->eee with unchecked data from
>> edata, e.g. the bitmap with supported modes. ethtool properly returns
>> the received data from get_eee() call, but we have no guarantee that
>> other users of the ioctl set_eee() interface behave properly too.
>> Therefore copy only fields which are actually needed.
>>
>> Signed-off-by: Heiner Kallweit <hkallweit1@...il.com>
> 
> This one needed some time for me to understand. I missed that when
> programming the PHY to advertise, it is hard coded what it actually
> advertises. So there is no need to copy the advertise linkmode from
> edata.
> 
Especially as we have the following a few lines earlier:

    if (!linkmode_equal(edata->advertised, tp->eee.advertised)) {
                netdev_warn(tp->dev,
                            "Direct manipulation of EEE advertisement is not supported\n");
                return -EINVAL;
        }

> I suspect this driver is broken in that it does not wait for the
> result of the auto-neg to enable/disable EEE in the hardware. But it
> could be hiding somewhere in the code and i also missed that.
> 
> Reviewed-by: Andrew Lunn <andrew@...n.ch>
> 
>     Andrew


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ