patch 'cmdline: fix highest bit port list parsing' has been queued to stable release 24.11.4

Kevin Traynor ktraynor at redhat.com
Fri Oct 31 15:34:16 CET 2025


Hi,

FYI, your patch has been queued to stable release 24.11.4

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

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/72c21546e14bbb63ca9e128cc4e4e6542b1866ab

Thanks.

Kevin

---
>From 72c21546e14bbb63ca9e128cc4e4e6542b1866ab Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand at redhat.com>
Date: Mon, 3 Feb 2025 13:50:48 +0100
Subject: [PATCH] cmdline: fix highest bit port list parsing

[ upstream commit f3a07a33d7b3a0b153f7f5b60c13bebede9a9104 ]

pl->map is a uint32_t.

Caught by UBSan:

../lib/cmdline/cmdline_parse_portlist.c:27:17: runtime error:
	left shift of 1 by 31 places cannot be represented in type 'int'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior
	../lib/cmdline/cmdline_parse_portlist.c:27:17 in

Fixes: af75078fece3 ("first public release")

Signed-off-by: David Marchand <david.marchand at redhat.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
Reviewed-by: Marat Khalili <marat.khalili at huawei.com>
Acked-by: Chengwen Feng <fengchengwen at huawei.com>
---
 lib/cmdline/cmdline_parse_portlist.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/cmdline/cmdline_parse_portlist.c b/lib/cmdline/cmdline_parse_portlist.c
index 290e61f211..6b7096579e 100644
--- a/lib/cmdline/cmdline_parse_portlist.c
+++ b/lib/cmdline/cmdline_parse_portlist.c
@@ -10,5 +10,7 @@
 #include <errno.h>
 
+#include <rte_bitops.h>
 #include <rte_string_fns.h>
+
 #include "cmdline_parse.h"
 #include "cmdline_parse_portlist.h"
@@ -25,5 +27,6 @@ parse_set_list(cmdline_portlist_t *pl, size_t low, size_t high)
 {
 	do {
-		pl->map |= (1 << low++);
+		pl->map |= RTE_BIT32(low);
+		low++;
 	} while (low <= high);
 }
-- 
2.51.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-10-31 13:53:56.234650988 +0000
+++ 0134-cmdline-fix-highest-bit-port-list-parsing.patch	2025-10-31 13:53:52.328964874 +0000
@@ -1 +1 @@
-From f3a07a33d7b3a0b153f7f5b60c13bebede9a9104 Mon Sep 17 00:00:00 2001
+From 72c21546e14bbb63ca9e128cc4e4e6542b1866ab Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f3a07a33d7b3a0b153f7f5b60c13bebede9a9104 ]
+
@@ -16 +17,0 @@
-Cc: stable at dpdk.org
@@ -27 +28 @@
-index 549f6d9671..3efe4143e3 100644
+index 290e61f211..6b7096579e 100644
@@ -30 +31,2 @@
-@@ -11,5 +11,7 @@
+@@ -10,5 +10,7 @@
+ #include <errno.h>
@@ -32 +33,0 @@
- #include <eal_export.h>
@@ -38 +39 @@
-@@ -27,5 +29,6 @@ parse_set_list(cmdline_portlist_t *pl, size_t low, size_t high)
+@@ -25,5 +27,6 @@ parse_set_list(cmdline_portlist_t *pl, size_t low, size_t high)



More information about the stable mailing list