[dpdk-stable] patch 'regex/mlx5: fix size of setup constants' has been queued to stable release 20.11.3

luca.boccassi at gmail.com luca.boccassi at gmail.com
Mon Jul 26 15:52:49 CEST 2021


Hi,

FYI, your patch has been queued to stable release 20.11.3

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/28/21. 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/4eb4301b074502667a0b8f425347d0219b366cab

Thanks.

Luca Boccassi

---
>From 4eb4301b074502667a0b8f425347d0219b366cab Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba at nvidia.com>
Date: Thu, 1 Jul 2021 09:39:13 +0300
Subject: [PATCH] regex/mlx5: fix size of setup constants

[ upstream commit 423719a3677cc18d742264315c8451a931ade8e5 ]

The constant representing the size of the metadata is defined as an
unsigned int variable with 32-bit.
Similarly the constant representing the maximal output is also defined
as an unsigned int variable with 32-bit.

There is potentially overflowing expression when those constants are
evaluated using 32-bit arithmetic, and then used in a context that
expects an expression of type size_t that might be 64-bit.

Change the size of the above constants to size_t.

Fixes: 30d604bb1504 ("regex/mlx5: fix type of setup constants")

Signed-off-by: Michael Baum <michaelba at nvidia.com>
Acked-by: Matan Azrad <matan at nvidia.com>
---
 drivers/regex/mlx5/mlx5_regex_fastpath.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/regex/mlx5/mlx5_regex_fastpath.c b/drivers/regex/mlx5/mlx5_regex_fastpath.c
index 8d134ac98e..2d28e85e4d 100644
--- a/drivers/regex/mlx5/mlx5_regex_fastpath.c
+++ b/drivers/regex/mlx5/mlx5_regex_fastpath.c
@@ -25,8 +25,8 @@
 #include "mlx5_regex.h"
 
 #define MLX5_REGEX_MAX_WQE_INDEX 0xffff
-#define MLX5_REGEX_METADATA_SIZE UINT32_C(64)
-#define MLX5_REGEX_MAX_OUTPUT RTE_BIT32(11)
+#define MLX5_REGEX_METADATA_SIZE ((size_t)64)
+#define MLX5_REGEX_MAX_OUTPUT (((size_t)1) << 11)
 #define MLX5_REGEX_WQE_CTRL_OFFSET 12
 #define MLX5_REGEX_WQE_METADATA_OFFSET 16
 #define MLX5_REGEX_WQE_GATHER_OFFSET 32
-- 
2.30.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-07-26 13:53:17.187248791 +0100
+++ 0026-regex-mlx5-fix-size-of-setup-constants.patch	2021-07-26 13:53:15.853292706 +0100
@@ -1 +1 @@
-From 423719a3677cc18d742264315c8451a931ade8e5 Mon Sep 17 00:00:00 2001
+From 4eb4301b074502667a0b8f425347d0219b366cab Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 423719a3677cc18d742264315c8451a931ade8e5 ]
+
@@ -18 +19,0 @@
-Cc: stable at dpdk.org
@@ -27 +28 @@
-index b57e7d7794..910bc845f3 100644
+index 8d134ac98e..2d28e85e4d 100644


More information about the stable mailing list