All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 00/10] udp: round of data-races fixes
@ 2023-09-12  9:17 Eric Dumazet
  2023-09-12  9:17 ` [PATCH net-next 01/10] udp: introduce udp->udp_flags Eric Dumazet
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: Eric Dumazet @ 2023-09-12  9:17 UTC (permalink / raw)
  To: David S . Miller, Jakub Kicinski, Paolo Abeni
  Cc: netdev, Willem de Bruijn, eric.dumazet, Eric Dumazet

This series is inspired by multiple syzbot reports.

Many udp fields reads or writes are racy.

Add a proper udp->udp_flags and move there all
flags needing atomic safety.

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

Eric Dumazet (10):
  udp: introduce udp->udp_flags
  udp: move udp->no_check6_tx to udp->udp_flags
  udp: move udp->no_check6_rx to udp->udp_flags
  udp: move udp->gro_enabled to udp->udp_flags
  udp: add missing WRITE_ONCE() around up->encap_rcv
  udp: move udp->accept_udp_{l4|fraglist} to udp->udp_flags
  udp: lockless UDP_ENCAP_L2TPINUDP / UDP_GRO
  udp: annotate data-races around udp->encap_type
  udplite: remove UDPLITE_BIT
  udplite: fix various data-races

 drivers/net/gtp.c          |  4 +--
 include/linux/udp.h        | 66 ++++++++++++++++++++--------------
 include/net/udp_tunnel.h   |  9 ++---
 include/net/udplite.h      | 14 +++++---
 net/ipv4/udp.c             | 74 +++++++++++++++++++-------------------
 net/ipv4/udp_offload.c     |  4 +--
 net/ipv4/udp_tunnel_core.c |  2 +-
 net/ipv4/udplite.c         |  1 -
 net/ipv4/xfrm4_input.c     |  4 +--
 net/ipv6/udp.c             | 34 +++++++++---------
 net/ipv6/udplite.c         |  1 -
 net/ipv6/xfrm6_input.c     |  4 +--
 net/l2tp/l2tp_core.c       |  6 ++--
 13 files changed, 118 insertions(+), 105 deletions(-)

-- 
2.42.0.283.g2d96d420d3-goog


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

end of thread, other threads:[~2023-09-14 14:30 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-12  9:17 [PATCH net-next 00/10] udp: round of data-races fixes Eric Dumazet
2023-09-12  9:17 ` [PATCH net-next 01/10] udp: introduce udp->udp_flags Eric Dumazet
2023-09-12  9:17 ` [PATCH net-next 02/10] udp: move udp->no_check6_tx to udp->udp_flags Eric Dumazet
2023-09-12  9:17 ` [PATCH net-next 03/10] udp: move udp->no_check6_rx " Eric Dumazet
2023-09-12  9:17 ` [PATCH net-next 04/10] udp: move udp->gro_enabled " Eric Dumazet
2023-09-12  9:17 ` [PATCH net-next 05/10] udp: add missing WRITE_ONCE() around up->encap_rcv Eric Dumazet
2023-09-12  9:17 ` [PATCH net-next 06/10] udp: move udp->accept_udp_{l4|fraglist} to udp->udp_flags Eric Dumazet
2023-09-12  9:17 ` [PATCH net-next 07/10] udp: lockless UDP_ENCAP_L2TPINUDP / UDP_GRO Eric Dumazet
2023-09-12  9:17 ` [PATCH net-next 08/10] udp: annotate data-races around udp->encap_type Eric Dumazet
2023-09-12  9:17 ` [PATCH net-next 09/10] udplite: remove UDPLITE_BIT Eric Dumazet
2023-09-12  9:17 ` [PATCH net-next 10/10] udplite: fix various data-races Eric Dumazet
2023-09-12 13:25 ` [PATCH net-next 00/10] udp: round of data-races fixes Willem de Bruijn
2023-09-14 14:30 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.