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: Fri, 5 Jan 2024 10:30:45 +0100
From: Maxime Chevallier <maxime.chevallier@...tlin.com>
To: Jakub Kicinski <kuba@...nel.org>
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 05/13] net: ethtool: Allow passing a phy
 index for some commands

Hello Jakub,

On Thu, 4 Jan 2024 15:15:16 -0800
Jakub Kicinski <kuba@...nel.org> wrote:

> On Thu, 21 Dec 2023 19:00:38 +0100 Maxime Chevallier wrote:
> > @@ -20,6 +21,7 @@ const struct nla_policy ethnl_header_policy[] = {
> >  					    .len = ALTIFNAMSIZ - 1 },
> >  	[ETHTOOL_A_HEADER_FLAGS]	= NLA_POLICY_MASK(NLA_U32,
> >  							  ETHTOOL_FLAGS_BASIC),
> > +	[ETHTOOL_A_HEADER_PHY_INDEX]		= NLA_POLICY_MIN(NLA_U32, 1),
> >  };
> >  
> >  const struct nla_policy ethnl_header_policy_stats[] = {
> > @@ -28,6 +30,7 @@ const struct nla_policy ethnl_header_policy_stats[] = {
> >  					    .len = ALTIFNAMSIZ - 1 },
> >  	[ETHTOOL_A_HEADER_FLAGS]	= NLA_POLICY_MASK(NLA_U32,
> >  							  ETHTOOL_FLAGS_STATS),
> > +	[ETHTOOL_A_HEADER_PHY_INDEX]		= NLA_POLICY_MIN(NLA_U32, 1),
> >  };  
> 
> You should define (copy/paste) a new header policy and use it
> only for commands which actually make use of the PHY index.
> That's why we have separate copies already for stats.

Ah OK I didn't know that, I'll do this. Thanks !

Maxime

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ