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: <20240904194717.60ba4df6@fedora.home>
Date: Wed, 4 Sep 2024 19:47:17 +0200
From: Maxime Chevallier <maxime.chevallier@...tlin.com>
To: Michal Kubecek <mkubecek@...e.cz>
Cc: davem@...emloft.net, netdev@...r.kernel.org,
 linux-kernel@...r.kernel.org, thomas.petazzoni@...tlin.com, Andrew Lunn
 <andrew@...n.ch>, Jakub Kicinski <kuba@...nel.org>, 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>, 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 ethtool-next v2 3/3] ethtool: Introduce a command to
 list PHYs

Hello Michal,

On Mon, 2 Sep 2024 00:07:56 +0200
Michal Kubecek <mkubecek@...e.cz> wrote:

> On Wed, Aug 28, 2024 at 05:25:10PM +0200, Maxime Chevallier wrote:
> > It is now possible to list all Ethernet PHYs that are present behind a
> > given interface, since the following linux commit :
> > 63d5eaf35ac3 ("net: ethtool: Introduce a command to list PHYs on an interface")
> > 
> > This command relies on the netlink DUMP command to list them, by allowing to
> > pass an interface name/id as a parameter in the DUMP request to only
> > list PHYs on one interface.
> > 
> > Therefore, we introduce a new helper function to prepare a interface-filtered
> > dump request (the filter can be empty, to perform an unfiltered dump),
> > and then uses it to implement PHY enumeration through the --show-phys
> > command.
> > 
> > Signed-off-by: Maxime Chevallier <maxime.chevallier@...tlin.com>
> > ---  
> [...]
> > diff --git a/netlink/extapi.h b/netlink/extapi.h
> > index c882295..fd99610 100644
> > --- a/netlink/extapi.h
> > +++ b/netlink/extapi.h
> > @@ -56,6 +56,7 @@ int nl_set_mm(struct cmd_context *ctx);
> >  int nl_gpse(struct cmd_context *ctx);
> >  int nl_spse(struct cmd_context *ctx);
> >  int nl_flash_module_fw(struct cmd_context *ctx);
> > +int nl_get_phy(struct cmd_context *ctx);
> >  
> >  void nl_monitor_usage(void);
> >    
> 
> Please add also a fallback to !ETHTOOL_ENABLE_NETLINK branch, similar
> to other netlink handlers, so that a build with --disable-netlink does
> not fail.

You're right, I'll add a fallback for that. I actually just faced that
exact issue trying to build this patchset using a fresh buildroot
setup, having forgotten to add netlink libraries.

Thanks for the reviews,

Maxime

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ