From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 13C3E1B490 for ; Fri, 4 Jan 2019 14:26:46 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 68232C0740F1; Fri, 4 Jan 2019 13:26:45 +0000 (UTC) Received: from ktraynor.remote.csb (ovpn-117-13.ams2.redhat.com [10.36.117.13]) by smtp.corp.redhat.com (Postfix) with ESMTP id A154D5C224; Fri, 4 Jan 2019 13:26:43 +0000 (UTC) From: Kevin Traynor To: Arek Kusztal Cc: Fiona Trahe , Marko Kovacevic , dpdk stable Date: Fri, 4 Jan 2019 13:24:00 +0000 Message-Id: <20190104132455.15170-18-ktraynor@redhat.com> In-Reply-To: <20190104132455.15170-1-ktraynor@redhat.com> References: <20190104132455.15170-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Fri, 04 Jan 2019 13:26:45 +0000 (UTC) Subject: [dpdk-stable] patch 'crypto/qat: fix block size error handling' has been queued to LTS release 18.11.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2019 13:26:46 -0000 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 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 Acked-by: Fiona Trahe Tested-by: Marko Kovacevic Acked-by: Marko Kovacevic --- 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 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@dpdk.org Signed-off-by: Arek Kusztal Acked-by: Fiona Trahe