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: <fjv5oojsuazpdofdrgggwfcafw5vheus3wwzccq22aeztrbyew@yguz7qsd6djk>
Date: Thu, 4 Dec 2025 05:44:09 -0800
From: Breno Leitao <leitao@...ian.org>
To: Fabian Grünbichler <f.gruenbichler@...xmox.com>
Cc: "David S. Miller" <davem@...emloft.net>, 
	Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, 
	Paolo Abeni <pabeni@...hat.com>, leit@...a.com, open list <linux-kernel@...r.kernel.org>, 
	"open list:NETWORKING DRIVERS" <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next] net: veth: Disable netpoll support

hello Fabian,

On Thu, Dec 04, 2025 at 10:20:06AM +0100, Fabian Grünbichler wrote:
> On August 5, 2024 11:40 am, Breno Leitao wrote:
> > The current implementation of netpoll in veth devices leads to
> > suboptimal behavior, as it triggers warnings due to the invocation of
> > __netif_rx() within a softirq context. This is not compliant with
> > expected practices, as __netif_rx() has the following statement:
> > 
> > 	lockdep_assert_once(hardirq_count() | softirq_count());
> > 
> > Given that veth devices typically do not benefit from the
> > functionalities provided by netpoll, Disable netpoll for veth
> > interfaces.
> 
> this patch seems to have broken combining netconsole and bridges with
> veth ports:

Sorry about it, but, veth ends up calling __netif_rx() from a process
context, which kicks the lockdep above.

__netif_rx() should be only called from soft or hard IRQ, which is not
how netpoll operates. A printk message can be printed for any context.

> https://bugzilla.proxmox.com/show_bug.cgi?id=6873
> 
> any chance this is solvable?

I don't see a clear way to solve it from a netpoll point of view,
honestly.

>From a veth perspective, I am wonderig if veth_forward_skb() can call
netif_rx(), which seems to be safe in any context. Something as:

	diff --git a/drivers/net/veth.c b/drivers/net/veth.c
	index cc502bf022d5..cf6443e5d7bc 100644
	--- a/drivers/net/veth.c
	+++ b/drivers/net/veth.c
	@@ -318,7 +318,7 @@ static int veth_forward_skb(struct net_device *dev, struct sk_buff *skb,
	{
		return __dev_forward_skb(dev, skb) ?: xdp ?
			veth_xdp_rx(rq, skb) :
	-               __netif_rx(skb);
	+               netif_rx(skb);
	}

	/* return true if the specified skb has chances of GRO aggregation
	@@ -1734,7 +1734,6 @@ static void veth_setup(struct net_device *dev)
		dev->priv_flags |= IFF_LIVE_ADDR_CHANGE;
		dev->priv_flags |= IFF_NO_QUEUE;
		dev->priv_flags |= IFF_PHONY_HEADROOM;
	-       dev->priv_flags |= IFF_DISABLE_NETPOLL;
		dev->lltx = true;

		dev->netdev_ops = &veth_netdev_ops;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ