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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250704144651.064e3c28@fedora.home>
Date: Fri, 4 Jul 2025 14:46:51 +0200
From: Maxime Chevallier <maxime.chevallier@...tlin.com>
To: Simon Horman <horms@...nel.org>
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

Hi Simon,

On Fri, 4 Jul 2025 13:43:36 +0100
Simon Horman <horms@...nel.org> wrote:

> 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

Thanks :)

> > 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);
> 
> ...

I just received the kernel test robot report indeed :( Thanks for the
investigation ! I'll rework that part, sorry about that :/

Maxime

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ