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: Wed, 19 Jun 2024 18:59:28 +0300
From: Vladimir Oltean <olteanv@...il.com>
To: Lukasz Majewski <lukma@...x.de>
Cc: Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
	Paolo Abeni <pabeni@...hat.com>, Eric Dumazet <edumazet@...gle.com>,
	"David S. Miller" <davem@...emloft.net>,
	Oleksij Rempel <o.rempel@...gutronix.de>, Tristram.Ha@...rochip.com,
	Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
	Simon Horman <horms@...nel.org>,
	Dan Carpenter <dan.carpenter@...aro.org>,
	"Ricardo B. Marliere" <ricardo@...liere.net>,
	Casper Andersson <casper.casan@...il.com>,
	linux-kernel@...r.kernel.org,
	Woojung Huh <woojung.huh@...rochip.com>,
	UNGLinuxDriver@...rochip.com, Andrew Lunn <andrew@...n.ch>
Subject: Re: [PATCH v2 net-next] net: dsa: Allow only up to two HSR HW
 offloaded ports for KSZ9477

On Wed, Jun 19, 2024 at 06:48:14PM +0300, Vladimir Oltean wrote:
> Granted, this isn't an actual functional problem, but given that you
> are fixing a newly developed feature for net-next, and that this is API
> that gets progressively harder to change as more devices implement
> offloads, I would expect a more obvious signaling mechanism to exist
> for this, and now seems a good time to do it, rather than opting for the
> most minimal fix.

Actually I'm not even so sure about this basic fact, that it isn't a
functional problem already.

xrs700x_hsr_join() has explicit checks for port 1 and 2. Obviously it
expects those ports to be ring ports.

But if you configure from user space ports 0 and 1 to be ring ports,
and port 2 to be an interlink port, the kernel will accept that
configuration. It will return -EOPNOTSUPP for port 0, falling back to
software mode for the first ring port, then accept offload for ring
ports 1 and 2. But it doesn't match what user space requested, because
port 2 should be interlink...

I think you really should pass the port type down to drivers and reject
offloading interlink ports...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ