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 AB575A0350 for ; Mon, 28 Feb 2022 22:21:44 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A7062411AE; Mon, 28 Feb 2022 22:21:44 +0100 (CET) Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) by mails.dpdk.org (Postfix) with ESMTP id 9255540140 for ; Mon, 28 Feb 2022 22:21:42 +0100 (CET) Received: by mail-wr1-f47.google.com with SMTP id r10so17458194wrp.3 for ; Mon, 28 Feb 2022 13:21:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Zl33Za4J2JrDcMN/nq5xCMI7Lct6OD3yCSgN28AGYk4=; b=Dq6xDhOwL4HrS2h0rK0vePG1vNJco5NMLBU4YFaubjHg56pMqYSLu9TC6zeSud66b5 rhKFxTC0ZUlhQCBsiqWgDTVIzvEjb8g6TlkL1xxUnETQ+72EILlCuFtj5NQQuNYVaaF3 3pyNoVFAglaLSQytI8o8yezKp5D/tN4GziBcdoEU4/Nkz0B66FcKspXxIbfCIErhcL/l 0DMuSWtc3OG9Br7Sx9t6xoIfLbcwRdkeyxKOmb1llzSBYENAMah8kA5xHVglMqrY4+iw k2sF5cYqqp7aGsi6dkdB2A6/msG0cgQxpCi+wEqltl+gdXvOVO/R7/yJ6KdXhqnnuDzE zqaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Zl33Za4J2JrDcMN/nq5xCMI7Lct6OD3yCSgN28AGYk4=; b=MDR+a7DD2EHHA80cnDWeNL97OXoKu8iWv5uEQr0Dis5QDjFK5GRAn0X0g9aXglGLDa Hp/U0xiBaTciwoqaBFdwtDte8hbSrE57OA3Mx/bQRQWc6S72y1DX3pUYGz8Gumr6DQ5l bVkIPVzlLJnTWMud+14uDd5eAJLmwyZLhfnhO4oijKDNIm+QK/CqbgWdWO9loh3YsU7p Yi3Lna3DwQrq8H3BVGFmjN25O8CJ3ON/5aKXntdepO4Etq7Qa4uyi9zrorQqZFqKu/ys KvuKk0tv2rnsyLhRnJqND34H2l7UC1hLQLzAbkJvPTddPOjkFmZxp6l8XN5x64JsER3n O/0g== X-Gm-Message-State: AOAM533ksQXuM54eqLAhLY/jeIVM1mhU6jaXfutKX5WdF15bCtyHSCPH +vC/CdUXppUFlBPtkvbnpSc= X-Google-Smtp-Source: ABdhPJyOEOL44VujhODMTHdDYBBbkHrkwAmo3OyRqMFbH/K1U11u5N+d1W4m50uQl0Gp/oSD/HokfQ== X-Received: by 2002:a5d:4d01:0:b0:1ef:74e5:4177 with SMTP id z1-20020a5d4d01000000b001ef74e54177mr12201004wrt.237.1646083302316; Mon, 28 Feb 2022 13:21:42 -0800 (PST) Received: from localhost ([2a01:4b00:f41a:3600:360b:9754:2e3a:c344]) by smtp.gmail.com with ESMTPSA id f21-20020a7bcd15000000b0034efd01ee16sm488427wmj.42.2022.02.28.13.21.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Feb 2022 13:21:41 -0800 (PST) From: luca.boccassi@gmail.com To: Pablo de Lara Cc: dpdk stable Subject: patch 'crypto/ipsec_mb: fix ZUC authentication verify' has been queued to stable release 20.11.5 Date: Mon, 28 Feb 2022 21:20:15 +0000 Message-Id: <20220228212047.3341966-19-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220228212047.3341966-1-luca.boccassi@gmail.com> References: <20220218123931.1749595-122-luca.boccassi@gmail.com> <20220228212047.3341966-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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 Hi, FYI, your patch has been queued to stable release 20.11.5 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 03/02/22. 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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/4bc8222a12bbf5eb56906d2eb15e3900a0dd436b Thanks. Luca Boccassi --- >From 4bc8222a12bbf5eb56906d2eb15e3900a0dd436b Mon Sep 17 00:00:00 2001 From: Pablo de Lara Date: Wed, 23 Feb 2022 16:01:14 +0000 Subject: [PATCH] crypto/ipsec_mb: fix ZUC authentication verify [ upstream commit bd3769739b3897865b1f0d2886ce1fe8a88eac75 ] 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") Signed-off-by: Pablo de Lara --- drivers/crypto/zuc/rte_zuc_pmd.c | 3 +-- drivers/crypto/zuc/zuc_pmd_private.h | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/zuc/rte_zuc_pmd.c b/drivers/crypto/zuc/rte_zuc_pmd.c index 28ce961c77..c1eb42754d 100644 --- a/drivers/crypto/zuc/rte_zuc_pmd.c +++ b/drivers/crypto/zuc/rte_zuc_pmd.c @@ -11,7 +11,6 @@ #include #include "zuc_pmd_private.h" -#define ZUC_MAX_BURST 16 #define BYTE_LEN 8 static uint8_t cryptodev_driver_id; @@ -264,7 +263,7 @@ process_zuc_hash_op(struct zuc_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->temp_digest; + dst[i] = (uint32_t *)qp->temp_digest[i]; else dst[i] = (uint32_t *)ops[i]->sym->auth.digest.data; diff --git a/drivers/crypto/zuc/zuc_pmd_private.h b/drivers/crypto/zuc/zuc_pmd_private.h index d8684891ee..e01f1378c6 100644 --- a/drivers/crypto/zuc/zuc_pmd_private.h +++ b/drivers/crypto/zuc/zuc_pmd_private.h @@ -19,6 +19,7 @@ extern int zuc_logtype_driver; #define ZUC_IV_KEY_LENGTH 16 #define ZUC_DIGEST_LENGTH 4 +#define ZUC_MAX_BURST 16 /** private data structure for each virtual ZUC device */ struct zuc_private { @@ -42,7 +43,7 @@ struct zuc_qp { /**< Session Private Data Mempool */ struct rte_cryptodev_stats qp_stats; /**< Queue pair statistics */ - uint8_t temp_digest[ZUC_DIGEST_LENGTH]; + uint8_t temp_digest[ZUC_MAX_BURST][ZUC_DIGEST_LENGTH]; /**< Buffer used to store the digest generated * by the driver when verifying a digest provided * by the user (using authentication verify operation) -- 2.30.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-02-28 21:17:55.527212030 +0000 +++ 0019-crypto-ipsec_mb-fix-ZUC-authentication-verify.patch 2022-02-28 21:17:53.860929669 +0000 @@ -1 +1 @@ -From bd3769739b3897865b1f0d2886ce1fe8a88eac75 Mon Sep 17 00:00:00 2001 +From 4bc8222a12bbf5eb56906d2eb15e3900a0dd436b Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit bd3769739b3897865b1f0d2886ce1fe8a88eac75 ] + @@ -13 +14,0 @@ -Cc: stable@dpdk.org @@ -17,3 +18,3 @@ - drivers/crypto/ipsec_mb/pmd_zuc.c | 2 +- - drivers/crypto/ipsec_mb/pmd_zuc_priv.h | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) + drivers/crypto/zuc/rte_zuc_pmd.c | 3 +-- + drivers/crypto/zuc/zuc_pmd_private.h | 3 ++- + 2 files changed, 3 insertions(+), 3 deletions(-) @@ -21,5 +22,13 @@ -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, +diff --git a/drivers/crypto/zuc/rte_zuc_pmd.c b/drivers/crypto/zuc/rte_zuc_pmd.c +index 28ce961c77..c1eb42754d 100644 +--- a/drivers/crypto/zuc/rte_zuc_pmd.c ++++ b/drivers/crypto/zuc/rte_zuc_pmd.c +@@ -11,7 +11,6 @@ + #include + + #include "zuc_pmd_private.h" +-#define ZUC_MAX_BURST 16 + #define BYTE_LEN 8 + + static uint8_t cryptodev_driver_id; +@@ -264,7 +263,7 @@ process_zuc_hash_op(struct zuc_qp *qp, struct rte_crypto_op **ops, @@ -29,2 +38,2 @@ -- dst[i] = (uint32_t *)qp_data->temp_digest; -+ dst[i] = (uint32_t *)qp_data->temp_digest[i]; +- dst[i] = (uint32_t *)qp->temp_digest; ++ dst[i] = (uint32_t *)qp->temp_digest[i]; @@ -34,5 +43,5 @@ -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 { +diff --git a/drivers/crypto/zuc/zuc_pmd_private.h b/drivers/crypto/zuc/zuc_pmd_private.h +index d8684891ee..e01f1378c6 100644 +--- a/drivers/crypto/zuc/zuc_pmd_private.h ++++ b/drivers/crypto/zuc/zuc_pmd_private.h +@@ -19,6 +19,7 @@ extern int zuc_logtype_driver; @@ -40 +49,3 @@ - struct zuc_qp_data { + #define ZUC_IV_KEY_LENGTH 16 + #define ZUC_DIGEST_LENGTH 4 ++#define ZUC_MAX_BURST 16 @@ -41,0 +53,6 @@ + /** private data structure for each virtual ZUC device */ + struct zuc_private { +@@ -42,7 +43,7 @@ struct zuc_qp { + /**< Session Private Data Mempool */ + struct rte_cryptodev_stats qp_stats; + /**< Queue pair statistics */ @@ -44 +61 @@ - /* *< Buffers used to store the digest generated + /**< Buffer used to store the digest generated