[dpdk-stable] patch 'crypto/qat: fix block size error handling' has been queued to LTS release 18.11.1

Kevin Traynor ktraynor at redhat.com
Fri Jan 4 14:24:00 CET 2019


Hi,

FYI, your patch has been queued to LTS release 18.11.1

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

Thanks.

Kevin Traynor

---
>From 79061e5566737ef99cb68cc6316df966974c8928 Mon Sep 17 00:00:00 2001
From: Arek Kusztal <arkadiuszx.kusztal at intel.com>
Date: Wed, 12 Dec 2018 20:59:02 +0100
Subject: [PATCH] crypto/qat: fix block size error handling

[ upstream commit 93685b1fbf37d508032a4d640b67cd63075f93b9 ]

Error code of qat_hash_get_block_size needs to be handle properly.

Fixes: 10b49880e3c5 ("crypto/qat: make the session struct variable in size")

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

diff --git a/drivers/crypto/qat/qat_sym_session.c b/drivers/crypto/qat/qat_sym_session.c
index 8196e2333..272177f0a 100644
--- a/drivers/crypto/qat/qat_sym_session.c
+++ b/drivers/crypto/qat/qat_sym_session.c
@@ -1144,6 +1144,6 @@ static int qat_sym_do_precomputes(enum icp_qat_hw_auth_algo hash_alg,
 
 	block_size = qat_hash_get_block_size(hash_alg);
-	if (block_size <= 0)
-		return -EFAULT;
+	if (block_size < 0)
+		return block_size;
 	/* init ipad and opad from key and xor with fixed values */
 	memset(ipad, 0, block_size);
@@ -1491,7 +1491,11 @@ int qat_sym_session_aead_create_cd_auth(struct qat_sym_session *cdesc,
 			)
 		hash->auth_counter.counter = 0;
-	else
-		hash->auth_counter.counter = rte_bswap32(
-				qat_hash_get_block_size(cdesc->qat_hash_alg));
+	else {
+		int block_size = qat_hash_get_block_size(cdesc->qat_hash_alg);
+
+		if (block_size < 0)
+			return block_size;
+		hash->auth_counter.counter = rte_bswap32(block_size);
+	}
 
 	cdesc->cd_cur_ptr += sizeof(struct icp_qat_hw_auth_setup);
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-01-04 13:23:07.884043199 +0000
+++ 0018-crypto-qat-fix-block-size-error-handling.patch	2019-01-04 13:23:07.000000000 +0000
@@ -1,12 +1,13 @@
-From 93685b1fbf37d508032a4d640b67cd63075f93b9 Mon Sep 17 00:00:00 2001
+From 79061e5566737ef99cb68cc6316df966974c8928 Mon Sep 17 00:00:00 2001
 From: Arek Kusztal <arkadiuszx.kusztal at intel.com>
 Date: Wed, 12 Dec 2018 20:59:02 +0100
 Subject: [PATCH] crypto/qat: fix block size error handling
 
+[ upstream commit 93685b1fbf37d508032a4d640b67cd63075f93b9 ]
+
 Error code of qat_hash_get_block_size needs to be handle properly.
 
 Fixes: 10b49880e3c5 ("crypto/qat: make the session struct variable in size")
-Cc: stable at dpdk.org
 
 Signed-off-by: Arek Kusztal <arkadiuszx.kusztal at intel.com>
 Acked-by: Fiona Trahe <fiona.trahe at intel.com>


More information about the stable mailing list