From: Steffen Klassert <steffen.klassert@secunet.com>
To: David Miller <davem@davemloft.net>, Jakub Kicinski <kuba@kernel.org>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
Steffen Klassert <steffen.klassert@secunet.com>,
<netdev@vger.kernel.org>
Subject: [PATCH 0/22] pull request (net): ipsec 2026-12-01
Date: Tue, 1 Dec 2026 13:41:26 +0100 [thread overview]
Message-ID: <20261201124252.1163254-1-steffen.klassert@secunet.com> (raw)
1) xfrm: ipcomp: account full fragment pages in truesize
Charge the decompressed IPComp skb a page-rounded truesize, so
the socket memory accounting matches the pages actually attached.
2) xfrm: esp: reset outer TCP GSO metadata on espintcp input
Reset the GSO state inherited from the outer TCP stream on
ESP-in-TCP input, so a decrypted packet isn't segmented with
stale metadata and multi-segment records no longer crash.
3) xfrm: keep the mode module pinned until destroy_state returns
Hold an extra module reference across the state destroy callback,
so an rmmod racing the state GC can't free the module text while
the callback is still running.
4) xfrm: serialize SA activation with state deletion
Take the state lock for the final VOID-to-VALID transition, so a
hard expiry can't delete the state in between and leave it in
the per-CPU cache.
5) xfrm: keep old state references until migration deletion completes
Delete the old states before dropping their lookup references, so
a concurrent expiry can't free a state the migration still uses.
6) xfrm: hold migrated states through rollback
Keep a caller reference on the successor states and delete them
before releasing it, so a failed migration can't touch a state
that has already been reclaimed.
7) xfrm: check inner family via skb_dst for small_ipv6 DF clearing
Take the inner address family from the dst instead of skb->protocol,
so the outer DF bit is cleared for small IPv6 packets and the
tunnel doesn't drop them.
8) xfrm: account XFRMA_MARK in xfrm_sa_len()
Count the mark attribute in the SA message length, so the netlink
SA notifications are sized correctly.
9) xfrm: replay: Fix late packet handling with ESN crypto offload
Drop packets far ahead of the replay window when the ICV check
runs in hardware, so a late packet can't corrupt the offloaded
ESN state.
10) xfrm: fix IPv6 first-fragment protocol decode
Let the flow dissector walk past an IPv6 fragment header, so the
inbound policy lookup sees the real upper-layer protocol.
11) xfrm: fix selector matching for IPv6 atomic fragments
Restore the port and protocol selector fields for atomic IPv6
fragments, so such packets can match a policy.
12) xfrm: espintcp: read the socket error queue for MSG_ERRQUEUE
Read the error queue through the socket error path, so a queued
timestamp is reported instead of being consumed as an IKE message.
13) xfrm: iptfs: force a dst reference before queueing an skb
Take a dst reference while the packet is still under RCU, so the
deferred IPTFS output doesn't use a dst that may already be gone.
14) xfrm: espintcp: select receive path by skb protocol
Pick the receive path from the packet protocol instead of the
socket family, so an IPv4 packet on a v4-mapped socket isn't
parsed by the IPv6 path.
15) net: xfrm: interface: restore dst_orig on every xfrm interface
Restore the original route in both arms of the interface xmit
path, so a steered packet finds a policy and the metadata dst is
left untouched.
16) xfrm: iptfs: make room before copying a continuation in reassembly
Grow the skb head before copying a reassembly continuation, so a
larger continuation doesn't overrun the buffer and panic.
17) xfrm/compat: pass on the translated length of a socket policy
Pass the translated policy length to the 32-bit compat layer, so
the last template isn't dropped and an ESP-required policy doesn't
fall back to clear text.
18) xfrm: Give GC list nodes their own storage
Give the GC and hash list nodes separate storage, so adding a
state to the GC list can't corrupt the hash linkage that RCU
readers still follow.
19) xfrm: Serialize device state teardown
Let only one caller free the device state and hold a reference in
the flush, so the state GC and a device flush can't free the same
state.
20) xfrm: Wait for an RCU grace period before freeing device state
Wait for an RCU grace period after collecting the device states,
so the driver state isn't freed while readers are still using it.
21) Revert "xfrm: serialize state GC with device state flush"
Revert the GC and flush mutex, since the reference handling and
the single-free rule make it unnecessary and it can't cover the
lookup path.
22) xfrm: Serialize offload stats updates with x->lock
Serialize the offload stats refresh with the state lock, so the
counters aren't updated twice and a dump doesn't copy them while
they change.
Please pull or let me know if there are problems.
Thanks!
The following changes since commit 787268686c64be60023743b527645a907e38ccca:
ipmr, ip6mr: queue netlink route queries out of band (2026-11-03 22:30:55 +0100)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec.git tags/ipsec-2026-12-01
for you to fetch changes up to bb65a0da99bf4861dce01149ba64e875e47ae5a3:
xfrm: Serialize offload stats updates with x->lock (2026-11-30 11:36:34 +0100)
----------------------------------------------------------------
ipsec-2026-12-01
----------------------------------------------------------------
Andrii Tereshchenko (2):
xfrm: iptfs: make room before copying a continuation in reassembly
xfrm/compat: pass on the translated length of a socket policy
Baek Kyu, Kim (1):
xfrm: espintcp: read the socket error queue for MSG_ERRQUEUE
Cen Zhang (3):
xfrm: keep the mode module pinned until destroy_state returns
xfrm: keep old state references until migration deletion completes
xfrm: hold migrated states through rollback
Cosmin Ratiu (1):
xfrm: replay: Fix late packet handling with ESN crypto offload
Guoshuai Yang (1):
xfrm: esp: reset outer TCP GSO metadata on espintcp input
Jamal Hadi Salim (1):
net: xfrm: interface: restore dst_orig on every xfrm interface
Jianbo Liu (5):
xfrm: Give GC list nodes their own storage
xfrm: Serialize device state teardown
xfrm: Wait for an RCU grace period before freeing device state
Revert "xfrm: serialize state GC with device state flush"
xfrm: Serialize offload stats updates with x->lock
Jérémy Jean (2):
xfrm: fix IPv6 first-fragment protocol decode
xfrm: fix selector matching for IPv6 atomic fragments
Kyle Zeng (1):
xfrm: serialize SA activation with state deletion
Nguyen Ngoc Thang (1):
xfrm: iptfs: force a dst reference before queueing an skb
Sewook Seo (1):
xfrm: check inner family via skb_dst for small_ipv6 DF clearing
Yasuaki Torimaru (1):
xfrm: account XFRMA_MARK in xfrm_sa_len()
Zhiling Zou (1):
xfrm: ipcomp: account full fragment pages in truesize
Zihan Xi (1):
xfrm: espintcp: select receive path by skb protocol
include/net/esp.h | 51 +++++++++++++
include/net/ipv6.h | 1 +
include/net/xfrm.h | 26 ++++---
net/core/filter.c | 8 --
net/ipv4/esp4.c | 9 +++
net/ipv6/esp6.c | 9 +++
net/ipv6/exthdrs_core.c | 25 ++++---
net/xfrm/espintcp.c | 5 +-
net/xfrm/xfrm_compat.c | 18 ++++-
net/xfrm/xfrm_device.c | 4 +-
net/xfrm/xfrm_interface_bpf.c | 19 ++---
net/xfrm/xfrm_interface_core.c | 22 +++---
net/xfrm/xfrm_ipcomp.c | 2 +-
net/xfrm/xfrm_iptfs.c | 17 ++++-
net/xfrm/xfrm_output.c | 5 +-
net/xfrm/xfrm_policy.c | 61 +++++++++++----
net/xfrm/xfrm_replay.c | 14 +++-
net/xfrm/xfrm_state.c | 164 ++++++++++++++++++++++++++++++++---------
net/xfrm/xfrm_user.c | 50 +++++++++++--
19 files changed, 395 insertions(+), 115 deletions(-)
next reply other threads:[~2026-12-01 12:44 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 12:41 Steffen Klassert [this message]
2026-12-01 12:41 ` [PATCH 01/22] xfrm: ipcomp: account full fragment pages in truesize Steffen Klassert
2026-12-01 12:41 ` [PATCH 02/22] xfrm: esp: reset outer TCP GSO metadata on espintcp input Steffen Klassert
2026-12-01 12:41 ` [PATCH 03/22] xfrm: keep the mode module pinned until destroy_state returns Steffen Klassert
2026-12-01 12:41 ` [PATCH 04/22] xfrm: serialize SA activation with state deletion Steffen Klassert
2026-12-01 12:41 ` [PATCH 05/22] xfrm: keep old state references until migration deletion completes Steffen Klassert
2026-12-01 12:41 ` [PATCH 06/22] xfrm: hold migrated states through rollback Steffen Klassert
2026-12-01 12:41 ` [PATCH 07/22] xfrm: check inner family via skb_dst for small_ipv6 DF clearing Steffen Klassert
2026-12-01 12:41 ` [PATCH 08/22] xfrm: account XFRMA_MARK in xfrm_sa_len() Steffen Klassert
2026-12-01 12:41 ` [PATCH 09/22] xfrm: replay: Fix late packet handling with ESN crypto offload Steffen Klassert
2026-12-01 12:41 ` [PATCH 10/22] xfrm: fix IPv6 first-fragment protocol decode Steffen Klassert
2026-12-01 12:41 ` [PATCH 11/22] xfrm: fix selector matching for IPv6 atomic fragments Steffen Klassert
2026-12-01 12:41 ` [PATCH 12/22] xfrm: espintcp: read the socket error queue for MSG_ERRQUEUE Steffen Klassert
2026-12-01 12:41 ` [PATCH 13/22] xfrm: iptfs: force a dst reference before queueing an skb Steffen Klassert
2026-12-01 12:41 ` [PATCH 14/22] xfrm: espintcp: select receive path by skb protocol Steffen Klassert
2026-12-01 12:41 ` [PATCH 15/22] net: xfrm: interface: restore dst_orig on every xfrm interface Steffen Klassert
2026-12-01 12:41 ` [PATCH 16/22] xfrm: iptfs: make room before copying a continuation in reassembly Steffen Klassert
2026-12-01 12:41 ` [PATCH 17/22] xfrm/compat: pass on the translated length of a socket policy Steffen Klassert
2026-12-01 12:41 ` [PATCH 18/22] xfrm: Give GC list nodes their own storage Steffen Klassert
2026-12-01 12:41 ` [PATCH 19/22] xfrm: Serialize device state teardown Steffen Klassert
2026-12-01 12:41 ` [PATCH 20/22] xfrm: Wait for an RCU grace period before freeing device state Steffen Klassert
2026-12-01 12:41 ` [PATCH 21/22] Revert "xfrm: serialize state GC with device state flush" Steffen Klassert
2026-12-01 12:41 ` [PATCH 22/22] xfrm: Serialize offload stats updates with x->lock Steffen Klassert
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=20261201124252.1163254-1-steffen.klassert@secunet.com \
--to=steffen.klassert@secunet.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
/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