Skip to content

udp: Farewell to UDP-Lite.

Kuniyuki Iwashima netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest14 patches 14 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14udp: Random clenaup.net/ipv4/udp.c net/ipv6/udp.c+69 -571 reply
2/14udplite: Retire UDP-Lite for IPv6.include/net/ipv6.h include/net/transp_v6.h net/ipv6/Makefile +5 more+18 -2082 replies
3/14ipv6: Remove IPV6_ADDRFORM support for IPPROTO_UDPLITE.net/ipv6/ipv6_sockglue.c+4 -131 reply
4/14udplite: Retire UDP-Lite for IPv4.include/net/sock.h include/net/udp.h include/net/udplite.h +8 more+25 -2470 replies
5/14udp: Remove UDP-Lite SNMP stats.include/net/netns/mib.h include/net/udp.h net/ipv4/af_inet.c +5 more+69 -1421 reply
6/14udp: Remove UDPLITE_SEND_CSCOV and UDPLITE_RECV_CSCOV.include/net/udplite.h net/ipv4/udp.c net/ipv6/udp.c+4 -490 replies
7/14udp: Remove pcslen, pcrlen, and pcflag in struct udp_sock.include/linux/udp.h include/net/udplite.h net/ipv4/udp.c +1 more+1 -680 replies
8/14udp: Remove csum branch for UDP-Lite.include/linux/udp.h include/net/udp.h include/net/udplite.h +3 more+27 -1730 replies
9/14udp: Don't pass proto to udp[46]_csum_init().include/net/ip6_checksum.h net/ipv4/udp.c net/ipv6/ip6_checksum.c +1 more+36 -390 replies
10/14udp: Don't pass proto to __udp[46]_lib_rcv().net/ipv4/udp.c net/ipv6/udp.c+27 -370 replies
11/14udp: Optimise ulen tests in __udp[46]_lib_rcv().net/ipv4/udp.c net/ipv6/udp.c+22 -160 replies
12/14udp: Remove udp_table in struct proto.include/net/sock.h net/ipv4/udp.c net/ipv6/udp.c+7 -110 replies
13/14udp: Remove udp_table in struct udp_seq_afinfo.include/net/udp.h net/ipv4/udp.c net/ipv6/udp.c+4 -200 replies
14/14udp: Don't pass udp_table to __udp[46]_lib_lookup().include/net/ipv6_stubs.h include/net/udp.h net/core/filter.c +5 more+65 -1120 replies

Reviews trailers per patch

3 of 14 patches have a Reviewed-by or Acked-by.

PatchSimon Horman
1/14R-b
2/14
3/14R-b
4/14
5/14R-b
6/14
7/14
8/14
9/14
10/14
11/14
12/14
13/14
14/14

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [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/[email protected]/

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
Signature · 1 line
2.30.2