From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D0469A00C3; Wed, 23 Feb 2022 17:02:55 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C3C0242717; Wed, 23 Feb 2022 17:02:55 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 7A134411B2; Wed, 23 Feb 2022 17:02:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645632173; x=1677168173; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=f2Qbj+GMcphl3pqIJVjVfUafV+l63hD/Uik1RYxAb+o=; b=g6pkT0lvb5wAv7mrM2gglS7Y7pbMeo7SPVFpGGtgBjbq3rde4nSdCKeI dKqDoMHTwc5OjMWMJNr1Zb/gAHRwroqC+idGM9aSLsuBDf8VWEW9sTSHO Wf0nc6zGc72JrKL3PAHWDiUF4q0LBWlqB6B5BcxW22zAwsv+8Ez7Ar54+ 0s2KErCnpNvaPh/PJKnDBkUxkR4xeTAy7NLH4IrDweXY4U6YugKBjo2eL v1OOHODSQ7hPT/lclp1uTD8FdvbAiZJndh9oSIYx3M9E8i26wICxMUvqS IycaP4yq0WwFTY5oiqPLHllU5ISwrp0w1y+/VkJ0HoJIUBYTV55rXGkEL w==; X-IronPort-AV: E=McAfee;i="6200,9189,10267"; a="276616851" X-IronPort-AV: E=Sophos;i="5.88,391,1635231600"; d="scan'208";a="276616851" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Feb 2022 08:02:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,391,1635231600"; d="scan'208";a="508485789" Received: from silpixa00400636.ir.intel.com ([10.237.213.19]) by orsmga006.jf.intel.com with ESMTP; 23 Feb 2022 08:02:22 -0800 From: Pablo de Lara To: roy.fan.zhang@intel.com, gakhil@marvell.com Cc: dev@dpdk.org, Pablo de Lara , stable@dpdk.org Subject: [PATCH v2 2/4] crypto/ipsec_mb: fix ZUC authentication verify Date: Wed, 23 Feb 2022 16:01:14 +0000 Message-Id: <20220223160116.736804-3-pablo.de.lara.guarch@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220223160116.736804-1-pablo.de.lara.guarch@intel.com> References: <20220218163443.3520756-1-pablo.de.lara.guarch@intel.com> <20220223160116.736804-1-pablo.de.lara.guarch@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org ZUC authentication is done over multiple buffers at a time. When authentication verification is done, multiple scratch buffers are using to generate the tags that will be compared afterwards. However, the same scratch buffer was used always, instead of having different ones for each crypto operation. Fixes: 0b133c36ad7d ("crypto/zuc: support IPsec Multi-buffer lib v0.54") Cc: pablo.de.lara.guarch@intel.com Cc: stable@dpdk.org Signed-off-by: Pablo de Lara --- drivers/crypto/ipsec_mb/pmd_zuc.c | 2 +- drivers/crypto/ipsec_mb/pmd_zuc_priv.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/ipsec_mb/pmd_zuc.c b/drivers/crypto/ipsec_mb/pmd_zuc.c index ec83d96dfc..07cf1462d2 100644 --- a/drivers/crypto/ipsec_mb/pmd_zuc.c +++ b/drivers/crypto/ipsec_mb/pmd_zuc.c @@ -166,7 +166,7 @@ process_zuc_hash_op(struct ipsec_mb_qp *qp, struct rte_crypto_op **ops, hash_keys[i] = sess->pKey_hash; if (sess->auth_op == RTE_CRYPTO_AUTH_OP_VERIFY) - dst[i] = (uint32_t *)qp_data->temp_digest; + dst[i] = (uint32_t *)qp_data->temp_digest[i]; else dst[i] = (uint32_t *)ops[i]->sym->auth.digest.data; diff --git a/drivers/crypto/ipsec_mb/pmd_zuc_priv.h b/drivers/crypto/ipsec_mb/pmd_zuc_priv.h index 46d5bfae37..76fd6758c2 100644 --- a/drivers/crypto/ipsec_mb/pmd_zuc_priv.h +++ b/drivers/crypto/ipsec_mb/pmd_zuc_priv.h @@ -75,7 +75,7 @@ struct zuc_session { struct zuc_qp_data { - uint8_t temp_digest[ZUC_DIGEST_LENGTH]; + uint8_t temp_digest[ZUC_MAX_BURST][ZUC_DIGEST_LENGTH]; /* *< Buffers used to store the digest generated * by the driver when verifying a digest provided * by the user (using authentication verify operation) -- 2.25.1