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

luca.boccassi at gmail.com luca.boccassi at gmail.com
Mon Oct 27 17:18:42 CET 2025


Hi,

FYI, your patch has been queued to stable release 22.11.11

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/60da73d65687b69136d2da18072777f5de6a6c9f

Thanks.

Luca Boccassi

---
>From 60da73d65687b69136d2da18072777f5de6a6c9f 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
@@ -9,7 +9,9 @@
 #include <string.h>
 #include <errno.h>
 
+#include <rte_bitops.h>
 #include <rte_string_fns.h>
+
 #include "cmdline_parse.h"
 #include "cmdline_parse_portlist.h"
 
@@ -24,7 +26,8 @@ static void
 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.47.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-10-27 15:54:35.010248872 +0000
+++ 0004-cmdline-fix-highest-bit-port-list-parsing.patch	2025-10-27 15:54:34.719947643 +0000
@@ -1 +1 @@
-From f3a07a33d7b3a0b153f7f5b60c13bebede9a9104 Mon Sep 17 00:00:00 2001
+From 60da73d65687b69136d2da18072777f5de6a6c9f 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 @@
-@@ -10,7 +10,9 @@
+@@ -9,7 +9,9 @@
+ #include <string.h>
@@ -33 +34,0 @@
- #include <eal_export.h>
@@ -40 +41 @@
-@@ -26,7 +28,8 @@ static void
+@@ -24,7 +26,8 @@ static void


More information about the stable mailing list