patch 'crypto/ipsec_mb: fix ZUC authentication verify' has been queued to stable release 20.11.5
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Mon Feb 28 22:20:15 CET 2022
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 <pablo.de.lara.guarch at intel.com>
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 <pablo.de.lara.guarch at intel.com>
---
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 <rte_cpuflags.h>
#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 at 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 <rte_cpuflags.h>
+
+ #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
More information about the stable
mailing list