[dpdk-stable] patch 'test/crypto: fix mempool size for session-less' has been queued to stable release 20.11.3

luca.boccassi at gmail.com luca.boccassi at gmail.com
Mon Jul 26 15:52:44 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/db878744bc390175b754e5cba78290f73b5ed03e

Thanks.

Luca Boccassi

---
>From db878744bc390175b754e5cba78290f73b5ed03e Mon Sep 17 00:00:00 2001
From: Abhinandan Gujjar <abhinandan.gujjar at intel.com>
Date: Sun, 18 Jul 2021 17:48:51 +0530
Subject: [PATCH] test/crypto: fix mempool size for session-less

[ upstream commit b812567ef6daa2a99a05a38bd79252c97e46078b ]

Currently, private_data_offset for the sessionless is computed
wrongly which includes extra bytes added by
sizeof(struct rte_crypto_sym_xform) * 2. This causes buffer
overflow which leads to test application crash while freeing the
ops mempool. This patch provides fix for the same and also takes
care of increasing the length of ops to accommodate space for
rte_event_crypto_metadata while creating the crypto ops mempool.

Fixes: 3c2c535ecfc0 ("test: add event crypto adapter auto-test")

Signed-off-by: Abhinandan Gujjar <abhinandan.gujjar at intel.com>
Reported-by: Ciara Power <ciara.power at intel.com>
Acked-by: Akhil Goyal <gakhil at marvell.com>
---
 app/test/test_event_crypto_adapter.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/app/test/test_event_crypto_adapter.c b/app/test/test_event_crypto_adapter.c
index 335211cd8c..71b58fcbb8 100644
--- a/app/test/test_event_crypto_adapter.c
+++ b/app/test/test_event_crypto_adapter.c
@@ -224,8 +224,7 @@ test_op_forward_mode(uint8_t session_less)
 		op->sess_type = RTE_CRYPTO_OP_SESSIONLESS;
 		first_xform = &cipher_xform;
 		sym_op->xform = first_xform;
-		uint32_t len = IV_OFFSET + MAXIMUM_IV_LENGTH +
-				(sizeof(struct rte_crypto_sym_xform) * 2);
+		uint32_t len = IV_OFFSET + MAXIMUM_IV_LENGTH;
 		op->private_data_offset = len;
 		/* Fill in private data information */
 		rte_memcpy(&m_data.response_info, &response_info,
@@ -419,8 +418,7 @@ test_op_new_mode(uint8_t session_less)
 		op->sess_type = RTE_CRYPTO_OP_SESSIONLESS;
 		first_xform = &cipher_xform;
 		sym_op->xform = first_xform;
-		uint32_t len = IV_OFFSET + MAXIMUM_IV_LENGTH +
-				(sizeof(struct rte_crypto_sym_xform) * 2);
+		uint32_t len = IV_OFFSET + MAXIMUM_IV_LENGTH;
 		op->private_data_offset = len;
 		/* Fill in private data information */
 		rte_memcpy(&m_data.response_info, &response_info,
@@ -516,7 +514,8 @@ configure_cryptodev(void)
 			NUM_MBUFS, MBUF_CACHE_SIZE,
 			DEFAULT_NUM_XFORMS *
 			sizeof(struct rte_crypto_sym_xform) +
-			MAXIMUM_IV_LENGTH,
+			MAXIMUM_IV_LENGTH +
+			sizeof(union rte_event_crypto_metadata),
 			rte_socket_id());
 	if (params.op_mpool == NULL) {
 		RTE_LOG(ERR, USER1, "Can't create CRYPTO_OP_POOL\n");
-- 
2.30.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-07-26 13:53:16.958898775 +0100
+++ 0021-test-crypto-fix-mempool-size-for-session-less.patch	2021-07-26 13:53:15.837292370 +0100
@@ -1 +1 @@
-From b812567ef6daa2a99a05a38bd79252c97e46078b Mon Sep 17 00:00:00 2001
+From db878744bc390175b754e5cba78290f73b5ed03e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b812567ef6daa2a99a05a38bd79252c97e46078b ]
+
@@ -15 +16,0 @@
-Cc: stable at dpdk.org
@@ -25 +26 @@
-index f689bc1f22..3ad20921e2 100644
+index 335211cd8c..71b58fcbb8 100644
@@ -28 +29 @@
-@@ -228,8 +228,7 @@ test_op_forward_mode(uint8_t session_less)
+@@ -224,8 +224,7 @@ test_op_forward_mode(uint8_t session_less)
@@ -38 +39 @@
-@@ -423,8 +422,7 @@ test_op_new_mode(uint8_t session_less)
+@@ -419,8 +418,7 @@ test_op_new_mode(uint8_t session_less)
@@ -48 +49 @@
-@@ -520,7 +518,8 @@ configure_cryptodev(void)
+@@ -516,7 +514,8 @@ configure_cryptodev(void)


More information about the stable mailing list