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: <Z_Ob4niUHgSjS5x1@jlelli-thinkpadt14gen4.remote.csb>
Date: Mon, 7 Apr 2025 11:33:22 +0200
From: Juri Lelli <juri.lelli@...hat.com>
To: Paolo Abeni <pabeni@...hat.com>
Cc: Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
	Peter Zijlstra <peterz@...radead.org>,
	Valentin Schneider <vschneid@...hat.com>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Simon Horman <horms@...nel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Pablo Neira Ayuso <pablo@...filter.org>,
	Jozsef Kadlecsik <kadlec@...filter.org>,
	Ingo Molnar <mingo@...hat.com>,
	Vincent Guittot <vincent.guittot@...aro.org>,
	Dietmar Eggemann <dietmar.eggemann@....com>,
	Steven Rostedt <rostedt@...dmis.org>,
	Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
	netdev@...r.kernel.org, linux-rt-devel@...ts.linux.dev
Subject: Re: [PATCH net-next 06/18] netfilter: nf_dup{4, 6}: Move duplication
 check to task_struct.

Hi Paolo,

On 17/03/25 18:29, Paolo Abeni wrote:
> Hi,
> 
> On 3/9/25 3:46 PM, Sebastian Andrzej Siewior wrote:
> > nf_skb_duplicated is a per-CPU variable and relies on disabled BH for its
> > locking. Without per-CPU locking in local_bh_disable() on PREEMPT_RT
> > this data structure requires explicit locking.
> > 
> > Due to the recursion involved, the simplest change is to make it a
> > per-task variable.
> > 
> > Move the per-CPU variable nf_skb_duplicated to task_struct and name it
> > in_nf_duplicate. Add it to the existing bitfield so it doesn't use
> > additional memory.
> > 
> > Cc: Pablo Neira Ayuso <pablo@...filter.org>
> > Cc: Jozsef Kadlecsik <kadlec@...filter.org>
> > Cc: Ingo Molnar <mingo@...hat.com>
> > Cc: Peter Zijlstra <peterz@...radead.org>
> > Cc: Juri Lelli <juri.lelli@...hat.com>
> > Cc: Vincent Guittot <vincent.guittot@...aro.org>
> > Cc: Dietmar Eggemann <dietmar.eggemann@....com>
> > Cc: Steven Rostedt <rostedt@...dmis.org>
> > Cc: Ben Segall <bsegall@...gle.com>
> > Cc: Mel Gorman <mgorman@...e.de>
> > Cc: Valentin Schneider <vschneid@...hat.com>
> > Signed-off-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
> 
> I'm not a super-fan of adding more flags to 'struct task', but in this
> specific case I agree is the better option, as otherwise we should
> acquire the local lock for a relatively large scope - the whole packet
> processing by nft, right?
> 
> Still this needs some explicit ack from the relevant maintainers.
> @Peter, @Juri, @Valentin: could you please have a look?

The additional flag fills a hole, so, FWIW, I don't see particular
problems with it.

Best,
Juri


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ