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 A4800A00BE; Mon, 27 Apr 2020 16:42:06 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1AE651D55F; Mon, 27 Apr 2020 16:42:05 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 323631D528; Mon, 27 Apr 2020 16:42:02 +0200 (CEST) IronPort-SDR: xvIDJkb4RrVHzsAWWUYgsXkcKsruck/7C/opPriLEEB3iJcrkmrRv36RdzI8q2hZcc/F6eYxq3 X5g/EdddHzNA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Apr 2020 07:42:02 -0700 IronPort-SDR: ZQfwOhNz3ecEtAfr9ncwVRymyE+7TISbZbZhz13THVsu8MuTsj9EYfTWhrC2GxcwEEKnA3WT4H YHGIIcGW0K+g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,324,1583222400"; d="scan'208";a="275493211" Received: from akusztax-mobl.ger.corp.intel.com ([10.104.121.10]) by orsmga002.jf.intel.com with ESMTP; 27 Apr 2020 07:42:00 -0700 From: Arek Kusztal To: dev@dpdk.org, fiona.trahe@intel.com Cc: Arek Kusztal , stable@dpdk.org Date: Mon, 27 Apr 2020 16:39:47 +0200 Message-Id: <20200427143947.10208-1-arkadiuszx.kusztal@intel.com> X-Mailer: git-send-email 2.19.1.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] crypto/qat: fix computation of cd ptr in zuc X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Offset of cd pointer is too big by state1size + state2size, so few extra unnecessary bytes will be copied into cd. Fixes: d9b7d5bbc845 ("crypto/qat: add ZUC EEA3/EIA3 capability") Cc: stable@dpdk.org Signed-off-by: Arek Kusztal --- drivers/crypto/qat/qat_sym_session.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/crypto/qat/qat_sym_session.c b/drivers/crypto/qat/qat_sym_session.c index fd2cc38..ebca579 100644 --- a/drivers/crypto/qat/qat_sym_session.c +++ b/drivers/crypto/qat/qat_sym_session.c @@ -1803,8 +1803,7 @@ int qat_sym_session_aead_create_cd_auth(struct qat_sym_session *cdesc, + ICP_QAT_HW_ZUC_3G_EEA3_IV_SZ); 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; + cdesc->cd_cur_ptr += 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; -- 2.1.0