patch 'common/cnxk: fix integer overflow' has been queued to stable release 23.11.2
Xueming Li
xuemingl at nvidia.com
Mon Aug 12 14:49:51 CEST 2024
Hi,
FYI, your patch has been queued to stable release 23.11.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. 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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=8f23521ad7ee5964b12554bf6f622e234fb73249
Thanks.
Xueming Li <xuemingl at nvidia.com>
---
>From 8f23521ad7ee5964b12554bf6f622e234fb73249 Mon Sep 17 00:00:00 2001
From: Ankur Dwivedi <adwivedi at marvell.com>
Date: Thu, 18 Jul 2024 12:04:37 +0530
Subject: [PATCH] common/cnxk: fix integer overflow
Cc: Xueming Li <xuemingl at nvidia.com>
[ upstream commit 118ba4e3f2a39e6fc10075c680310f4cdabc1bd7 ]
The expression flow_age->aging_poll_freq * NPC_AGE_WAIT_TIMEOUT_US is
evaluated using 32 bit arithmetic. An integer overflow may occur when
the value is too large to fit in 32 bits. This patch resolves this by
casting flow_age->aging_poll_freq to 64 bit.
Coverity issue: 428156
Fixes: a4878294318e ("common/cnxk: fix flow aging on application exit")
Signed-off-by: Ankur Dwivedi <adwivedi at marvell.com>
---
drivers/common/cnxk/roc_npc_aging.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/common/cnxk/roc_npc_aging.c b/drivers/common/cnxk/roc_npc_aging.c
index 1e85033e2a..258c15e341 100644
--- a/drivers/common/cnxk/roc_npc_aging.c
+++ b/drivers/common/cnxk/roc_npc_aging.c
@@ -145,7 +145,7 @@ npc_age_wait_until(struct roc_npc_flow_age *flow_age)
plt_delay_us(sleep);
timeout += sleep;
} while (!flow_age->aged_flows_get_thread_exit &&
- (timeout < (flow_age->aging_poll_freq * NPC_AGE_WAIT_TIMEOUT_US)));
+ (timeout < ((uint64_t)flow_age->aging_poll_freq * NPC_AGE_WAIT_TIMEOUT_US)));
}
uint32_t
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-08-12 20:44:06.135061611 +0800
+++ 0114-common-cnxk-fix-integer-overflow.patch 2024-08-12 20:44:02.445069363 +0800
@@ -1 +1 @@
-From 118ba4e3f2a39e6fc10075c680310f4cdabc1bd7 Mon Sep 17 00:00:00 2001
+From 8f23521ad7ee5964b12554bf6f622e234fb73249 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 118ba4e3f2a39e6fc10075c680310f4cdabc1bd7 ]
@@ -13 +15,0 @@
-Cc: stable at dpdk.org
More information about the stable
mailing list