netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 00/14] ipv6: round of data-races fixes
@ 2023-09-12 16:01 Eric Dumazet
  2023-09-12 16:01 ` [PATCH net-next 01/14] ipv6: lockless IPV6_UNICAST_HOPS implementation Eric Dumazet
                   ` (15 more replies)
  0 siblings, 16 replies; 31+ messages in thread
From: Eric Dumazet @ 2023-09-12 16:01 UTC (permalink / raw)
  To: David S . Miller, Jakub Kicinski, Paolo Abeni
  Cc: David Ahern, netdev, eric.dumazet, Eric Dumazet

This series is inspired by one related syzbot report.

Many inet6_sk(sk) fields reads or writes are racy.

Move 1-bit fields to inet->inet_flags to provide
atomic safety. inet6_{test|set|clear|assign}_bit() helpers
could be changed later if we need to make room in inet_flags.

Also add missing READ_ONCE()/WRITE_ONCE() when
lockless readers need access to specific fields.

np->srcprefs will be handled separately to avoid merge conflicts
because a prior patch was posted for net tree.

Eric Dumazet (14):
  ipv6: lockless IPV6_UNICAST_HOPS implementation
  ipv6: lockless IPV6_MULTICAST_LOOP implementation
  ipv6: lockless IPV6_MULTICAST_HOPS implementation
  ipv6: lockless IPV6_MTU implementation
  ipv6: lockless IPV6_MINHOPCOUNT implementation
  ipv6: lockless IPV6_RECVERR_RFC4884 implementation
  ipv6: lockless IPV6_MULTICAST_ALL implementation
  ipv6: lockless IPV6_AUTOFLOWLABEL implementation
  ipv6: lockless IPV6_DONTFRAG implementation
  ipv6: lockless IPV6_RECVERR implemetation
  ipv6: move np->repflow to atomic flags
  ipv6: lockless IPV6_ROUTER_ALERT_ISOLATE implementation
  ipv6: lockless IPV6_MTU_DISCOVER implementation
  ipv6: lockless IPV6_FLOWINFO_SEND implementation

 include/linux/ipv6.h            |  49 +++----
 include/net/inet_sock.h         |  10 ++
 include/net/ip6_route.h         |  14 +-
 include/net/ipv6.h              |  16 +--
 include/net/sock.h              |   2 +-
 include/net/xfrm.h              |   2 +-
 net/core/sock.c                 |   4 +-
 net/dccp/ipv6.c                 |   8 +-
 net/ipv4/ping.c                 |   5 +-
 net/ipv6/af_inet6.c             |   9 +-
 net/ipv6/datagram.c             |  15 +--
 net/ipv6/icmp.c                 |   4 +-
 net/ipv6/ip6_flowlabel.c        |   8 +-
 net/ipv6/ip6_output.c           |  42 +++---
 net/ipv6/ipv6_sockglue.c        | 223 +++++++++++++++-----------------
 net/ipv6/mcast.c                |   4 +-
 net/ipv6/ndisc.c                |   4 +-
 net/ipv6/ping.c                 |   4 +-
 net/ipv6/raw.c                  |  16 +--
 net/ipv6/tcp_ipv6.c             |  21 ++-
 net/ipv6/udp.c                  |  12 +-
 net/l2tp/l2tp_ip6.c             |   6 +-
 net/netfilter/ipvs/ip_vs_sync.c |  12 +-
 net/sctp/ipv6.c                 |   7 +-
 24 files changed, 238 insertions(+), 259 deletions(-)

-- 
2.42.0.283.g2d96d420d3-goog


^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2023-09-15  9:40 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-12 16:01 [PATCH net-next 00/14] ipv6: round of data-races fixes Eric Dumazet
2023-09-12 16:01 ` [PATCH net-next 01/14] ipv6: lockless IPV6_UNICAST_HOPS implementation Eric Dumazet
2023-09-14 14:51   ` David Ahern
2023-09-12 16:02 ` [PATCH net-next 02/14] ipv6: lockless IPV6_MULTICAST_LOOP implementation Eric Dumazet
2023-09-14 14:54   ` David Ahern
2023-09-12 16:02 ` [PATCH net-next 03/14] ipv6: lockless IPV6_MULTICAST_HOPS implementation Eric Dumazet
2023-09-14 14:55   ` David Ahern
2023-09-12 16:02 ` [PATCH net-next 04/14] ipv6: lockless IPV6_MTU implementation Eric Dumazet
2023-09-14 14:58   ` David Ahern
2023-09-12 16:02 ` [PATCH net-next 05/14] ipv6: lockless IPV6_MINHOPCOUNT implementation Eric Dumazet
2023-09-14 15:01   ` David Ahern
2023-09-12 16:02 ` [PATCH net-next 06/14] ipv6: lockless IPV6_RECVERR_RFC4884 implementation Eric Dumazet
2023-09-14 15:02   ` David Ahern
2023-09-12 16:02 ` [PATCH net-next 07/14] ipv6: lockless IPV6_MULTICAST_ALL implementation Eric Dumazet
2023-09-14 15:03   ` David Ahern
2023-09-12 16:02 ` [PATCH net-next 08/14] ipv6: lockless IPV6_AUTOFLOWLABEL implementation Eric Dumazet
2023-09-14 15:04   ` David Ahern
2023-09-12 16:02 ` [PATCH net-next 09/14] ipv6: lockless IPV6_DONTFRAG implementation Eric Dumazet
2023-09-14 15:05   ` David Ahern
2023-09-12 16:02 ` [PATCH net-next 10/14] ipv6: lockless IPV6_RECVERR implemetation Eric Dumazet
2023-09-14 15:06   ` David Ahern
2023-09-12 16:02 ` [PATCH net-next 11/14] ipv6: move np->repflow to atomic flags Eric Dumazet
2023-09-14 15:07   ` David Ahern
2023-09-12 16:02 ` [PATCH net-next 12/14] ipv6: lockless IPV6_ROUTER_ALERT_ISOLATE implementation Eric Dumazet
2023-09-14 15:08   ` David Ahern
2023-09-12 16:02 ` [PATCH net-next 13/14] ipv6: lockless IPV6_MTU_DISCOVER implementation Eric Dumazet
2023-09-14 15:10   ` David Ahern
2023-09-12 16:02 ` [PATCH net-next 14/14] ipv6: lockless IPV6_FLOWINFO_SEND implementation Eric Dumazet
2023-09-14 15:11   ` David Ahern
2023-09-14 10:25 ` [PATCH net-next 00/14] ipv6: round of data-races fixes Simon Horman
2023-09-15  9:40 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).