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:   Tue, 27 Sep 2022 09:56:38 +0200
From:   Jiri Pirko <>
Subject: [patch net-next v2 0/7] devlink: sanitize per-port region creation/destruction

From: Jiri Pirko <>

Currently the only user of per-port devlink regions is DSA. All drivers
that use regions register them before devlink registration. For DSA,
this was not possible as the internals of struct devlink_port needed for
region creation are initialized during port registration.

This introduced a mismatch in creation flow of devlink and devlink port
regions. As you can see, it causes the DSA driver to make the port
init/exit flow a bit cumbersome.

Fix this by introducing port_init/fini() which could be optionally
called by drivers like DSA, to prepare struct devlink_port to be used
for region creation purposes before devlink port register is called.

Tested by Vladimir on his setup.

- Netdevsim patch removed and also the patch forcing region creation
  before register was removed.
- Two Vladimir's patches were added.

Jiri Pirko (5):
  net: devlink: introduce port registered assert helper and use it
  net: devlink: introduce a flag to indicate devlink port being
  net: devlink: add port_init/fini() helpers to allow
    pre-register/post-unregister functions
  net: dsa: move port_setup/teardown to be called outside devlink port
    registered area
  net: dsa: don't do devlink port setup early

Vladimir Oltean (2):
  net: dsa: don't leave dangling pointers in dp->pl when failing
  net: dsa: remove bool devlink_port_setup

 include/net/devlink.h |   7 +-
 include/net/dsa.h     |   2 -
 net/core/devlink.c    |  80 ++++++++++++++----
 net/dsa/dsa2.c        | 184 ++++++++++++++++++------------------------
 net/dsa/dsa_priv.h    |   1 +
 net/dsa/port.c        |  22 +++--
 net/dsa/slave.c       |   6 +-
 7 files changed, 166 insertions(+), 136 deletions(-)


Powered by blists - more mailing lists