[dpdk-stable] patch 'crypto/qat: fix cipher descriptor for ZUC and SNOW' has been queued to LTS release 18.11.9

Kevin Traynor ktraynor at redhat.com
Fri Jun 5 20:24:27 CEST 2020


Hi,

FYI, your patch has been queued to LTS release 18.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/10/20. 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/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/71c0081bc4248f92bb5cde6f04aa82a3cd1ecf6a

Thanks.

Kevin.

---
>From 71c0081bc4248f92bb5cde6f04aa82a3cd1ecf6a Mon Sep 17 00:00:00 2001
From: Arek Kusztal <arkadiuszx.kusztal at intel.com>
Date: Wed, 29 Apr 2020 16:51:34 +0200
Subject: [PATCH] crypto/qat: fix cipher descriptor for ZUC and SNOW

[ upstream commit fae347cb345a844442c18e1384b832912e07daa0 ]

Offset of cd pointer is too big by state1size + state2size, so few extra
unnecessary bytes will be copied into cd. Snow offset was improved as well.

Fixes: d9b7d5bbc845 ("crypto/qat: add ZUC EEA3/EIA3 capability")

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal at intel.com>
Acked-by: Fiona Trahe <fiona.trahe at intel.com>
---
 drivers/crypto/qat/qat_sym_session.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/crypto/qat/qat_sym_session.c b/drivers/crypto/qat/qat_sym_session.c
index e147572e12..c4f39280c6 100644
--- a/drivers/crypto/qat/qat_sym_session.c
+++ b/drivers/crypto/qat/qat_sym_session.c
@@ -1433,5 +1433,5 @@ int qat_sym_session_aead_create_cd_auth(struct qat_sym_session *cdesc,
 		((char *)&req_tmpl->serv_specif_rqpars +
 		sizeof(struct icp_qat_fw_la_cipher_req_params));
-	uint16_t state1_size = 0, state2_size = 0;
+	uint16_t state1_size = 0, state2_size = 0, cd_extra_size = 0;
 	uint16_t hash_offset, cd_size;
 	uint32_t *aad_len = NULL;
@@ -1609,5 +1609,5 @@ int qat_sym_session_aead_create_cd_auth(struct qat_sym_session *cdesc,
 		memset(cipherconfig->key + authkeylen,
 				0, ICP_QAT_HW_SNOW_3G_UEA2_IV_SZ);
-		cdesc->cd_cur_ptr += sizeof(struct icp_qat_hw_cipher_config) +
+		cd_extra_size += sizeof(struct icp_qat_hw_cipher_config) +
 				authkeylen + ICP_QAT_HW_SNOW_3G_UEA2_IV_SZ;
 		auth_param->hash_state_sz = ICP_QAT_HW_SNOW_3G_UEA2_IV_SZ >> 3;
@@ -1625,6 +1625,5 @@ int qat_sym_session_aead_create_cd_auth(struct qat_sym_session *cdesc,
 
 		memcpy(cdesc->cd_cur_ptr + state1_size, authkey, authkeylen);
-		cdesc->cd_cur_ptr += state1_size + state2_size
-			+ ICP_QAT_HW_ZUC_3G_EEA3_IV_SZ;
+		cd_extra_size += ICP_QAT_HW_ZUC_3G_EEA3_IV_SZ;
 		auth_param->hash_state_sz = ICP_QAT_HW_ZUC_3G_EEA3_IV_SZ >> 3;
 		cdesc->min_qat_dev_gen = QAT_GEN2;
@@ -1712,5 +1711,5 @@ int qat_sym_session_aead_create_cd_auth(struct qat_sym_session *cdesc,
 					>> 3);
 
-	cdesc->cd_cur_ptr += state1_size + state2_size;
+	cdesc->cd_cur_ptr += state1_size + state2_size + cd_extra_size;
 	cd_size = cdesc->cd_cur_ptr-(uint8_t *)&cdesc->cd;
 
-- 
2.21.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-06-05 19:20:52.514392942 +0100
+++ 0030-crypto-qat-fix-cipher-descriptor-for-ZUC-and-SNOW.patch	2020-06-05 19:20:50.758041995 +0100
@@ -1 +1 @@
-From fae347cb345a844442c18e1384b832912e07daa0 Mon Sep 17 00:00:00 2001
+From 71c0081bc4248f92bb5cde6f04aa82a3cd1ecf6a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fae347cb345a844442c18e1384b832912e07daa0 ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -19 +20 @@
-index 3727d564d8..58bdbd3438 100644
+index e147572e12..c4f39280c6 100644
@@ -22 +23 @@
-@@ -1665,5 +1665,5 @@ int qat_sym_session_aead_create_cd_auth(struct qat_sym_session *cdesc,
+@@ -1433,5 +1433,5 @@ int qat_sym_session_aead_create_cd_auth(struct qat_sym_session *cdesc,
@@ -24 +25 @@
- 		ICP_QAT_FW_HASH_REQUEST_PARAMETERS_OFFSET);
+ 		sizeof(struct icp_qat_fw_la_cipher_req_params));
@@ -29 +30 @@
-@@ -1887,5 +1887,5 @@ int qat_sym_session_aead_create_cd_auth(struct qat_sym_session *cdesc,
+@@ -1609,5 +1609,5 @@ int qat_sym_session_aead_create_cd_auth(struct qat_sym_session *cdesc,
@@ -36 +37 @@
-@@ -1903,6 +1903,5 @@ int qat_sym_session_aead_create_cd_auth(struct qat_sym_session *cdesc,
+@@ -1625,6 +1625,5 @@ int qat_sym_session_aead_create_cd_auth(struct qat_sym_session *cdesc,
@@ -44 +45 @@
-@@ -1990,5 +1989,5 @@ int qat_sym_session_aead_create_cd_auth(struct qat_sym_session *cdesc,
+@@ -1712,5 +1711,5 @@ int qat_sym_session_aead_create_cd_auth(struct qat_sym_session *cdesc,



More information about the stable mailing list