[dpdk-stable] patch 'crypto/mvsam: fix AES-GCM session parameters' has been queued to stable release 20.11.3

luca.boccassi at gmail.com luca.boccassi at gmail.com
Mon Jul 12 15:05:14 CEST 2021


Hi,

FYI, your patch has been queued to stable release 20.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/a544fc26a0d440835ef2e6ae6a8f428b68d4334e

Thanks.

Luca Boccassi

---
>From a544fc26a0d440835ef2e6ae6a8f428b68d4334e Mon Sep 17 00:00:00 2001
From: Dana Vardi <danat at marvell.com>
Date: Thu, 1 Jul 2021 09:58:12 +0300
Subject: [PATCH] crypto/mvsam: fix AES-GCM session parameters

[ upstream commit 22918d8400dc9e69ce889aed03066c4547e3fae6 ]

For AEAD session and AES-GCM mode, IV offset will
set to include the Nonce.
In addition, the following operations order will define:
first encryption and then authentication.

Fixes: 8a61c83af2fa ("crypto/mrvl: add mrvl crypto driver")

Signed-off-by: Dana Vardi <danat at marvell.com>
Reviewed-by: Liron Himi <lironh at marvell.com>
Tested-by: Liron Himi <lironh at marvell.com>
---
 drivers/crypto/mvsam/rte_mrvl_pmd.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd.c b/drivers/crypto/mvsam/rte_mrvl_pmd.c
index bec51c9ff6..5ac8ee2060 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd.c
@@ -360,6 +360,14 @@ mrvl_crypto_set_aead_session_parameters(struct mrvl_crypto_session *sess,
 	sess->sam_sess_params.cipher_mode =
 		aead_map[aead_xform->aead.algo].cipher_mode;
 
+	if (sess->sam_sess_params.cipher_mode == SAM_CIPHER_GCM) {
+		/* IV must include nonce for all counter modes */
+		sess->cipher_iv_offset = aead_xform->cipher.iv.offset;
+
+		/* Set order of authentication then encryption to 0 in GCM */
+		sess->sam_sess_params.u.basic.auth_then_encrypt = 0;
+	}
+
 	/* Assume IV will be passed together with data. */
 	sess->sam_sess_params.cipher_iv = NULL;
 
-- 
2.30.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-07-12 13:41:40.752953194 +0100
+++ 0079-crypto-mvsam-fix-AES-GCM-session-parameters.patch	2021-07-12 13:41:36.694126860 +0100
@@ -1 +1 @@
-From 22918d8400dc9e69ce889aed03066c4547e3fae6 Mon Sep 17 00:00:00 2001
+From a544fc26a0d440835ef2e6ae6a8f428b68d4334e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 22918d8400dc9e69ce889aed03066c4547e3fae6 ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org
@@ -22 +23 @@
-index b2cfa710f5..ba5cb28654 100644
+index bec51c9ff6..5ac8ee2060 100644


More information about the stable mailing list