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: <20250204230057.1270362-1-sdf@fomichev.me>
Date: Tue,  4 Feb 2025 15:00:53 -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,
	Saeed Mahameed <saeed@...nel.org>
Subject: [RFC net-next 0/4] net: Hold netdev instance lock during ndo operations

As the gradual purging of rtnl continues, start grabbing netdev
instance lock in more places so we can get to the state where
most paths are working without rtnl. Start with requiring the
drivers that use shaper api (and later queue mgmt api) to work
with both rtnl and netdev instance lock. Eventually we might
attempt to drop rtnl. This mostly affects iavf, gve, bnxt and
netdev sim (as the drivers that implement shaper/queue mgmt)
so those drivers are converted in the process.

This is part one of the process, the next step is to do similar locking
for the rest of ndo handlers that are being called from sysfs/ethtool/netlink.

Cc: Saeed Mahameed <saeed@...nel.org>

Stanislav Fomichev (4):
  net: Hold netdev instance lock during ndo_open/ndo_stop
  net: Hold netdev instance lock during ndo_setup_tc
  net: Hold netdev instance lock for more NDOs
  net: Hold netdev instance lock during queue operations

 Documentation/networking/netdevices.rst       | 52 +++++++++++++-----
 drivers/net/bonding/bond_main.c               |  9 ++--
 drivers/net/ethernet/broadcom/bnxt/bnxt.c     | 54 +++++++++++++++----
 .../net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 11 ++--
 .../net/ethernet/broadcom/bnxt/bnxt_sriov.c   |  2 +
 drivers/net/ethernet/google/gve/gve_main.c    |  8 +--
 drivers/net/ethernet/google/gve/gve_utils.c   |  8 +--
 drivers/net/ethernet/intel/iavf/iavf_main.c   | 16 +++---
 drivers/net/netdevsim/netdev.c                | 36 ++++++++-----
 include/linux/netdevice.h                     | 27 ++++++++++
 net/8021q/vlan_dev.c                          |  4 +-
 net/core/dev.c                                | 34 ++++++++++++
 net/core/dev.h                                |  6 ++-
 net/core/dev_ioctl.c                          | 44 ++++++++++-----
 net/core/netdev_rx_queue.c                    |  5 ++
 net/dsa/user.c                                |  5 +-
 net/ieee802154/socket.c                       |  2 +
 net/netfilter/nf_flow_table_offload.c         |  2 +-
 net/netfilter/nf_tables_offload.c             |  2 +-
 net/phonet/pn_dev.c                           |  2 +
 net/sched/cls_api.c                           |  2 +-
 net/sched/sch_api.c                           | 13 ++---
 net/sched/sch_cbs.c                           |  9 +---
 net/sched/sch_etf.c                           |  9 +---
 net/sched/sch_ets.c                           | 10 +---
 net/sched/sch_fifo.c                          | 10 +---
 net/sched/sch_gred.c                          |  5 +-
 net/sched/sch_htb.c                           |  2 +-
 net/sched/sch_mq.c                            |  5 +-
 net/sched/sch_mqprio.c                        |  6 +--
 net/sched/sch_prio.c                          |  5 +-
 net/sched/sch_red.c                           |  8 +--
 net/sched/sch_taprio.c                        | 16 ++----
 net/sched/sch_tbf.c                           | 10 +---
 34 files changed, 266 insertions(+), 173 deletions(-)

-- 
2.48.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ