patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 1/4] regex/mlx5: fix size of setup constants
@ 2021-06-01  7:11 Michael Baum
  2021-06-01  7:11 ` [dpdk-stable] [PATCH 2/4] compress/mlx5: fix constant size in QP creation Michael Baum
                   ` (4 more replies)
  0 siblings, 5 replies; 15+ messages in thread
From: Michael Baum @ 2021-06-01  7:11 UTC (permalink / raw)
  To: dev; +Cc: Matan Azrad, Raslan Darawsheh, Viacheslav Ovsiienko, stable

The constant representing the size of the metadata is defined as a
unsigned int variable with 32-bit.
Similarly the constant representing the maximal output is also defined
as a 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 (64 bits, unsigned).

Change the size of the above constants to 64-bit.

Fixes: 30d604bb1504 ("regex/mlx5: fix type of setup constants")
Cc: stable@dpdk.org

Signed-off-by: Michael Baum <michaelba@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 b57e7d7794..3ef5e6c1eb 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 UINT64_C(64)
+#define MLX5_REGEX_MAX_OUTPUT RTE_BIT64(11)
 #define MLX5_REGEX_WQE_CTRL_OFFSET 12
 #define MLX5_REGEX_WQE_METADATA_OFFSET 16
 #define MLX5_REGEX_WQE_GATHER_OFFSET 32
-- 
2.25.1


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2021-07-22 12:49 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-01  7:11 [dpdk-stable] [PATCH 1/4] regex/mlx5: fix size of setup constants Michael Baum
2021-06-01  7:11 ` [dpdk-stable] [PATCH 2/4] compress/mlx5: fix constant size in QP creation Michael Baum
2021-06-07  7:28   ` Matan Azrad
2021-06-23  6:47   ` Thomas Monjalon
2021-06-28 14:21     ` Michael Baum
2021-06-01  7:11 ` [dpdk-stable] [PATCH 3/4] vdpa/mlx5: fix constant type " Michael Baum
2021-06-07  7:29   ` Matan Azrad
2021-06-01  7:11 ` [dpdk-stable] [PATCH 4/4] net/mlx5: fix constant type in MP allocation Michael Baum
2021-06-07  7:29   ` Matan Azrad
2021-06-07  7:28 ` [dpdk-stable] [PATCH 1/4] regex/mlx5: fix size of setup constants Matan Azrad
2021-07-01  6:39 ` [dpdk-stable] [PATCH v2 " Michael Baum
2021-07-01  6:39   ` [dpdk-stable] [PATCH v2 2/4] compress/mlx5: fix constant size in QP creation Michael Baum
2021-07-01  6:39   ` [dpdk-stable] [PATCH v2 3/4] vdpa/mlx5: fix constant type " Michael Baum
2021-07-01  6:39   ` [dpdk-stable] [PATCH v2 4/4] net/mlx5: fix constant type in MP allocation Michael Baum
2021-07-22 12:50   ` [dpdk-stable] [dpdk-dev] [PATCH v2 1/4] regex/mlx5: fix size of setup constants Thomas Monjalon

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ https://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git