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: <20250704124336.GL41770@horms.kernel.org>
Date: Fri, 4 Jul 2025 13:43:36 +0100
From: Simon Horman <horms@...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>, Jakub Kicinski <kuba@...nel.org>,
	Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
	Russell King <linux@...linux.org.uk>,
	Florian Fainelli <f.fainelli@...il.com>,
	Heiner Kallweit <hkallweit1@...il.com>,
	Vladimir Oltean <vladimir.oltean@....com>,
	Köry Maincent <kory.maincent@...tlin.com>,
	Oleksij Rempel <o.rempel@...gutronix.de>,
	Shuah Khan <shuah@...nel.org>, linux-kselftest@...r.kernel.org
Subject: Re: [PATCH net-next 1/3] net: netdevsim: Add PHY support in netdevsim

On Wed, Jul 02, 2025 at 10:28:03AM +0200, Maxime Chevallier wrote:
> With the introduction of phy_link_topology, we have the ability to keep
> track of PHY devices that sit behind a net_device. While we still can
> only attach one single PHY to a netdev, we can look at all these PHYs
> through netlink, with the ETHTOOL_MSG_PHY_GET command.
> 
> Moreover, netlink commands that are targeting PHY devices also now
> allow specifying which PHY we want to address in a given netlink
> command.
> 
> That whole process comes with its own complexity, and a few bugs were
> dicovered over the months following the introduction of

Hi Maxime,

As it seems like there will be a v2 anyway: discovered

> phy_link_topology.

...

> +static struct phy_driver nsim_virtual_phy_drv[] = {
> +	{
> +		.name			= "Netdevsim virtual PHY driver",
> +		.get_features		= nsim_get_features,
> +		.match_phy_device	= nsim_match_phy_device,
> +		.config_aneg		= nsim_config_aneg,
> +		.read_status		= nsim_read_status,
> +	},
> +};
> +
> +module_phy_driver(nsim_virtual_phy_drv);

I see that this has been flagged by Kernel Test Robot,
but as I had already written most of this it seems worth sending anyway.

I am somewhat guessing at the why here, but
I see build failures with this patch applied:

ld: drivers/net/netdevsim/phy.o: in function `phy_module_init':
phy.c:(.init.text+0x0): multiple definition of `init_module'; drivers/net/netdevsim/netdev.o:netdev.c:(.init.text+0x0): first defined here
ld: drivers/net/netdevsim/phy.o: in function `phy_module_exit':
phy.c:(.exit.text+0x0): multiple definition of `cleanup_module'; drivers/net/netdevsim/netdev.o:netdev.c:(.exit.text+0x0): first defined here

I am guessing that this is because above module_phy_driver() will define
init_module and phy_module_exit functions.  But the following lines near
the end of drivers/net/netdevsim/netdev.c also define functions with those
names.

module_init(nsim_module_init);
module_exit(nsim_module_exit);

...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ