All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net v1 0/2] net: gro: add flush/flush_id checks and fix wrong offset in udp
@ 2024-04-12 15:21 Richard Gobert
  2024-04-12 15:21 ` [PATCH net v1 1/2] net: gro: add flush check in udp_gro_receive_segment Richard Gobert
  2024-04-12 15:21 ` [PATCH net v1 2/2] net: gro: add p_off param in *_gro_complete Richard Gobert
  0 siblings, 2 replies; 14+ messages in thread
From: Richard Gobert @ 2024-04-12 15:21 UTC (permalink / raw)
  To: davem, edumazet, kuba, pabeni, willemdebruijn.kernel, dsahern,
	aleksander.lobakin, netdev, linux-kernel
  Cc: Richard Gobert

This series fixes a bug in the complete phase of UDP in GRO, in which
socket lookup fails due to using network_header when parsing encapsulated
packets. The fix is to pass p_off (previous offset, offset to the start of
the previous layer) parameter in *_gro_complete.

The original series includes a change to a vxlan test which adds the local
parameter to prevent similar future bugs. I plan to submit it separately
to net-next.

In addition p->flush/flush_id should be checked in relevant UDP flows. Same
logic from tcp_gro_receive is applied for the relevant flows in
udp_gro_receive_segment.

This series is part of a previously submitted series to net-next:
https://lore.kernel.org/all/20240410153423.107381-1-richardbgobert@gmail.com/

Richard Gobert (2):
  net: gro: add flush check in udp_gro_receive_segment
  net: gro: add p_off param in *_gro_complete

 drivers/net/geneve.c           |  7 +++---
 drivers/net/vxlan/vxlan_core.c | 11 ++++++----
 include/linux/etherdevice.h    |  2 +-
 include/linux/netdevice.h      |  3 ++-
 include/linux/udp.h            |  2 +-
 include/net/gro.h              | 11 +++++-----
 include/net/inet_common.h      |  2 +-
 include/net/tcp.h              |  6 ++++--
 include/net/udp.h              |  8 +++----
 include/net/udp_tunnel.h       |  2 +-
 net/8021q/vlan_core.c          |  4 ++--
 net/core/gro.c                 |  2 +-
 net/ethernet/eth.c             |  4 ++--
 net/ipv4/af_inet.c             |  8 +++----
 net/ipv4/fou_core.c            |  9 ++++----
 net/ipv4/gre_offload.c         |  5 +++--
 net/ipv4/tcp_offload.c         |  7 +++---
 net/ipv4/udp.c                 |  3 ++-
 net/ipv4/udp_offload.c         | 39 ++++++++++++++++++++++------------
 net/ipv6/ip6_offload.c         | 22 ++++++++++---------
 net/ipv6/tcpv6_offload.c       |  7 +++---
 net/ipv6/udp.c                 |  3 ++-
 net/ipv6/udp_offload.c         | 13 ++++++------
 23 files changed, 105 insertions(+), 75 deletions(-)

-- 
2.36.1


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

end of thread, other threads:[~2024-04-19 15:17 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-12 15:21 [PATCH net v1 0/2] net: gro: add flush/flush_id checks and fix wrong offset in udp Richard Gobert
2024-04-12 15:21 ` [PATCH net v1 1/2] net: gro: add flush check in udp_gro_receive_segment Richard Gobert
2024-04-13 18:38   ` Willem de Bruijn
2024-04-14 17:22     ` Alexander Duyck
2024-04-15 15:00       ` Willem de Bruijn
2024-04-15 15:19         ` Alexander Duyck
2024-04-15 15:35           ` Willem de Bruijn
2024-04-12 15:21 ` [PATCH net v1 2/2] net: gro: add p_off param in *_gro_complete Richard Gobert
2024-04-13 18:46   ` Willem de Bruijn
2024-04-17 13:48     ` Richard Gobert
2024-04-17 19:39       ` Willem de Bruijn
2024-04-18 15:12         ` Richard Gobert
2024-04-18 18:40           ` Willem de Bruijn
2024-04-19 15:17             ` Richard Gobert

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.