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: <20250617064811.0d4e1490@kernel.org>
Date: Tue, 17 Jun 2025 06:48:11 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Breno Leitao <leitao@...ian.org>
Cc: Andrew Lunn <andrew+netdev@...n.ch>, "David S. Miller"
 <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Paolo Abeni
 <pabeni@...hat.com>, David Wei <dw@...idwei.uk>, Shuah Khan
 <shuah@...nel.org>, Simon Horman <horms@...nel.org>,
 netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
 linux-kselftest@...r.kernel.org, gustavold@...il.com
Subject: Re: [PATCH net-next v3 4/4] netdevsim: account dropped packet
 length in stats on queue free

On Tue, 17 Jun 2025 06:24:23 -0700 Breno Leitao wrote:
> > here we are in process context and debug checks complain about the use
> > of this_cpu_ptr(). Let's wrap this in local_bh_disable() / enable() ?  
> 
> Thanks. I was able to reproduce it. Your suggestion avoids the complain.
> I suppose we should just wrap dev_dstats_rx_dropped_add(), right?

I think so. I hope that makes the preempt checker happy.
The reason for bh_disable rather than preempt_disable() is that we 
should only update the stats from one context, the NAPI poll context.
So we also need to prevent races with another NAPI running on the same
core while we free an old queue.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ