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-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 21 Sep 2023 21:15:01 +0200
From: Eric Dumazet <edumazet@...gle.com>
To: David Ahern <dsahern@...nel.org>
Cc: "David S . Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>, 
	Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org, eric.dumazet@...il.com
Subject: Re: [PATCH net-next 3/8] inet: implement lockless IP_TOS

On Thu, Sep 21, 2023 at 9:10 PM David Ahern <dsahern@...nel.org> wrote:
>
> On 9/21/23 7:30 AM, Eric Dumazet wrote:
> > Some reads of inet->tos are racy.
> >
> > Add needed READ_ONCE() annotations and convert IP_TOS option lockless.
> >
> > Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> > ---
> >  include/net/ip.h                              |  1 -
> >  net/dccp/ipv4.c                               |  2 +-
> >  net/ipv4/inet_diag.c                          |  2 +-
> >  net/ipv4/ip_output.c                          |  4 +--
> >  net/ipv4/ip_sockglue.c                        | 29 ++++++++-----------
> >  net/ipv4/tcp_ipv4.c                           |  9 +++---
> >  net/mptcp/sockopt.c                           |  8 ++---
> >  net/sctp/protocol.c                           |  4 +--
> >  .../selftests/net/mptcp/mptcp_connect.sh      |  2 +-
> >  9 files changed, 28 insertions(+), 33 deletions(-)
> >
>
> include/net/route.h dereferences sk tos as well.

Right, thanks for catching this.

> net/ipv4/icmp.c has a setting of it

This is safe, the socket is private to the current thread ( sk =
icmp_xmit_lock()) and not visible to other threads.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ