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: <aCXiwEVJ8sLJLzxc@jlelli-thinkpadt14gen4.remote.csb>
Date: Thu, 15 May 2025 14:49:04 +0200
From: Juri Lelli <juri.lelli@...hat.com>
To: Paolo Abeni <pabeni@...hat.com>
Cc: Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
	netdev@...r.kernel.org, linux-rt-devel@...ts.linux.dev,
	Ingo Molnar <mingo@...hat.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Vincent Guittot <vincent.guittot@...aro.org>,
	"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>,
	Jamal Hadi Salim <jhs@...atatu.com>,
	Cong Wang <xiyou.wangcong@...il.com>, Jiri Pirko <jiri@...nulli.us>
Subject: Re: [PATCH net-next v4 10/15] net/sched: act_mirred: Move the
 recursion counter struct netdev_xmit

On 15/05/25 11:55, Paolo Abeni wrote:
> CC sched maintainers.
> 
> On 5/12/25 11:27 AM, Sebastian Andrzej Siewior wrote:
> > mirred_nest_level 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.
> > 
> > Move mirred_nest_level to struct netdev_xmit as u8, provide wrappers.
> > 
> > Cc: Jamal Hadi Salim <jhs@...atatu.com>
> > Cc: Cong Wang <xiyou.wangcong@...il.com>
> > Cc: Jiri Pirko <jiri@...nulli.us>
> > Signed-off-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
> > ---
> >  include/linux/netdevice_xmit.h |  3 +++
> >  net/sched/act_mirred.c         | 28 +++++++++++++++++++++++++---
> >  2 files changed, 28 insertions(+), 3 deletions(-)
> > 
> > diff --git a/include/linux/netdevice_xmit.h b/include/linux/netdevice_xmit.h
> > index 38325e0702968..848735b3a7c02 100644
> > --- a/include/linux/netdevice_xmit.h
> > +++ b/include/linux/netdevice_xmit.h
> > @@ -8,6 +8,9 @@ struct netdev_xmit {
> >  #ifdef CONFIG_NET_EGRESS
> >  	u8  skip_txqueue;
> >  #endif
> > +#if IS_ENABLED(CONFIG_NET_ACT_MIRRED)
> > +	u8 sched_mirred_nest;
> > +#endif
> >  };
> 
> The above struct is embedded into task_struct in RT build. The new field
>  *should* use an existing hole. According to my weak knowledge in that
> area the task_struct binary layout is a critical, an explicit ack from
> SMEs would be nice.

Agree. Still fitting in an existing task_struct hole.

Reviewed-by: Juri Lelli <juri.lelli@...hat.com>

Best,
Juri


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ