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

christian.ehrhardt at canonical.com christian.ehrhardt at canonical.com
Tue Aug 10 17:39:54 CEST 2021


Hi,

FYI, your patch has been queued to stable release 19.11.10

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/12/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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/76f8afec4acd5c34a769b20acd3f8f2f3b2b5eb8

Thanks.

Christian Ehrhardt <christian.ehrhardt at canonical.com>

---
>From 76f8afec4acd5c34a769b20acd3f8f2f3b2b5eb8 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 1c0a0fa5e3..b30e0f8f3e 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.32.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-08-10 15:11:15.875900565 +0200
+++ 0074-test-crypto-fix-mempool-size-for-session-less.patch	2021-08-10 15:11:13.078638532 +0200
@@ -1 +1 @@
-From b812567ef6daa2a99a05a38bd79252c97e46078b Mon Sep 17 00:00:00 2001
+From 76f8afec4acd5c34a769b20acd3f8f2f3b2b5eb8 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 1c0a0fa5e3..b30e0f8f3e 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