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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 17 Feb 2020 16:29:30 +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/10] mlxsw: Reduce dependency between bridge and router code

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

This patch set reduces the dependency between the bridge and the router
code in preparation for RTNL removal from the route insertion path in
mlxsw.

The motivation and solution are explained in detail in patch #3. The
main idea is that we need to stop special-casing the VXLAN devices with
regards to the reference counting of the FIDs. Otherwise, we can bump
into the situation described in patch #3, where the routing code calls
into the bridge code which calls back into the routing code. After
adding a mutex to protect router data structures to remove RTNL
dependency, this can result in an AA deadlock.

Patches #1 and #2 are preparations. They convert the FIDs to use
'refcount_t' for reference counting in order to catch over/under flows
and add extack to the bridge creation function.

Patches #3-#5 reduce the dependency between the bridge and the router
code. First, by having the VXLAN device take a reference on the FID in
patch #3 and then by removing unnecessary code following the change in
patch #3.

Patches #6-#10 adjust existing selftests and add new ones to exercise
the new code paths.

Ido Schimmel (10):
  mlxsw: spectrum_fid: Use 'refcount_t' for FID reference counting
  mlxsw: spectrum_switchdev: Propagate extack to bridge creation
    function
  mlxsw: spectrum_switchdev: Have VXLAN device take reference on FID
  mlxsw: spectrum_switchdev: Remove VXLAN checks during FID membership
  mlxsw: spectrum: Reduce dependency between bridge and router code
  selftests: mlxsw: Remove deprecated test
  selftests: mlxsw: extack: Test bridge creation with VXLAN
  selftests: mlxsw: extack: Test creation of multiple VLAN-aware bridges
  selftests: mlxsw: vxlan: Adjust test to recent changes
  selftests: mlxsw: vxlan: Add test for error path

 .../net/ethernet/mellanox/mlxsw/spectrum.h    |   4 -
 .../ethernet/mellanox/mlxsw/spectrum_fid.c    |  13 +-
 .../ethernet/mellanox/mlxsw/spectrum_router.c |   4 +-
 .../mellanox/mlxsw/spectrum_switchdev.c       | 186 +++++++++---------
 .../selftests/drivers/net/mlxsw/extack.sh     |  45 ++++-
 .../selftests/drivers/net/mlxsw/vxlan.sh      |  27 +--
 6 files changed, 147 insertions(+), 132 deletions(-)

-- 
2.24.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ