Netdev List
 help / color / mirror / Atom feed
From: Todd Freed <toddfreed@meta.com>
To: <netdev@vger.kernel.org>, <toddfreed@meta.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Simon Horman <horms@kernel.org>,
	Daniel Zahka <daniel.zahka@gmail.com>,
	Willem de Bruijn <willemdebruijn.kernel@gmail.com>,
	Wei Wang <weiwan@google.com>, Jamal Hadi Salim <jhs@mojatatu.com>,
	Jiri Pirko <jiri@resnulli.us>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>,
	Martin KaFai Lau <martin.lau@linux.dev>,
	John Fastabend <john.fastabend@gmail.com>,
	"Stanislav Fomichev" <sdf@fomichev.me>,
	Sabrina Dubroca <sd@queasysnail.net>,
	"Boris Pismenny" <borisp@nvidia.com>, <bpf@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: [PATCH net 0/3] net: don't redirect decrypted skbs to ingress, psp time-wait validator
Date: Fri, 13 Nov 2026 10:55:50 -0800	[thread overview]
Message-ID: <20261113185553.171059-1-toddfreed@meta.com> (raw)

Three fixes that are relevant for the net-next series, "psp: introduce
socket-less associations". These were previously patches 6-8 of its v1:

  https://lore.kernel.org/netdev/20261111005533.6436-1-toddfreed@meta.com

The first two patches prevent sending decrypted skbs from egress to
ingress, since the meaning of skb->decrypted depends on the direction.
This affects the packets of kTLS and PSP device offload sockets.

The third patch makes psp_twsk_init() give a validator only to the
time-wait sockets of PSP connections with a Tx key, instead of to every
TCP time-wait socket. It has no effect today, but the net-next series
will rely on the presence of the validator to check if the socket has
an encryption offload.

Testing, on two hosts with mlx5 (ConnectX-7), with and without the
patches: an egress rule on a connection's flow sends its packets to the
device's ingress, with mirred (mirror and redirect) or bpf
(bpf_clone_redirect() and bpf_redirect() with BPF_F_INGRESS), for a PSP
device offload socket, a kTLS device offload socket and a plain TCP
socket.

Without the patches, the PSP and kTLS sockets' packets arrive on ingress
in all four cases. With them, none do: mirrored and cloned packets still
go out, encrypted by the device, and redirected ones are dropped. The
plain TCP socket's packets arrive on ingress in all four cases, with and
without the patches. The PSP and plain TCP cases give the same results
on netdevsim.

drivers/net psp.py and hw/tls_hw_offload.py pass, with and without the
patches, as does tc-testing mirred.json on netdevsim (39 pass, 7 skipped
by their dependsOn probes). Each patch builds without warnings (gcc and
clang, allmodconfig, W=1).

Todd Freed (3):
  net/sched: act_mirred: don't send decrypted skbs from egress to
    ingress
  bpf: don't redirect decrypted skbs from egress to ingress
  psp: only give time-wait sockets of PSP connections a validator

 net/core/filter.c      | 10 ++++++++++
 net/psp/psp_sock.c     |  7 +++++--
 net/sched/act_mirred.c |  6 ++++++
 3 files changed, 21 insertions(+), 2 deletions(-)


base-commit: ead6fa9a0ab194f02a2f36d634b193e9c5f9a1c6
-- 
2.53.1-Meta

             reply	other threads:[~2026-11-13 18:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-13 18:55 Todd Freed [this message]
2026-11-13 18:55 ` [PATCH net 1/3] net/sched: act_mirred: don't send decrypted skbs from egress to ingress Todd Freed
2026-11-13 18:55 ` [PATCH net 2/3] bpf: don't redirect " Todd Freed
2026-11-13 18:55 ` [PATCH net 3/3] psp: only give time-wait sockets of PSP connections a validator Todd Freed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261113185553.171059-1-toddfreed@meta.com \
    --to=toddfreed@meta.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=borisp@nvidia.com \
    --cc=bpf@vger.kernel.org \
    --cc=daniel.zahka@gmail.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=horms@kernel.org \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=john.fastabend@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sd@queasysnail.net \
    --cc=sdf@fomichev.me \
    --cc=weiwan@google.com \
    --cc=willemdebruijn.kernel@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox