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: <20220617201045.2659460-1-eric.dumazet@gmail.com>
Date:   Fri, 17 Jun 2022 13:10:43 -0700
From:   Eric Dumazet <eric.dumazet@...il.com>
To:     "David S . Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>
Cc:     netdev <netdev@...r.kernel.org>,
        Eric Dumazet <edumazet@...gle.com>,
        Eric Dumazet <eric.dumazet@...il.com>
Subject: [PATCH net-next 0/2] raw: RCU conversion

From: Eric Dumazet <edumazet@...gle.com>

Using rwlock in networking code is extremely risky.
writers can starve if enough readers are constantly
grabing the rwlock.

I thought rwlock were at fault and sent this patch:

https://lkml.org/lkml/2022/6/17/272

But Peter and Linus essentially told me rwlock had to be unfair.

We need to get rid of rwlock in networking stacks.

Without this conversion, following script triggers soft lockups:

for i in {1..48}
do
 ping -f -n -q 127.0.0.1 &
 sleep 0.1
done

Next step will be to convert ping sockets to RCU as well.

Eric Dumazet (2):
  raw: use more conventional iterators
  raw: convert raw sockets to RCU

 include/net/raw.h   |  16 +++--
 include/net/rawv6.h |   7 ++-
 net/ipv4/af_inet.c  |   2 +
 net/ipv4/raw.c      | 150 ++++++++++++++++++--------------------------
 net/ipv4/raw_diag.c |  41 ++++++------
 net/ipv6/af_inet6.c |   3 +
 net/ipv6/raw.c      | 119 +++++++++++++----------------------
 7 files changed, 148 insertions(+), 190 deletions(-)

-- 
2.36.1.476.g0c4daa206d-goog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ