patch 'mem: check fbarray name truncation in secondary process' has been queued to stable release 25.11.1
Kevin Traynor
ktraynor at redhat.com
Thu Feb 26 14:10:38 CET 2026
Hi,
FYI, your patch has been queued to stable release 25.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/a084bb1f6576874ac258a40c48db924b46f3b4c3
Thanks.
Kevin
---
>From a084bb1f6576874ac258a40c48db924b46f3b4c3 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas at monjalon.net>
Date: Thu, 5 Feb 2026 17:16:01 +0100
Subject: [PATCH] mem: check fbarray name truncation in secondary process
[ upstream commit 9f3d51136011e1ed63180332730768efaa35c0a3 ]
When compiling in debug mode, the format-truncation check
raises a warning:
In function 'secondary_msl_create_walk':
lib/eal/linux/eal_memalloc.c:1401:50:
error: '%i' directive output may be truncated writing
between 1 and 11 bytes into a region of size between 0 and 63
[-Werror=format-truncation=]
note: 'snprintf' output between 3 and 76 bytes
into a destination of size 64
1401 | snprintf(name, RTE_FBARRAY_NAME_LEN, "%s_%i",
1402 | primary_msl->memseg_arr.name, getpid());
This is a new warning enabled in DPDK 26.03.
It is solved by checking the return of snprintf.
Bugzilla ID: 1878
Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
---
lib/eal/linux/eal_memalloc.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/lib/eal/linux/eal_memalloc.c b/lib/eal/linux/eal_memalloc.c
index 1e60e21620..840efab244 100644
--- a/lib/eal/linux/eal_memalloc.c
+++ b/lib/eal/linux/eal_memalloc.c
@@ -1392,6 +1392,11 @@ secondary_msl_create_walk(const struct rte_memseg_list *msl,
/* create distinct fbarrays for each secondary */
- snprintf(name, RTE_FBARRAY_NAME_LEN, "%s_%i",
+ ret = snprintf(name, RTE_FBARRAY_NAME_LEN, "%s_%i",
primary_msl->memseg_arr.name, getpid());
+ if (ret >= RTE_FBARRAY_NAME_LEN) {
+ EAL_LOG(ERR, "fbarray name %s_%i is too long",
+ primary_msl->memseg_arr.name, getpid());
+ return -1;
+ }
ret = rte_fbarray_init(&local_msl->memseg_arr, name,
--
2.53.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-02-26 10:16:53.094554294 +0000
+++ 0156-mem-check-fbarray-name-truncation-in-secondary-proce.patch 2026-02-26 10:16:47.225460435 +0000
@@ -1 +1 @@
-From 9f3d51136011e1ed63180332730768efaa35c0a3 Mon Sep 17 00:00:00 2001
+From a084bb1f6576874ac258a40c48db924b46f3b4c3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9f3d51136011e1ed63180332730768efaa35c0a3 ]
+
@@ -30 +32 @@
-index d9e8ea76b9..4dee224ac5 100644
+index 1e60e21620..840efab244 100644
@@ -33 +35 @@
-@@ -1399,6 +1399,11 @@ secondary_msl_create_walk(const struct rte_memseg_list *msl,
+@@ -1392,6 +1392,11 @@ secondary_msl_create_walk(const struct rte_memseg_list *msl,
More information about the stable
mailing list