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

christian.ehrhardt at canonical.com christian.ehrhardt at canonical.com
Tue Aug 10 17:39:21 CEST 2021


Hi,

FYI, your patch has been queued to stable release 19.11.10

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/d127198bed96dc5c8fd6b5602ca0c0f854ff72c8

Thanks.

Christian Ehrhardt <christian.ehrhardt at canonical.com>

---
>From d127198bed96dc5c8fd6b5602ca0c0f854ff72c8 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 63782ce974..e01b357943 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd.c
@@ -361,6 +361,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.32.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-08-10 15:11:14.644458162 +0200
+++ 0041-crypto-mvsam-fix-AES-GCM-session-parameters.patch	2021-08-10 15:11:13.006638012 +0200
@@ -1 +1 @@
-From 22918d8400dc9e69ce889aed03066c4547e3fae6 Mon Sep 17 00:00:00 2001
+From d127198bed96dc5c8fd6b5602ca0c0f854ff72c8 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 63782ce974..e01b357943 100644
@@ -25 +26 @@
-@@ -360,6 +360,14 @@ mrvl_crypto_set_aead_session_parameters(struct mrvl_crypto_session *sess,
+@@ -361,6 +361,14 @@ mrvl_crypto_set_aead_session_parameters(struct mrvl_crypto_session *sess,


More information about the stable mailing list