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 07:39:43 -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 07/13] net: ethtool: Introduce a command to
 list PHYs on an interface

On Fri, 5 Jan 2024 10:43:11 +0100 Maxime Chevallier wrote:
> > > +static int ethnl_phy_parse_request(struct ethnl_req_info *req_base,
> > > +				   struct nlattr **tb)
> > > +{
> > > +	struct phy_link_topology *topo = &req_base->dev->link_topo;
> > > +	struct phy_req_info *req_info = PHY_REQINFO(req_base);
> > > +	struct phy_device_node *pdn;
> > > +
> > > +	if (!req_base->phydev)
> > > +		return 0;    
> > 
> > The PHY INDEX should probably be a required attr, with 
> > GENL_REQ_ATTR_CHECK()? Without phydev being specified
> > what's the point?  
> 
> We can still have a phydev without passing a PHY INDEX, this would
> report information on the netdev->phydev device, that can be helpful
> for users to know which PHY is targeted by commands such as "ethtool
> --cable-test eth0" when no PHY index is passed

But req_base->phydev will be netdev->phydev if user didn't specify 
the index. Are you saying this is for commands which can operate
on netdevs as well as on PHYs (e.g. "integrated NICs" which don't
user phylib?)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ