patch 'examples/vm_power: check truncation of socket path' has been queued to stable release 24.11.5
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Thu Mar 19 23:02:57 CET 2026
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 03/21/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/751d991b3ca34c18d9ef8446a1588a233929c878
Thanks.
Luca Boccassi
---
>From 751d991b3ca34c18d9ef8446a1588a233929c878 Mon Sep 17 00:00:00 2001
From: Kevin Traynor <ktraynor at redhat.com>
Date: Wed, 25 Feb 2026 17:36:32 +0000
Subject: [PATCH] examples/vm_power: check truncation of socket path
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit 90d45ee6021a163955a73c510375e9a2f2d0b1f6 ]
Without libbsd-devel strlcpy is defined as rte_strlcpy and a warning is
raised for format-truncation. Observed with gcc 15.2.1.
In function ‘rte_strlcpy’,
inlined from ‘add_host_channels’ at
../examples/vm_power_manager/channel_manager.c:600:3:
../lib/eal/include/rte_string_fns.h:63:24:
warning: ‘%s’ directive output may be truncated writing up to
4095 bytes into a region of size 108 [-Wformat-truncation=]
63 | return (size_t)snprintf(dst, size, "%s", src);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Check for truncation of socket_path[4096] into channel_path[108] to
remove warning.
Signed-off-by: Kevin Traynor <ktraynor at redhat.com>
---
examples/vm_power_manager/channel_manager.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/examples/vm_power_manager/channel_manager.c b/examples/vm_power_manager/channel_manager.c
index 7d7efdd05a..b69449c61d 100644
--- a/examples/vm_power_manager/channel_manager.c
+++ b/examples/vm_power_manager/channel_manager.c
@@ -560,6 +560,7 @@ add_host_channels(void)
int ret;
struct core_info *ci;
struct channel_info *chan_infos[RTE_MAX_LCORE];
+ size_t channel_path_size;
int i;
for (i = 0; i < RTE_MAX_LCORE; i++)
@@ -597,8 +598,15 @@ add_host_channels(void)
goto error;
}
chan_infos[i] = chan_info;
- strlcpy(chan_info->channel_path, socket_path,
- sizeof(chan_info->channel_path));
+ channel_path_size = sizeof(chan_info->channel_path);
+ if (strlcpy(chan_info->channel_path, socket_path,
+ channel_path_size) >= channel_path_size) {
+ RTE_LOG(ERR, CHANNEL_MANAGER, "Socket path is too long "
+ "'%s' >= %zu\n", socket_path, channel_path_size);
+ rte_free(chan_info);
+ chan_infos[i] = NULL;
+ goto error;
+ }
if (setup_host_channel_info(&chan_info, i) < 0) {
rte_free(chan_info);
--
2.47.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-03-19 22:00:50.106357633 +0000
+++ 0065-examples-vm_power-check-truncation-of-socket-path.patch 2026-03-19 22:00:47.822359366 +0000
@@ -1 +1 @@
-From 90d45ee6021a163955a73c510375e9a2f2d0b1f6 Mon Sep 17 00:00:00 2001
+From 751d991b3ca34c18d9ef8446a1588a233929c878 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 90d45ee6021a163955a73c510375e9a2f2d0b1f6 ]
+
@@ -23,2 +24,0 @@
-
-Cc: stable at dpdk.org
More information about the stable
mailing list