patch 'dev: report devargs truncation for multi-process hotplug' has been queued to stable release 24.11.7

luca.boccassi at gmail.com luca.boccassi at gmail.com
Mon Jul 6 12:20:01 CEST 2026


Hi,

FYI, your patch has been queued to stable release 24.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/05/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/ad03039eb9493ac7b4bd69a3224d2a18c69a2110

Thanks.

Luca Boccassi

---
>From ad03039eb9493ac7b4bd69a3224d2a18c69a2110 Mon Sep 17 00:00:00 2001
From: Long Li <longli at microsoft.com>
Date: Tue, 23 Jun 2026 17:05:31 -0700
Subject: [PATCH] dev: report devargs truncation for multi-process hotplug

[ upstream commit 26b05e42e19b50d132a922dbe04572722ea1d810 ]

The EAL hotplug multi-process messaging uses a fixed-size buffer
(EAL_DEV_MP_DEV_ARGS_MAX_LEN, 128 bytes) for device arguments.
When devargs exceeds this limit, strlcpy silently truncates the
string. This causes secondary processes to receive incomplete
devargs during hotplug re-add, leading to failed port
re-initialization.

For example, a MANA PCI device with 6 mac= arguments:

  mac=AA:BB:CC:DD:EE:01,mac=AA:BB:CC:DD:EE:02,
  mac=AA:BB:CC:DD:EE:03,mac=AA:BB:CC:DD:EE:04,
  mac=AA:BB:CC:DD:EE:05,mac=AA:BB:CC:DD:EE:06

produces a 131-byte devargs string that gets silently truncated
to 127 bytes, losing the last MAC address.

Return -E2BIG from rte_dev_probe() when devargs would be truncated,
instead of silently corrupting data. rte_dev_remove() does not need
the same check because the length was already validated at probe time.

Fixes: 244d5130719c ("eal: enable hotplug on multi-process")

Signed-off-by: Long Li <longli at microsoft.com>
Acked-by: David Marchand <david.marchand at redhat.com>
---
 lib/eal/common/eal_common_dev.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lib/eal/common/eal_common_dev.c b/lib/eal/common/eal_common_dev.c
index 70aa04dcd9..54f90af4b6 100644
--- a/lib/eal/common/eal_common_dev.c
+++ b/lib/eal/common/eal_common_dev.c
@@ -237,6 +237,13 @@ rte_dev_probe(const char *devargs)
 	struct rte_device *dev;
 	int ret;
 
+
+	if (strlen(devargs) >= EAL_DEV_MP_DEV_ARGS_MAX_LEN) {
+		EAL_LOG(ERR, "devargs truncated (len %zu, max %d)",
+			strlen(devargs), EAL_DEV_MP_DEV_ARGS_MAX_LEN);
+		return -E2BIG;
+	}
+
 	memset(&req, 0, sizeof(req));
 	req.t = EAL_DEV_REQ_TYPE_ATTACH;
 	strlcpy(req.devargs, devargs, EAL_DEV_MP_DEV_ARGS_MAX_LEN);
-- 
2.47.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-07-03 12:55:47.062924971 +0100
+++ 0009-dev-report-devargs-truncation-for-multi-process-hotp.patch	2026-07-03 12:55:46.582571675 +0100
@@ -1 +1 @@
-From 26b05e42e19b50d132a922dbe04572722ea1d810 Mon Sep 17 00:00:00 2001
+From ad03039eb9493ac7b4bd69a3224d2a18c69a2110 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 26b05e42e19b50d132a922dbe04572722ea1d810 ]
+
@@ -27 +28,0 @@
-Cc: stable at dpdk.org
@@ -32,2 +33,2 @@
- lib/eal/common/eal_common_dev.c | 6 ++++++
- 1 file changed, 6 insertions(+)
+ lib/eal/common/eal_common_dev.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
@@ -36 +37 @@
-index ce70301254..9ed62a20e0 100644
+index 70aa04dcd9..54f90af4b6 100644
@@ -39,3 +40,3 @@
-@@ -277,6 +277,12 @@ rte_dev_probe(const char *devargs)
- 	if (!do_mp)
- 		goto skip_mp_req;
+@@ -237,6 +237,13 @@ rte_dev_probe(const char *devargs)
+ 	struct rte_device *dev;
+ 	int ret;
@@ -42,0 +44 @@
++


More information about the stable mailing list