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: <20250307155725.219009-1-sdf@fomichev.me>
Date: Fri,  7 Mar 2025 07:57:21 -0800
From: Stanislav Fomichev <sdf@...ichev.me>
To: netdev@...r.kernel.org
Cc: davem@...emloft.net,
	edumazet@...gle.com,
	kuba@...nel.org,
	pabeni@...hat.com,
	linux-kernel@...r.kernel.org,
	horms@...nel.org,
	donald.hunter@...il.com,
	michael.chan@...adcom.com,
	pavan.chebbi@...adcom.com,
	andrew+netdev@...n.ch,
	jdamato@...tly.com,
	sdf@...ichev.me,
	xuanzhuo@...ux.alibaba.com,
	almasrymina@...gle.com,
	asml.silence@...il.com,
	dw@...idwei.uk
Subject: [PATCH net-next v1 0/4] net: remove rtnl_lock from the callers of queue APIs

All drivers that use queue management APIs already depend on the netdev
lock. Ultimately, we want to have most of the paths that work with
specific netdev to be rtnl_lock-free (ethtool mostly in particular).
Queue API currently has a much smaller API surface, so start with
rtnl_lock from it:

- add mutex to each dmabuf binding (to replace rtnl_lock)
- protect global net_devmem_dmabuf_bindings with a new (global) lock
- move netdev lock management to the callers of netdev_rx_queue_restart
  and drop rtnl_lock

Cc: Mina Almasry <almasrymina@...gle.com>

Stanislav Fomichev (4):
  net: create netdev_nl_sock to wrap bindings list
  net: protect net_devmem_dmabuf_bindings by new
    net_devmem_bindings_mutex
  net: add granular lock for the netdev netlink socket
  net: drop rtnl_lock for queue_mgmt operations

 Documentation/netlink/specs/netdev.yaml   |  4 +--
 drivers/net/ethernet/broadcom/bnxt/bnxt.c |  4 +--
 drivers/net/netdevsim/netdev.c            |  4 +--
 include/net/netdev_netlink.h              | 12 +++++++
 net/core/devmem.c                         | 32 ++++++++---------
 net/core/netdev-genl-gen.c                |  4 +--
 net/core/netdev-genl-gen.h                |  6 ++--
 net/core/netdev-genl.c                    | 42 ++++++++++-------------
 net/core/netdev_rx_queue.c                | 15 +++-----
 9 files changed, 63 insertions(+), 60 deletions(-)
 create mode 100644 include/net/netdev_netlink.h

-- 
2.48.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ