mbox series

[v3,net-next,0/5] tcp: add skb->sk to more control packets

Message ID 20241010174817.1543642-1-edumazet@google.com (mailing list archive)
Headers show
Series tcp: add skb->sk to more control packets | expand

Message

Eric Dumazet Oct. 10, 2024, 5:48 p.m. UTC
Currently, TCP can set skb->sk for a variety of transmit packets.

However, packets sent on behalf of a TIME_WAIT sockets do not
have an attached socket.

Same issue for RST packets.

We want to change this, in order to increase eBPF program
capabilities.

This is slightly risky, because various layers could
be confused by TIME_WAIT sockets showing up in skb->sk.

v3: also changed sk_const_to_full_sk() to address CI splat in XFRM
Link: https://netdev-3.bots.linux.dev/vmksft-nf-dbg/results/804321/21-conntrack-vrf-sh/stderr
v2: audited all sk_to_full_sk() users and addressed Martin feedback.

Eric Dumazet (5):
  net: add TIME_WAIT logic to sk_to_full_sk()
  net_sched: sch_fq: prepare for TIME_WAIT sockets
  net: add skb_set_owner_edemux() helper
  ipv6: tcp: give socket pointer to control skbs
  ipv4: tcp: give socket pointer to control skbs

 include/linux/bpf-cgroup.h |  2 +-
 include/net/inet_sock.h    |  8 ++++++--
 include/net/ip.h           |  3 ++-
 include/net/sock.h         | 19 +++++++++++++++++++
 net/core/filter.c          |  6 +-----
 net/core/sock.c            |  9 +++------
 net/ipv4/ip_output.c       |  5 ++++-
 net/ipv4/tcp_ipv4.c        |  4 ++--
 net/ipv4/tcp_output.c      |  2 +-
 net/ipv6/tcp_ipv6.c        |  3 +++
 net/sched/sch_fq.c         |  3 ++-
 11 files changed, 44 insertions(+), 20 deletions(-)

Comments

patchwork-bot+netdevbpf@kernel.org Oct. 15, 2024, 1 a.m. UTC | #1
Hello:

This series was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Thu, 10 Oct 2024 17:48:12 +0000 you wrote:
> Currently, TCP can set skb->sk for a variety of transmit packets.
> 
> However, packets sent on behalf of a TIME_WAIT sockets do not
> have an attached socket.
> 
> Same issue for RST packets.
> 
> [...]

Here is the summary with links:
  - [v3,net-next,1/5] net: add TIME_WAIT logic to sk_to_full_sk()
    https://git.kernel.org/netdev/net-next/c/78e2baf3d96e
  - [v3,net-next,2/5] net_sched: sch_fq: prepare for TIME_WAIT sockets
    https://git.kernel.org/netdev/net-next/c/bc43a3c83cad
  - [v3,net-next,3/5] net: add skb_set_owner_edemux() helper
    https://git.kernel.org/netdev/net-next/c/5ced52fa8f0d
  - [v3,net-next,4/5] ipv6: tcp: give socket pointer to control skbs
    https://git.kernel.org/netdev/net-next/c/507a96737d99
  - [v3,net-next,5/5] ipv4: tcp: give socket pointer to control skbs
    https://git.kernel.org/netdev/net-next/c/79636038d37e

You are awesome, thank you!