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]
Date:   Thu, 20 Feb 2020 09:07:45 +0200
From:   Ido Schimmel <idosch@...sch.org>
To:     netdev@...r.kernel.org
Cc:     davem@...emloft.net, jiri@...lanox.com, mlxsw@...lanox.com,
        Ido Schimmel <idosch@...lanox.com>
Subject: [PATCH net-next 00/15] mlxsw: Preparation for RTNL removal

From: Ido Schimmel <idosch@...lanox.com>

The driver currently acquires RTNL in its route insertion path, which
contributes to very large control plane latencies. This patch set
prepares mlxsw for RTNL removal from its route insertion path in a
follow-up patch set.

Patches #1-#2 protect shared resources - KVDL and counter pool - with
their own locks. All allocations of these resources are currently
performed under RTNL, so no locks were required.

Patches #3-#7 ensure that updates to mirroring sessions only take place
in case there are active mirroring sessions. This allows us to avoid
taking RTNL when it is unnecessary, as updating of the mirroring
sessions must be performed under RTNL for the time being.

Patches #8-#10 replace the use of APIs that assume that RTNL is taken
with their RCU counterparts. Specifically, patches #8 and #9 replace
__in_dev_get_rtnl() with __in_dev_get_rcu() under RCU read-side critical
section. Patch #10 replaces __dev_get_by_index() with
dev_get_by_index_rcu().

Patches #11-#15 perform small adjustments in the code to make it easier
to later introduce a router lock instead of relying on RTNL.

Ido Schimmel (15):
  mlxsw: spectrum_kvdl: Protect allocations with a lock
  mlxsw: spectrum: Protect counter pool with a lock
  mlxsw: spectrum_span: Do no expose mirroring agents to entire driver
  mlxsw: spectrum_span: Use struct_size() to simplify allocation
  mlxsw: spectrum_span: Prepare work item to update mirroring agents
  mlxsw: spectrum: Convert callers to use new mirroring API
  mlxsw: spectrum_span: Only update mirroring agents if present
  mlxsw: spectrum_router: Do not assume RTNL is taken during nexthop
    init
  mlxsw: spectrum_router: Do not assume RTNL is taken during RIF
    teardown
  mlxsw: spectrum_router: Do not assume RTNL is taken when resolving
    underlay device
  mlxsw: spectrum_router: Prepare function for router lock introduction
  mlxsw: spectrum_router: Prepare function for router lock introduction
  mlxsw: spectrum: Prevent RIF access outside of routing code
  mlxsw: spectrum: Export function to check if RIF exists
  mlxsw: spectrum_nve: Make tunnel initialization symmetric

 .../net/ethernet/mellanox/mlxsw/spectrum.c    |   8 +-
 .../net/ethernet/mellanox/mlxsw/spectrum.h    |  12 +-
 .../ethernet/mellanox/mlxsw/spectrum_cnt.c    |  25 +++-
 .../ethernet/mellanox/mlxsw/spectrum_kvdl.c   |  16 ++-
 .../ethernet/mellanox/mlxsw/spectrum_nve.c    |   5 +-
 .../ethernet/mellanox/mlxsw/spectrum_router.c | 112 ++++++++++++++----
 .../ethernet/mellanox/mlxsw/spectrum_span.c   | 102 ++++++++++------
 .../mellanox/mlxsw/spectrum_switchdev.c       |  42 +------
 8 files changed, 199 insertions(+), 123 deletions(-)

-- 
2.24.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ