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]
Date: Thu, 21 Mar 2024 15:06:30 +0300
From: Alexandra Diupina <adiupina@...ralinux.ru>
To: Florian Fainelli <f.fainelli@...il.com>, Andrew Lunn <andrew@...n.ch>
Cc: Vladimir Oltean <olteanv@...il.com>, "David S. Miller"
 <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
 Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
 Sebastian Reichel <sre@...nel.org>, netdev@...r.kernel.org,
 linux-kernel@...r.kernel.org, lvc-project@...uxtesting.org
Subject: Re: [PATCH] net: dsa: add return value check of genphy_read_status()



21/03/24 02:48, Florian Fainelli пишет:
>
>
> On 15/03/2024 03:25, Александра Дюпина wrote:
>> Hello, Andrew!
>
> (please do not top-post)
>
>>
>> The dsa_register_switch() function is used in various DSA
>> drivers (in probe function), so it is necessary to check all
>> possible errors. If the return value (may be an error code)
>> of genphy_read_status() is not checked in
>> dsa_shared_port_fixed_link_register_of(), a possible error
>> in dsa_register_switch() may be missed.
>
> This is not a path that will fail, because the fixed PHY emulation 
> layer is not a real piece of hardware, therefore no MDIO read could 
> really cause a problem here. I don't have a strong opinion however if 
> you want to propagate it properly.

Hi, Florian!
I would like to make sure that I have understood you correctly. Checking 
the return value of genphy_read_status() in 
dsa_shared_port_fixed_link_register_of() is not needed because 
dsa_shared_port_fixed_link_register_of() is called if 
of_phy_is_fixed_link()==true (this means that the PHY emulation layer is 
used, link is registered by of_phy_register_fixed_link() without errors 
and therefore there cannot be an error in genphy_read_status()). Right?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ