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: <20241017183140.43028-1-kuniyu@amazon.com>
Date: Thu, 17 Oct 2024 11:31:31 -0700
From: Kuniyuki Iwashima <kuniyu@...zon.com>
To: "David S. Miller" <davem@...emloft.net>, Eric Dumazet
	<edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni
	<pabeni@...hat.com>, Remi Denis-Courmont <courmisch@...il.com>
CC: Kuniyuki Iwashima <kuniyu@...zon.com>, Kuniyuki Iwashima
	<kuni1840@...il.com>, <netdev@...r.kernel.org>
Subject: [PATCH v1 net-next 0/9] phonet: Convert all doit() and dumpit() to RCU.

addr_doit() and route_doit() access only phonet_device_list(dev_net(dev))
and phonet_pernet(dev_net(dev))->routes, respectively.

Each per-netns struct has its dedicated mutex, and RTNL also protects
the structs.  __dev_change_net_namespace() has synchronize_net(), so
we have two options to convert addr_doit() and route_doit().

  1. Use per-netns RTNL
  2. Use RCU and convert each struct mutex to spinlock_t

As RCU is preferable, this series converts all PF_PHONET's doit()
and dumpit() to RCU.

4 doit()s and 1 dumpit() are now converted to RCU, 70 doit()s and
28 dumpit()s are still under RTNL.


Kuniyuki Iwashima (9):
  phonet: Pass ifindex to fill_addr().
  phonet: Pass net and ifindex to phonet_address_notify().
  phonet: Convert phonet_device_list.lock to spinlock_t.
  phonet: Don't hold RTNL for addr_doit().
  phonet: Don't hold RTNL for getaddr_dumpit().
  phonet: Pass ifindex to fill_route().
  phonet: Pass net and ifindex to rtm_phonet_notify().
  phonet: Convert phonet_routes.lock to spinlock_t.
  phonet: Don't hold RTNL for route_doit().

 include/net/phonet/pn_dev.h |   8 +--
 net/phonet/pn_dev.c         |  69 ++++++++++++++--------
 net/phonet/pn_netlink.c     | 115 ++++++++++++++++++++++--------------
 3 files changed, 120 insertions(+), 72 deletions(-)

-- 
2.39.5 (Apple Git-154)


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ