patch 'crypto/cnxk: fix CN9K ECDH public key verification' has been queued to stable release 23.11.1

Xueming Li xuemingl at nvidia.com
Tue Mar 5 10:46:46 CET 2024


Hi,

FYI, your patch has been queued to stable release 23.11.1

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/31/24. 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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=8988726643bc4e51fc69195f98fde69422761cf0

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 8988726643bc4e51fc69195f98fde69422761cf0 Mon Sep 17 00:00:00 2001
From: Gowrishankar Muthukrishnan <gmuthukrishn at marvell.com>
Date: Wed, 17 Jan 2024 16:00:50 +0530
Subject: [PATCH] crypto/cnxk: fix CN9K ECDH public key verification
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 5c90255831675489f3e303f7c2b08012f8401505 ]

Fix ECDH pubkey verify in cn9k.

Fixes: baae0994fa96 ("crypto/cnxk: support ECDH")

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn at marvell.com>
Acked-by: Akhil Goyal <gakhil at marvell.com>
---
 drivers/crypto/cnxk/cn9k_cryptodev_ops.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/crypto/cnxk/cn9k_cryptodev_ops.c b/drivers/crypto/cnxk/cn9k_cryptodev_ops.c
index 34d40b07d4..442cd8e5a9 100644
--- a/drivers/crypto/cnxk/cn9k_cryptodev_ops.c
+++ b/drivers/crypto/cnxk/cn9k_cryptodev_ops.c
@@ -578,7 +578,17 @@ cn9k_cpt_dequeue_post_process(struct cnxk_cpt_qp *qp, struct rte_crypto_op *cop,
 		if (unlikely(res->uc_compcode)) {
 			if (res->uc_compcode == ROC_SE_ERR_GC_ICV_MISCOMPARE)
 				cop->status = RTE_CRYPTO_OP_STATUS_AUTH_FAILED;
-			else
+			else if (cop->type == RTE_CRYPTO_OP_TYPE_ASYMMETRIC &&
+				 cop->sess_type == RTE_CRYPTO_OP_WITH_SESSION &&
+				 cop->asym->ecdh.ke_type == RTE_CRYPTO_ASYM_KE_PUB_KEY_VERIFY) {
+				if (res->uc_compcode == ROC_AE_ERR_ECC_POINT_NOT_ON_CURVE) {
+					cop->status = RTE_CRYPTO_OP_STATUS_ERROR;
+					return;
+				} else if (res->uc_compcode == ROC_AE_ERR_ECC_PAI) {
+					cop->status = RTE_CRYPTO_OP_STATUS_SUCCESS;
+					return;
+				}
+			} else
 				cop->status = RTE_CRYPTO_OP_STATUS_ERROR;

 			plt_dp_info("Request failed with microcode error");
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:32.903248864 +0800
+++ 0065-crypto-cnxk-fix-CN9K-ECDH-public-key-verification.patch	2024-03-05 17:39:30.783566493 +0800
@@ -1 +1 @@
-From 5c90255831675489f3e303f7c2b08012f8401505 Mon Sep 17 00:00:00 2001
+From 8988726643bc4e51fc69195f98fde69422761cf0 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 5c90255831675489f3e303f7c2b08012f8401505 ]
@@ -9 +11,0 @@
-Cc: stable at dpdk.org
@@ -18 +20 @@
-index 8b91d11b79..ccbd390bd7 100644
+index 34d40b07d4..442cd8e5a9 100644


More information about the stable mailing list