patch 'bpf/arm64: mask shift count per RFC 9669' has been queued to stable release 25.11.5

Kevin Traynor ktraynor at redhat.com
Thu Dec 3 14:02:34 CET 2026


Hi,

FYI, your patch has been queued to stable release 25.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/08/26. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/e6a626b800a1bc6064efa4e727fec98caef13b43

Thanks.

Kevin

---
>From e6a626b800a1bc6064efa4e727fec98caef13b43 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen at networkplumber.org>
Date: Thu, 27 Aug 2026 14:41:43 -0700
Subject: [PATCH] bpf/arm64: mask shift count per RFC 9669

[ upstream commit e3149599865f123bc4582d845311dc384c3da7dd ]

The ARM JIT was not masking the shift count as required by RFC 9669
(0x3f for 64-bit, 0x1f for 32-bit), so large immediate shift counts
overflowed the UBFM/SBFM encoding and failed the JIT. Mask the
immediate in emit_lsl/emit_lsr/emit_asr.

Fixes: 9f4469d9e83a ("bpf/arm: add logical operations")

Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
Acked-by: Marat Khalili <marat.khalili at huawei.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev at huawei.com>
---
 lib/bpf/bpf_jit_arm64.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/lib/bpf/bpf_jit_arm64.c b/lib/bpf/bpf_jit_arm64.c
index 76df1e4ba1..ca02067634 100644
--- a/lib/bpf/bpf_jit_arm64.c
+++ b/lib/bpf/bpf_jit_arm64.c
@@ -546,4 +546,5 @@ emit_bitfield(struct a64_jit_ctx *ctx, bool is64, uint8_t rd, uint8_t rn,
 		  check_immr_imms(is64, immr, imms));
 }
+
 static void
 emit_lsl(struct a64_jit_ctx *ctx, bool is64, uint8_t rd, uint8_t imm)
@@ -552,4 +553,5 @@ emit_lsl(struct a64_jit_ctx *ctx, bool is64, uint8_t rd, uint8_t imm)
 	uint8_t imms, immr;
 
+	imm &= width - 1;
 	immr = (width - imm) & (width - 1);
 	imms = width - 1 - imm;
@@ -561,5 +563,8 @@ static void
 emit_lsr(struct a64_jit_ctx *ctx, bool is64, uint8_t rd, uint8_t imm)
 {
-	emit_bitfield(ctx, is64, rd, rd, imm, is64 ? 63 : 31, A64_UBFM);
+	const unsigned int width = is64 ? 64 : 32;
+
+	imm &= width - 1;
+	emit_bitfield(ctx, is64, rd, rd, imm, width - 1, A64_UBFM);
 }
 
@@ -567,5 +572,8 @@ static void
 emit_asr(struct a64_jit_ctx *ctx, bool is64, uint8_t rd, uint8_t imm)
 {
-	emit_bitfield(ctx, is64, rd, rd, imm, is64 ? 63 : 31, A64_SBFM);
+	const unsigned int width = is64 ? 64 : 32;
+
+	imm &= width - 1;
+	emit_bitfield(ctx, is64, rd, rd, imm, width - 1, A64_SBFM);
 }
 
-- 
2.56.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-12-03 12:52:45.723229185 +0000
+++ 0228-bpf-arm64-mask-shift-count-per-RFC-9669.patch	2026-12-03 12:52:39.191804889 +0000
@@ -1 +1 @@
-From e3149599865f123bc4582d845311dc384c3da7dd Mon Sep 17 00:00:00 2001
+From e6a626b800a1bc6064efa4e727fec98caef13b43 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e3149599865f123bc4582d845311dc384c3da7dd ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org
@@ -22 +23 @@
-index ba7ae4d680..7582370062 100644
+index 76df1e4ba1..ca02067634 100644



More information about the stable mailing list