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: <20250826190717.fkhj3qowvljsuvj6@skbuf>
Date: Tue, 26 Aug 2025 22:07:17 +0300
From: Vladimir Oltean <olteanv@...il.com>
To: Yangfl <mmyangfl@...il.com>
Cc: "Russell King (Oracle)" <linux@...linux.org.uk>,
	Andrew Lunn <andrew@...n.ch>, netdev@...r.kernel.org,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>, Simon Horman <horms@...nel.org>,
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v6 3/3] net: dsa: yt921x: Add support for
 Motorcomm YT921x

On Mon, Aug 25, 2025 at 10:14:58PM +0800, Yangfl wrote:
> On Mon, Aug 25, 2025 at 2:14 AM Russell King (Oracle)
> <linux@...linux.org.uk> wrote:
> >
> > On Mon, Aug 25, 2025 at 12:38:20AM +0800, Yangfl wrote:
> > > They are used in phylink_get_caps(), since I don't want to declare a
> > > port which we know it does not exist on some chips. But the info_* set
> > > might be inlined and removed since it is not used elsewhere.
> >
> > The problem is... if you have a port in 0..N that DSA thinks should be
> > used, but is neither internal or external, DSA's initialisation of it
> > will fail, because without any caps declared for it, phylink_create()
> > will return an error, causing dsa_port_phylink_create() to fail,
> > dsa_shared_port_phylink_register() or dsa_user_phy_setup(),
> > dsa_shared_port_link_register_of() or dsa_user_create()... etc. It
> > eventually gets propagated up causing the entire switch probe to fail.
> >
> > Again... read the code!
> 
> What would you expect when you specify Port 0 in DT when only Port 1,
> 3, 8 are available on the chip (YT9213NB)? Probe error.

It depends. Unless the driver has logic which behaves otherwise, the
setup of user ports can fail and DSA will just skip them and bring up
the rest. See commit 86f8b1c01a0a ("net: dsa: Do not make user port
errors fatal"). The shared ports are more important and their setup
failures do lead to a switch setup abort though.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ