From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5AB7EA04A3 for ; Fri, 5 Jun 2020 20:27:00 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 222461D510; Fri, 5 Jun 2020 20:27:00 +0200 (CEST) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by dpdk.org (Postfix) with ESMTP id ADD571D515 for ; Fri, 5 Jun 2020 20:26:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591381618; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MBeLDC9nvaU0HW/csg3J0QOeBiTHTfN90Bb140QcW40=; b=X/mDwxMH2KBcKh29T1pWBy1x9ENLODVoQUi5tkrIhJ7JesDnlqcPBca8MRsAn/EnjKroXP 7+pwi9SYnwv7j84OfY8sHIDqhMUxzk1HLHXxpgS2sc/CsB3J8SmUIEV+wd34YdcxlelbSo fjAbhE6MVJnmRVxff+nXWywukZXM+UQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-349-05VVE_fXPE6gzyDGSJh6oA-1; Fri, 05 Jun 2020 14:26:54 -0400 X-MC-Unique: 05VVE_fXPE6gzyDGSJh6oA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B5003100A8D1; Fri, 5 Jun 2020 18:26:47 +0000 (UTC) Received: from rh.redhat.com (unknown [10.33.36.130]) by smtp.corp.redhat.com (Postfix) with ESMTP id D076D619C0; Fri, 5 Jun 2020 18:26:46 +0000 (UTC) From: Kevin Traynor To: Arek Kusztal Cc: Fiona Trahe , dpdk stable Date: Fri, 5 Jun 2020 19:24:27 +0100 Message-Id: <20200605182525.22483-30-ktraynor@redhat.com> In-Reply-To: <20200605182525.22483-1-ktraynor@redhat.com> References: <20200605182525.22483-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'crypto/qat: fix cipher descriptor for ZUC and SNOW' has been queued to LTS release 18.11.9 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: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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 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 Acked-by: Fiona Trahe --- 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@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,