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: <120f4e02-77cd-460f-809d-f0bf643884d1@kernel.org>
Date: Thu, 17 Apr 2025 12:02:08 +0200
From: Jesper Dangaard Brouer <hawk@...nel.org>
To: Toke Høiland-Jørgensen <toke@...hat.com>,
 Jakub Kicinski <kuba@...nel.org>
Cc: netdev@...r.kernel.org, bpf@...r.kernel.org, tom@...bertland.com,
 Eric Dumazet <eric.dumazet@...il.com>, "David S. Miller"
 <davem@...emloft.net>, Paolo Abeni <pabeni@...hat.com>, dsahern@...nel.org,
 makita.toshiaki@....ntt.co.jp, kernel-team@...udflare.com, phil@....cc
Subject: Re: [PATCH net-next V4 2/2] veth: apply qdisc backpressure on full
 ptr_ring to reduce TX drops



On 16/04/2025 15.58, Toke Høiland-Jørgensen wrote:
> Jakub Kicinski <kuba@...nel.org> writes:
> 
>> On Tue, 15 Apr 2025 15:45:05 +0200 Jesper Dangaard Brouer wrote:
>>> In production, we're seeing TX drops on veth devices when the ptr_ring
>>> fills up. This can occur when NAPI mode is enabled, though it's
>>> relatively rare. However, with threaded NAPI - which we use in
>>> production - the drops become significantly more frequent.
>>
>> It splats:
>>
>> [ 5319.025772][ C1] dump_stack_lvl (lib/dump_stack.c:123)
>> [ 5319.025786][ C1] lockdep_rcu_suspicious (kernel/locking/lockdep.c:6866)
>> [ 5319.025797][ C1] veth_xdp_rcv (drivers/net/veth.c:907 (discriminator 9))
>> [ 5319.025850][ C1] veth_poll (drivers/net/veth.c:977)
> 
> I believe the way to silence this one is to use:
> 
> rcu_dereference_check(priv->peer, rcu_read_lock_bh_held());
> 
> instead of just rcu_dereference()
> 

Thanks for this suggestion.
Normally, this indicate I should add a rcu_read_lock() section around
for-loop in veth_xdp_rcv(), but this isn't necessary due to NAPI, right?

For background, this is because (1) NAPI is already running with RCU
read-lock held or is it because (2) BH is considered a RCU section?

--Jesper

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ