patch 'hash: fix unaligned access in predictable RSS' has been queued to stable release 22.11.11
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Mon Oct 27 17:18:44 CET 2025
Hi,
FYI, your patch has been queued to stable release 22.11.11
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 10/29/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/c9c2860199be5e07d4dade6e1229df0593208a57
Thanks.
Luca Boccassi
---
>From c9c2860199be5e07d4dade6e1229df0593208a57 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 363603c102..188cfca6c2 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.47.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-10-27 15:54:35.075253233 +0000
+++ 0006-hash-fix-unaligned-access-in-predictable-RSS.patch 2025-10-27 15:54:34.719947643 +0000
@@ -1 +1 @@
-From b70d04d8ac6d47b221500d418df1de2b2c65b50a Mon Sep 17 00:00:00 2001
+From c9c2860199be5e07d4dade6e1229df0593208a57 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 363603c102..188cfca6c2 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