[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230530010348.21425-1-kuniyu@amazon.com>
Date: Mon, 29 May 2023 18:03:34 -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>, David Ahern <dsahern@...nel.org>, Willem de Bruijn
<willemdebruijn.kernel@...il.com>
CC: Kuniyuki Iwashima <kuniyu@...zon.com>, Kuniyuki Iwashima
<kuni1840@...il.com>, <netdev@...r.kernel.org>
Subject: [PATCH v1 net-next 00/14] udp: Farewell to UDP-Lite.
Recently syzkaller reported a 7-year-old null-ptr-deref [0] that occurs
when a UDP-Lite socket tries to allocate a buffer under memory pressure.
Someone should have stumbled on the bug much earlier if UDP-Lite had been
used in a real app. Additionally, we do not always need a large UDP-Lite
workload to hit the bug since UDP and UDP-Lite share the same memory
accounting limit.
Given no one uses UDP-Lite, we can drop it and simplify UDP code by
removing a bunch of conditionals.
This series removes UDP-Lite support from the core networking stack first
and incrementally removes the dead code.
[0]: https://lore.kernel.org/netdev/20230523163305.66466-1-kuniyu@amazon.com/
Kuniyuki Iwashima (14):
udp: Random clenaup.
udplite: Retire UDP-Lite for IPv6.
ipv6: Remove IPV6_ADDRFORM support for IPPROTO_UDPLITE.
udplite: Retire UDP-Lite for IPv4.
udp: Remove UDP-Lite SNMP stats.
udp: Remove UDPLITE_SEND_CSCOV and UDPLITE_RECV_CSCOV.
udp: Remove pcslen, pcrlen, and pcflag in struct udp_sock.
udp: Remove csum branch for UDP-Lite.
udp: Don't pass proto to udp[46]_csum_init().
udp: Don't pass proto to __udp[46]_lib_rcv().
udp: Optimise ulen tests in __udp[46]_lib_rcv().
udp: Remove udp_table in struct proto.
udp: Remove udp_table in struct udp_seq_afinfo.
udp: Don't pass udp_table to __udp[46]_lib_lookup().
include/linux/udp.h | 14 +-
include/net/ip6_checksum.h | 1 -
include/net/ipv6.h | 2 -
include/net/ipv6_stubs.h | 3 +-
include/net/netns/mib.h | 5 -
include/net/sock.h | 5 +-
include/net/transp_v6.h | 3 -
include/net/udp.h | 71 +++----
include/net/udplite.h | 86 --------
net/core/filter.c | 5 +-
net/ipv4/Makefile | 2 +-
net/ipv4/af_inet.c | 10 -
net/ipv4/proc.c | 15 --
net/ipv4/udp.c | 421 ++++++++++++-------------------------
net/ipv4/udp_bpf.c | 2 -
net/ipv4/udp_diag.c | 84 ++------
net/ipv4/udp_impl.h | 29 ---
net/ipv4/udp_offload.c | 5 +-
net/ipv4/udplite.c | 136 ------------
net/ipv6/Makefile | 2 +-
net/ipv6/af_inet6.c | 25 +--
net/ipv6/ip6_checksum.c | 49 +----
net/ipv6/ipv6_sockglue.c | 17 +-
net/ipv6/proc.c | 16 --
net/ipv6/udp.c | 294 ++++++++++++--------------
net/ipv6/udp_impl.h | 31 ---
net/ipv6/udp_offload.c | 5 +-
net/ipv6/udplite.c | 136 ------------
28 files changed, 330 insertions(+), 1144 deletions(-)
delete mode 100644 include/net/udplite.h
delete mode 100644 net/ipv4/udp_impl.h
delete mode 100644 net/ipv4/udplite.c
delete mode 100644 net/ipv6/udp_impl.h
delete mode 100644 net/ipv6/udplite.c
--
2.30.2
Powered by blists - more mailing lists