Hi,
FYI, your patch has been queued to stable release 24.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 02/22/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/7aafb45d5ffceea895631fdc03b873275b1411ee
Thanks.
Luca Boccassi
---
>From 7aafb45d5ffceea895631fdc03b873275b1411ee Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen at networkplumber.org>
Date: Tue, 30 Dec 2025 10:55:14 -0800
Subject: [PATCH] common/cnxk: fix array out-of-bounds
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit 4a6154a7bd275f2cbe9a3aee272b393fd00aeaed ]
Gcc-16 detects out of bounds reference in this code.
In function ‘nix_inl_selftest_work_cb’,
inlined from ‘inl_outb_soft_exp_poll’
at ../drivers/common/cnxk/roc_nix_inl_dev.c:1173:4,
inlined from ‘nix_inl_outb_poll_thread’
at ../drivers/common/cnxk/roc_nix_inl_dev.c:1201:6:
drivers/common/cnxk/roc_nix_inl_dev.c:43:19: warning:
array subscript 1 is outside array bounds of ‘uint64_t[1]’
{aka ‘long unsigned int[1]’} [-Warray-bounds=]
43 | uintptr_t work = gw[1];
| ^~~~
In function ‘nix_inl_outb_poll_thread’:
drivers/common/cnxk/roc_nix_inl_dev.c:1172:34:
note: at offset 8 into object ‘tmp’ of size 8
1172 | uint64_t tmp = ~(uint32_t)0x0;
| ^~~
Fixes: bea5d990a93b ("net/cnxk: support outbound soft expiry notification")
Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
---
drivers/common/cnxk/roc_nix_inl_dev.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/common/cnxk/roc_nix_inl_dev.c b/drivers/common/cnxk/roc_nix_inl_dev.c
index ffe6eef81f..0b6f92e256 100644
--- a/drivers/common/cnxk/roc_nix_inl_dev.c
+++ b/drivers/common/cnxk/roc_nix_inl_dev.c
@@ -751,12 +751,10 @@ inl_outb_soft_exp_poll(struct nix_inl_dev *inl_dev, uint32_t ring_idx)
(entry.s.data0 << 7));
if (sa != NULL) {
- uint64_t tmp = ~(uint32_t)0x0;
- inl_dev->work_cb(&tmp, sa, (port_id << 8) | 0x1);
- __atomic_store_n(ring_base + tail_l + 1, 0ULL,
- __ATOMIC_RELAXED);
- __atomic_fetch_add((uint32_t *)ring_base, 1,
- __ATOMIC_ACQ_REL);
+ uint64_t tmp[2];
+ inl_dev->work_cb(tmp, sa, (port_id << 8) | 0x1);
+ __atomic_store_n(ring_base + tail_l + 1, 0ULL, __ATOMIC_RELAXED);
+ __atomic_fetch_add((uint32_t *)ring_base, 1, __ATOMIC_ACQ_REL);
} else
plt_err("Invalid SA");
--
2.47.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-02-20 14:55:44.678112718 +0000
+++ 0035-common-cnxk-fix-array-out-of-bounds.patch 2026-02-20 14:55:43.208191141 +0000
@@ -1 +1 @@
-From 4a6154a7bd275f2cbe9a3aee272b393fd00aeaed Mon Sep 17 00:00:00 2001
+From 7aafb45d5ffceea895631fdc03b873275b1411ee Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 4a6154a7bd275f2cbe9a3aee272b393fd00aeaed ]
+
@@ -28 +29,0 @@
-Cc: stable at dpdk.org
@@ -36 +37 @@
-index 1eb96f913a..3a4f1ac1e7 100644
+index ffe6eef81f..0b6f92e256 100644
@@ -39 +40 @@
-@@ -1169,12 +1169,10 @@ inl_outb_soft_exp_poll(struct nix_inl_dev *inl_dev, uint32_t ring_idx)
+@@ -751,12 +751,10 @@ inl_outb_soft_exp_poll(struct nix_inl_dev *inl_dev, uint32_t ring_idx)
@@ -44 +45 @@
-- inl_dev->work_cb(&tmp, sa, NIX_INL_SOFT_EXPIRY_THRD, NULL, port_id);
+- inl_dev->work_cb(&tmp, sa, (port_id << 8) | 0x1);
@@ -50 +51 @@
-+ inl_dev->work_cb(tmp, sa, NIX_INL_SOFT_EXPIRY_THRD, NULL, port_id);
++ inl_dev->work_cb(tmp, sa, (port_id << 8) | 0x1);