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: <20240105073432.671159e9@kernel.org>
Date: Fri, 5 Jan 2024 07:34:32 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Maxime Chevallier <maxime.chevallier@...tlin.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org,
 linux-kernel@...r.kernel.org, thomas.petazzoni@...tlin.com, Andrew Lunn
 <andrew@...n.ch>, Eric Dumazet <edumazet@...gle.com>, Paolo Abeni
 <pabeni@...hat.com>, Russell King <linux@...linux.org.uk>,
 linux-arm-kernel@...ts.infradead.org, Christophe Leroy
 <christophe.leroy@...roup.eu>, Herve Codina <herve.codina@...tlin.com>,
 Florian Fainelli <f.fainelli@...il.com>, Heiner Kallweit
 <hkallweit1@...il.com>, Vladimir Oltean <vladimir.oltean@....com>,
 Köry Maincent <kory.maincent@...tlin.com>, Jesse Brandeburg
 <jesse.brandeburg@...el.com>, Jonathan Corbet <corbet@....net>, Marek
 Behún <kabel@...nel.org>, Piergiorgio Beruto
 <piergiorgio.beruto@...il.com>, Oleksij Rempel <o.rempel@...gutronix.de>,
 Nicolò Veronese <nicveronese@...il.com>, Simon Horman
 <horms@...nel.org>
Subject: Re: [PATCH net-next v5 01/13] net: phy: Introduce ethernet link
 topology representation

On Fri, 5 Jan 2024 10:29:18 +0100 Maxime Chevallier wrote:
> I'll give it a try, it could be doable to try to keep the index for
> _some_ PHYs. I had a first try at this in the very first iteration, but
> that was lost when converting to xarray for the index management. Since
> the phy_device keeps track of its own index, we can try to re-use it,
> but I can see it becoming difficult if we destroy the topology when all
> PHYs are detached (after ndo_close).

What I was thinking is if phy already has phyindex, and that index is
unused in the xarray of netdev in question - try to use that phyindex
instead of allocating a new one?
IDK if phys can move between netdevs, or get freed/recreated
automatically - otherwise it should work? (If user unbinds and rebinds
the PHY driver for instance that's their fault, we can renumber).

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ