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: <jzehwqghd7fgtsco6atgxhsttlwy4ydrlr4tage2d7i7z5qhgj@dktcsfhppyeh>
Date: Sun, 16 Nov 2025 21:09:50 +0000
From: Andre Carvalho <asantostc@...il.com>
To: Breno Leitao <leitao@...ian.org>, Andrew Lunn <andrew+netdev@...n.ch>, 
	"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, 
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Shuah Khan <shuah@...nel.org>, 
	Simon Horman <horms@...nel.org>
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org, 
	linux-kselftest@...r.kernel.org
Subject: Re: [PATCH net-next v4 4/5] netconsole: resume previously
 deactivated target

On Sun, Nov 16, 2025 at 05:14:04PM +0000, Andre Carvalho wrote:
>  /* Handle network interface device notifications */
>  static int netconsole_netdev_event(struct notifier_block *this,
>  				   unsigned long event, void *ptr)
>  {
> -	unsigned long flags;
> -	struct netconsole_target *nt, *tmp;
>  	struct net_device *dev = netdev_notifier_info_to_dev(ptr);
> +	struct netconsole_target *nt, *tmp;
> +	LIST_HEAD(resume_list);
>  	bool stopped = false;
> +	unsigned long flags;
>  
>  	if (!(event == NETDEV_CHANGENAME || event == NETDEV_UNREGISTER ||
> -	      event == NETDEV_RELEASE || event == NETDEV_JOIN))
> +	      event == NETDEV_RELEASE || event == NETDEV_JOIN ||
> +	      event == NETDEV_UP))
>  		goto done;
>  
>  	mutex_lock(&target_cleanup_list_lock);
> @@ -1475,6 +1537,11 @@ static int netconsole_netdev_event(struct notifier_block *this,
>  				stopped = true;
>  			}
>  		}
> +		if (event == NETDEV_UP && deactivated_target_match(nt, dev))
> +			/* maybe_resume_target is IRQ unsafe, remove target from
> +			 * target_list in order to resume it with IRQ enabled.
> +			 */
> +			list_move(&nt->list, &resume_list);
>  		netconsole_target_put(nt);
>  	}

I've noticed the test failure in CI (test #4 in netcons-over-bonding-sh) 
and I'm able to reproduce it locally. I was only running 'drivers/net' and missed
'drivers/net/bonding' netconsole tests locally - will adjust my tests to always
include those. They are certainly related to this changes.

Looking at logs, it seems like we re-enable the target before the interface is enslaved:

[   28.707460] netconsole: netconsole: local port 6665
[   28.707472] netconsole: netconsole: local IPv4 address 192.0.2.1
[   28.707479] netconsole: netconsole: interface name 'nsim950'
[   28.707483] netconsole: netconsole: local ethernet address '00:00:00:00:00:00'
[   28.707487] netconsole: netconsole: remote port 6666
[   28.707490] netconsole: netconsole: remote IPv4 address 192.0.2.2
[   28.707494] netconsole: netconsole: remote ethernet address 4a:00:f1:39:50:c4
[   28.707502] netpoll: netconsole: device nsim950 not up yet, forcing it
[   28.717516] netconsole: network logging started
[   28.740938] netconsole: network logging stopped on interface nsim950 as it is joining a master device
[   28.741034] netconsole: network logging resumed on interface nsim950
[   28.741076] bond_tx_25: (slave nsim950): Enslaving as an active interface with an up link
[   28.752003] printk: legacy console [netcon_ext0] disabled

I'll debug some more to understand this a bit better and think how to address it. Perhaps the
target needs to be DISABLED instead of DEACTIVATED when handling NETDEV_JOIN.

-- 
Andre Carvalho

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ