All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net 0/2] net: psp: preserve SKB_EXT_PSP across packet scrubbing
@ 2026-10-25  4:05 Wei Wang
  2026-10-25  4:05 ` [PATCH net 1/2] net: Make PSP skb extension survive " Wei Wang
  2026-10-25  4:05 ` [PATCH net 2/2] selftests/net: psp: test bidirectional data transfer Wei Wang
  0 siblings, 2 replies; 7+ messages in thread
From: Wei Wang @ 2026-10-25  4:05 UTC (permalink / raw)
  To: David S . Miller, Jakub Kicinski, Paolo Abeni, Andrew Lunn,
	Shuah Khan
  Cc: Simon Horman, Jakub Sitnicki, Daniel Zahka, Willem de Bruijn,
	netdev, linux-kselftest, linux-kernel, bpf, Wei Wang

When a virtual interface such as netkit is associated with a PSP device
in another network namespace via PSP_CMD_DEV_ASSOC, incoming PSP packets
decapsulated on the physical device lose their SKB_EXT_PSP extension
when scrubbed during cross-namespace redirection (e.g. skb_do_redirect()
calling skb_scrub_packet()). As a result, __psp_sk_rx_policy_check()
rejects incoming PSP-encrypted TCP data segments at the socket layer.

This gap slipped through the existing psp.py selftests because both
_data_basic_send() and _data_basic_send_netkit_psp_assoc() only sent a
unidirectional data stream from the test socket to psp_responder; the
returning pure TCP ACKs had SKB_EXT_PSP stripped by skb_scrub_packet(),
but were still accepted by __psp_sk_rx_policy_check() while peer_tx was
unset.

Patch 1 (originally from Jakub Sitnicki's BPF skb extension series [1])
introduces skb_ext_scrub() to selectively preserve SKB_EXT_PSP during
skb_scrub_packet().

Patch 2 updates the psp.py selftests to exercise bidirectional PSP data
transfer using psp_responder's "data echo" command in both direct and
netkit dev-assoc test cases.

[1] https://lore.kernel.org/netdev/20260910-bpf-meta-inside-skb-ext-v2-3-0b21e42180b0@cloudflare.com/

Wei Wang (2):
  net: Make PSP skb extension survive packet scrubbing
  selftests/net: psp: test bidirectional data transfer

 include/linux/skbuff.h                     |  2 ++
 net/core/skbuff.c                          | 22 ++++++++++++++++++++--
 tools/testing/selftests/drivers/net/psp.py |  8 ++++++++
 3 files changed, 30 insertions(+), 2 deletions(-)

-- 
2.56.0.257.gf7497c7d27-goog


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

end of thread, other threads:[~2026-10-28  6:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-25  4:05 [PATCH net 0/2] net: psp: preserve SKB_EXT_PSP across packet scrubbing Wei Wang
2026-10-25  4:05 ` [PATCH net 1/2] net: Make PSP skb extension survive " Wei Wang
2026-10-26  4:05   ` sashiko-bot
2026-10-26  5:05   ` netdev-bot+sashiko
2026-10-27  1:00   ` Jakub Kicinski
2026-10-28  6:36   ` Kiran Kella
2026-10-25  4:05 ` [PATCH net 2/2] selftests/net: psp: test bidirectional data transfer Wei Wang

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.