patch 'hash: fix unaligned access in predictable RSS' has been queued to stable release 23.11.6

Shani Peretz shperetz at nvidia.com
Sun Dec 21 15:55:54 CET 2025


Hi,

FYI, your patch has been queued to stable release 23.11.6

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/26/25. 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/shanipr/dpdk-stable

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

Thanks.

Shani

---
>From f8bbc018d3c4f66e50e6879b1fd711f39fe8beea Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand at redhat.com>
Date: Wed, 18 Jun 2025 17:33:38 +0200
Subject: [PATCH] hash: fix unaligned access in predictable RSS

[ upstream commit b70d04d8ac6d47b221500d418df1de2b2c65b50a ]

Caught by UBSan:

../lib/hash/rte_thash.c:421:8: runtime error: load of misaligned address
	0x0001816c2da3 for type 'uint32_t' (aka 'unsigned int'),
	which requires 4 byte alignment

Fixes: 28ebff11c2dc ("hash: add predictable RSS")

Signed-off-by: David Marchand <david.marchand at redhat.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin at intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev at huawei.com>
Acked-by: Chengwen Feng <fengchengwen at huawei.com>
---
 lib/hash/rte_thash.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/hash/rte_thash.c b/lib/hash/rte_thash.c
index a952006686..9747a65dfa 100644
--- a/lib/hash/rte_thash.c
+++ b/lib/hash/rte_thash.c
@@ -437,10 +437,10 @@ generate_subkey(struct rte_thash_ctx *ctx, struct thash_lfsr *lfsr,
 static inline uint32_t
 get_subvalue(struct rte_thash_ctx *ctx, uint32_t offset)
 {
-	uint32_t *tmp, val;
+	uint32_t tmp, val;
 
-	tmp = (uint32_t *)(&ctx->hash_key[offset >> 3]);
-	val = rte_be_to_cpu_32(*tmp);
+	tmp = *(unaligned_uint32_t *)&ctx->hash_key[offset >> 3];
+	val = rte_be_to_cpu_32(tmp);
 	val >>= (TOEPLITZ_HASH_LEN - ((offset & (CHAR_BIT - 1)) +
 		ctx->reta_sz_log));
 
-- 
2.43.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-12-21 16:54:17.718390564 +0200
+++ 0006-hash-fix-unaligned-access-in-predictable-RSS.patch	2025-12-21 16:54:16.639047000 +0200
@@ -1 +1 @@
-From b70d04d8ac6d47b221500d418df1de2b2c65b50a Mon Sep 17 00:00:00 2001
+From f8bbc018d3c4f66e50e6879b1fd711f39fe8beea Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b70d04d8ac6d47b221500d418df1de2b2c65b50a ]
+
@@ -13 +14,0 @@
-Cc: stable at dpdk.org
@@ -25 +26 @@
-index 6c662bf14f..0f9ed20d0d 100644
+index a952006686..9747a65dfa 100644
@@ -28 +29 @@
-@@ -415,10 +415,10 @@ generate_subkey(struct rte_thash_ctx *ctx, struct thash_lfsr *lfsr,
+@@ -437,10 +437,10 @@ generate_subkey(struct rte_thash_ctx *ctx, struct thash_lfsr *lfsr,


More information about the stable mailing list