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-next>] [day] [month] [year] [list]
Message-ID: <20250512092736.229935-1-bigeasy@linutronix.de>
Date: Mon, 12 May 2025 11:27:21 +0200
From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To: netdev@...r.kernel.org,
	linux-rt-devel@...ts.linux.dev
Cc: "David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>,
	Paolo Abeni <pabeni@...hat.com>,
	Simon Horman <horms@...nel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Subject: [PATCH net-next v4 00/15] net: Cover more per-CPU storage with local nested BH locking

I was looking at the build-time defined per-CPU variables in net/ and
added the needed local-BH-locks in order to be able to remove the
current per-CPU lock in local_bh_disable() on PREMPT_RT.

The work is not yet complete, I just wanted to post what I have so far
instead of sitting on it.

v3…v4: https://lore.kernel.org/all/20250430124758.1159480-1-bigeasy@linutronix.de/
   - xdp: Extend locked section and create a single unlock/ exit path in
     xdp_copy_frags_from_zc(). Toke asked for this.
   - Dropped the netfilter patches.
   - Fixed up a typo in the openswitch comment.

v2…v3: https://lore.kernel.org/all/20250414160754.503321-1-bigeasy@linutronix.de
   - openvswitch: Limit the ovs_pcpu_storage::owner assignment (and so
     the whole locking procedure in the recursive case) to PREEMPT_RT.
   - Add acked-by from sched folks for "netfilter: nf_dup{4, 6}: Move
     duplication check to task_struct"

v1…v2: https://lore.kernel.org/all/20250309144653.825351-1-bigeasy@linutronix.de
   - act_mirred: Using proper variable on PREEMPT_RT, noticed by Davide
     Caratti.
   - openvswitch:
     - Renamed the per-CPU variable to ovs_pcpu_storage.
     - Moved some data structures from action.c to datapath.h in order
       to implement the locking within datapath.c.


Sebastian Andrzej Siewior (15):
  net: page_pool: Don't recycle into cache on PREEMPT_RT
  net: dst_cache: Use nested-BH locking for dst_cache::cache
  ipv4/route: Use this_cpu_inc() for stats on PREEMPT_RT
  ipv6: sr: Use nested-BH locking for hmac_storage
  xdp: Use nested-BH locking for system_page_pool
  xfrm: Use nested-BH locking for nat_keepalive_sk_ipv[46]
  openvswitch: Merge three per-CPU structures into one
  openvswitch: Use nested-BH locking for ovs_pcpu_storage
  openvswitch: Move ovs_frag_data_storage into the struct
    ovs_pcpu_storage
  net/sched: act_mirred: Move the recursion counter struct netdev_xmit
  net/sched: Use nested-BH locking for sch_frag_data_storage
  mptcp: Use nested-BH locking for hmac_storage
  rds: Disable only bottom halves in rds_page_remainder_alloc()
  rds: Acquire per-CPU pointer within BH disabled section
  rds: Use nested-BH locking for rds_page_remainder

 include/linux/netdevice.h      |  7 ++-
 include/linux/netdevice_xmit.h |  3 ++
 net/core/dev.c                 | 15 ++++--
 net/core/dst_cache.c           | 30 ++++++++++--
 net/core/page_pool.c           |  4 ++
 net/core/xdp.c                 | 15 ++++--
 net/ipv4/route.c               |  4 ++
 net/ipv6/seg6_hmac.c           | 13 ++++-
 net/mptcp/protocol.c           |  4 +-
 net/mptcp/protocol.h           |  9 +++-
 net/openvswitch/actions.c      | 86 +++++-----------------------------
 net/openvswitch/datapath.c     | 33 +++++++++----
 net/openvswitch/datapath.h     | 52 ++++++++++++++++++--
 net/rds/page.c                 | 25 +++++-----
 net/sched/act_mirred.c         | 28 +++++++++--
 net/sched/sch_frag.c           | 10 +++-
 net/xfrm/xfrm_nat_keepalive.c  | 30 ++++++++----
 17 files changed, 241 insertions(+), 127 deletions(-)

-- 
2.49.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ