linux-postmarketos-lts: Upgrade to 6.18.30
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8565>
This commit is contained in:
parent
fa890a3978
commit
d43fb9230e
9 changed files with 16 additions and 117 deletions
|
|
@ -1,99 +0,0 @@
|
|||
From f4c50a4034e62ab75f1d5cdd191dd5f9c77fdff4 Mon Sep 17 00:00:00 2001
|
||||
From: Kuan-Ting Chen <h3xrabbit@gmail.com>
|
||||
Date: Mon, 4 May 2026 23:27:12 +0800
|
||||
Subject: [PATCH] xfrm: esp: avoid in-place decrypt on shared skb frags
|
||||
|
||||
MSG_SPLICE_PAGES can attach pages from a pipe directly to an skb. TCP
|
||||
marks such skbs with SKBFL_SHARED_FRAG after skb_splice_from_iter(),
|
||||
so later paths that may modify packet data can first make a private
|
||||
copy. The IPv4/IPv6 datagram append paths did not set this flag when
|
||||
splicing pages into UDP skbs.
|
||||
|
||||
That leaves an ESP-in-UDP packet made from shared pipe pages looking
|
||||
like an ordinary uncloned nonlinear skb. ESP input then takes the no-COW
|
||||
fast path for uncloned skbs without a frag_list and decrypts in place
|
||||
over data that is not owned privately by the skb.
|
||||
|
||||
Mark IPv4/IPv6 datagram splice frags with SKBFL_SHARED_FRAG, matching
|
||||
TCP. Also make ESP input fall back to skb_cow_data() when the flag is
|
||||
present, so ESP does not decrypt externally backed frags in place.
|
||||
Private nonlinear skb frags still use the existing fast path.
|
||||
|
||||
This intentionally does not change ESP output. In esp_output_head(),
|
||||
the path that appends the ESP trailer to existing skb tailroom without
|
||||
calling skb_cow_data() is not reachable for nonlinear skbs:
|
||||
skb_tailroom() returns zero when skb->data_len is nonzero, while ESP
|
||||
tailen is positive. Thus ESP output will either use the separate
|
||||
destination-frag path or fall back to skb_cow_data().
|
||||
|
||||
Fixes: cac2661c53f3 ("esp4: Avoid skb_cow_data whenever possible")
|
||||
Fixes: 03e2a30f6a27 ("esp6: Avoid skb_cow_data whenever possible")
|
||||
Fixes: 7da0dde68486 ("ip, udp: Support MSG_SPLICE_PAGES")
|
||||
Fixes: 6d8192bd69bb ("ip6, udp6: Support MSG_SPLICE_PAGES")
|
||||
Reported-by: Hyunwoo Kim <imv4bel@gmail.com>
|
||||
Reported-by: Kuan-Ting Chen <h3xrabbit@gmail.com>
|
||||
Tested-by: Hyunwoo Kim <imv4bel@gmail.com>
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Kuan-Ting Chen <h3xrabbit@gmail.com>
|
||||
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
|
||||
---
|
||||
net/ipv4/esp4.c | 3 ++-
|
||||
net/ipv4/ip_output.c | 2 ++
|
||||
net/ipv6/esp6.c | 3 ++-
|
||||
net/ipv6/ip6_output.c | 2 ++
|
||||
4 files changed, 8 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/net/ipv4/esp4.c b/net/ipv4/esp4.c
|
||||
index 6dfc0bcdef6542..6a5febbdbee493 100644
|
||||
--- a/net/ipv4/esp4.c
|
||||
+++ b/net/ipv4/esp4.c
|
||||
@@ -873,7 +873,8 @@ static int esp_input(struct xfrm_state *x, struct sk_buff *skb)
|
||||
nfrags = 1;
|
||||
|
||||
goto skip_cow;
|
||||
- } else if (!skb_has_frag_list(skb)) {
|
||||
+ } else if (!skb_has_frag_list(skb) &&
|
||||
+ !skb_has_shared_frag(skb)) {
|
||||
nfrags = skb_shinfo(skb)->nr_frags;
|
||||
nfrags++;
|
||||
|
||||
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
|
||||
index e4790cc7b5c2ec..5bcd73cbdb41c0 100644
|
||||
--- a/net/ipv4/ip_output.c
|
||||
+++ b/net/ipv4/ip_output.c
|
||||
@@ -1233,6 +1233,8 @@ static int __ip_append_data(struct sock *sk,
|
||||
if (err < 0)
|
||||
goto error;
|
||||
copy = err;
|
||||
+ if (!(flags & MSG_NO_SHARED_FRAGS))
|
||||
+ skb_shinfo(skb)->flags |= SKBFL_SHARED_FRAG;
|
||||
wmem_alloc_delta += copy;
|
||||
} else if (!zc) {
|
||||
int i = skb_shinfo(skb)->nr_frags;
|
||||
diff --git a/net/ipv6/esp6.c b/net/ipv6/esp6.c
|
||||
index 9f75313734f8cd..9c06c5a1419dc4 100644
|
||||
--- a/net/ipv6/esp6.c
|
||||
+++ b/net/ipv6/esp6.c
|
||||
@@ -915,7 +915,8 @@ static int esp6_input(struct xfrm_state *x, struct sk_buff *skb)
|
||||
nfrags = 1;
|
||||
|
||||
goto skip_cow;
|
||||
- } else if (!skb_has_frag_list(skb)) {
|
||||
+ } else if (!skb_has_frag_list(skb) &&
|
||||
+ !skb_has_shared_frag(skb)) {
|
||||
nfrags = skb_shinfo(skb)->nr_frags;
|
||||
nfrags++;
|
||||
|
||||
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
|
||||
index 7e92909ab5be3f..1f2a33fbed6e63 100644
|
||||
--- a/net/ipv6/ip6_output.c
|
||||
+++ b/net/ipv6/ip6_output.c
|
||||
@@ -1794,6 +1794,8 @@ static int __ip6_append_data(struct sock *sk,
|
||||
if (err < 0)
|
||||
goto error;
|
||||
copy = err;
|
||||
+ if (!(flags & MSG_NO_SHARED_FRAGS))
|
||||
+ skb_shinfo(skb)->flags |= SKBFL_SHARED_FRAG;
|
||||
wmem_alloc_delta += copy;
|
||||
} else if (!zc) {
|
||||
int i = skb_shinfo(skb)->nr_frags;
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
# Co-Maintainer: Achill Gilgenast <achill@achill.org>
|
||||
maintainer="Aelin <aelin@postmarketos.org>"
|
||||
pkgname=linux-postmarketos-lts
|
||||
pkgver=6.18.27
|
||||
pkgver=6.18.30
|
||||
pkgrel=0
|
||||
_kver=${pkgver%.*}
|
||||
pkgdesc="LTS Kernel"
|
||||
|
|
@ -63,7 +63,6 @@ source="
|
|||
0001-WIP-arch-powerpc-boot-Support-LLVM-1-in-wrapper-scri.patch
|
||||
0002-WIP-arch-powerpc-boot-Use-z-notext-for-pseries-image.patch
|
||||
0003-WIP-arch-powerpc-boot-Add-z-norelro.patch
|
||||
0004-xfrm-esp-avoid-in-place-decrypt-on-shared-skb-frags.patch
|
||||
|
||||
config-lts.aarch64
|
||||
config-lts.armv7
|
||||
|
|
@ -125,17 +124,16 @@ package() {
|
|||
}
|
||||
|
||||
sha512sums="
|
||||
0a2eb365a627c6ea7fd761a3472a5cf21984f885fff30dfe385fc123dffd4758835aa774f01008c2bf92405bd4099382a63c1297acc7802421382ab356de4de8 patch-6.18.27.patch.xz
|
||||
63333073f0cc014d5e162e4445ae8e481f6de3e63f90b7c6e862e1c10722f181db5ad9a80f8b94c4adb9878ba0026f866378a27efb6e34774f542175ab94956f patch-6.18.30.patch.xz
|
||||
88599ffdec96d150c1feb9b261ba93bb0301a9d0e1ad6bef7aeab1f5372cbfc57d8b43c7e902bd8f76921d1dbd8189663c142ea869e51d0e2b483b150ee00fe0 linux-6.18.tar.xz
|
||||
1f11df2480e9f691573283597160b4c806e492cdca4825f3acb3afb70bde43abfab487bcde1f5553b431a702a0039479d041b0ce7859970e706b5a51d2ad8fb0 0001-WIP-arch-powerpc-boot-Support-LLVM-1-in-wrapper-scri.patch
|
||||
26521a9c9ea769534095dc4e306babadc8bcbaf03d7faa523c377e41ba0f742ecd0490fa27791d895f729c3ae8845297dca59b4db2475e7f078e689c447430bc 0002-WIP-arch-powerpc-boot-Use-z-notext-for-pseries-image.patch
|
||||
302c20c85559fc9b3b2420ed25be1bfbb76c87f2a470e4141c32e9542cf1f5c6b3b5a7847231a3eaa0f6bc0e5942d0c1599e807175dcf5e63469704c3d6adde3 0003-WIP-arch-powerpc-boot-Add-z-norelro.patch
|
||||
2adacf5b985fc7f2adec208e38974e7d0960a425f28a33218d1e52f749f2262f12b3fdad16e3f636dce00c71bff94f6a178961e2572bc0499803a786972ddffc 0004-xfrm-esp-avoid-in-place-decrypt-on-shared-skb-frags.patch
|
||||
7302afacb1551c883006b5d4bfb2fb8e0f3b82c0e67e1a2dea60417f23fce2943a266e87d10eaf96293434f72c00eb3fe554bc02d6e0a00d6103caa0abf5635d config-lts.aarch64
|
||||
7ce2625c6cdf7f36a6ca2104896eb2361a547e2a949f6ddab2467d9274a9b9fbe02f5d635cc4db8227e0ea6e0c4c0724586bef7c70aa04e03ae930de0b43e4f4 config-lts.armv7
|
||||
3cd97af6942fd5856bd49103a90e5f7d5a6c4cb3a0b306a089392430dec58047b1778aafe2a9e64a6f777acf3c0a662c79378948659abd16111957347d36e231 config-lts.loongarch64
|
||||
345874c4e3a221ba9a4671689ea3e2c2db9df205a7d9185f0fcec6817bbcbf77012f6a2af86a7dfae5c86d4478c6375213e92b41987d71bc21dae4175590b1ce config-lts.ppc64le
|
||||
fc0e6e65a3a04909191b6f6e00537771365246d49ec38e79f2f1176813a35dc6684296763259fa6bd527d6809c30bf93d8ef5f3a6fa9ebeb554a87245c70c8b9 config-lts.riscv64
|
||||
98c4346185513b1f1cc6dd47ab9dcedc097a64166e34a031bb456735e303c68101ba2c9398de903005ca1508cffffeecd07f07b5bfa14fc064c0548c84e45b30 config-lts.x86
|
||||
3dc56b1397201ea8e9259b66c21402805178f87ce2aea208a4b1de659a346deb8ca88e045aad5575cae0619aa209aa5315c68835141bf688006c40e0e6f015b5 config-lts.x86_64
|
||||
aa19b22d92c33bddaa444418813e6e8bea651fc8045caf7c6e889cfee1489cbb3a2ea3410938299ebcb9fac2caeb776f348decfa234f7dcd3ef34793f3fe39ac config-lts.aarch64
|
||||
0d32fdd4ac0b03c33617cae3de306eaea935ed481bf2ad5a4c8260ee3a6044703dad4bbd8e5013355630e4439b1fe54801e97dc3904650f43e683bdc15d702c4 config-lts.armv7
|
||||
5d75bb4d266447fd88259762c0bd70b44fba281c1c12dce232a75965a0936268c58fc454ff8bbcaeaac5bef1255bed1be1f64feea33d717ec8906bf1c7b9e5e6 config-lts.loongarch64
|
||||
dd07165e8066802e24adcbf7bcc7fd5a9e19709ae3c6443196d0d82fdeebf7fe264709a5d50611228139364e815a672a0bb8cb796a245e0395918fdce187d50a config-lts.ppc64le
|
||||
4fef80b96deb368721cf182c12c91bd2cd94619b0f02bda6920bb32441635aed6427485bcf81910421e606d446b716492efd9c56ba3f13e83c086a8978e07857 config-lts.riscv64
|
||||
6b8200dc873dd1276baa704b730de8f369f935442a1a06f01ed771b24f16caca08be708928af0f83bebcd8c352fbcf7929101e19914787329ab5cd0c9d78694f config-lts.x86
|
||||
81f6928fcb0ec9e472933ff2b2c82b2fe9902fe122e0be69e05ff3c8e3e41c1f4fa18d7686fe99d00d0e0131383a5956be69c77510af6eee74330c868ff095e4 config-lts.x86_64
|
||||
"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Linux/arm64 6.18.27 Kernel Configuration
|
||||
# Linux/arm64 6.18.30 Kernel Configuration
|
||||
#
|
||||
CONFIG_CC_VERSION_TEXT="Alpine clang version 22.1.3"
|
||||
CONFIG_GCC_VERSION=0
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Linux/arm 6.18.27 Kernel Configuration
|
||||
# Linux/arm 6.18.30 Kernel Configuration
|
||||
#
|
||||
CONFIG_CC_VERSION_TEXT="Alpine clang version 22.1.3"
|
||||
CONFIG_GCC_VERSION=0
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Linux/loongarch 6.18.27 Kernel Configuration
|
||||
# Linux/loongarch 6.18.30 Kernel Configuration
|
||||
#
|
||||
CONFIG_CC_VERSION_TEXT="Alpine clang version 22.1.3"
|
||||
CONFIG_GCC_VERSION=0
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Linux/powerpc 6.18.27 Kernel Configuration
|
||||
# Linux/powerpc 6.18.30 Kernel Configuration
|
||||
#
|
||||
CONFIG_CC_VERSION_TEXT="Alpine clang version 22.1.3"
|
||||
CONFIG_GCC_VERSION=0
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Linux/riscv 6.18.27 Kernel Configuration
|
||||
# Linux/riscv 6.18.30 Kernel Configuration
|
||||
#
|
||||
CONFIG_CC_VERSION_TEXT="Alpine clang version 22.1.3"
|
||||
CONFIG_GCC_VERSION=0
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Linux/i386 6.18.27 Kernel Configuration
|
||||
# Linux/i386 6.18.30 Kernel Configuration
|
||||
#
|
||||
CONFIG_CC_VERSION_TEXT="Alpine clang version 22.1.3"
|
||||
CONFIG_GCC_VERSION=0
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Linux/x86_64 6.18.27 Kernel Configuration
|
||||
# Linux/x86_64 6.18.30 Kernel Configuration
|
||||
#
|
||||
CONFIG_CC_VERSION_TEXT="Alpine clang version 22.1.3"
|
||||
CONFIG_GCC_VERSION=0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue