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 07AD0A0C47 for ; Tue, 10 Aug 2021 17:42:40 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EFB994014F; Tue, 10 Aug 2021 17:42:39 +0200 (CEST) Received: from smtp-relay-canonical-1.canonical.com (smtp-relay-canonical-1.canonical.com [185.125.188.121]) by mails.dpdk.org (Postfix) with ESMTP id E35DA4014F for ; Tue, 10 Aug 2021 17:42:38 +0200 (CEST) Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPS id C7D403F0B8 for ; Tue, 10 Aug 2021 15:42:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1628610158; bh=FtsuXETwQQeNJwIns7QKpmku0FzCWz+SXWsN/RAiUoE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=KUSPp9/CY7znm8LkOQhUd7p8LBatGhmYvUm67dzQhdw6LathhDFeByiDSndBo27TR XsrAUleuAYsIZkgs//WpRTdWM2fDOey5Pq9dizD1XjgxMJRyECBa75I+20Mh94R7TZ VvJ4xHqdvGJE6AveU657P++fATQaZuKwSSLOtHEpYh/5NPZmJyufa9ndrScTFsUx9z X1xwSE/mg9kKB+3R2EleaIErwFBdON03/6xP2bS+uD7QoUd3+hSVpJe0irn7ExbKib m5JqKfs5M8cItkN9iml/KIZBf1TA/Nhxj5yrv7ig6c5ilfxvWrZwWYpzbJrYA2vtL9 Sj75/pZxx3TjA== Received: by mail-ed1-f72.google.com with SMTP id y22-20020a0564023596b02903bd9452ad5cso10909168edc.20 for ; Tue, 10 Aug 2021 08:42:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FtsuXETwQQeNJwIns7QKpmku0FzCWz+SXWsN/RAiUoE=; b=D07AXsByhEwQdoYtFw7e0Nmx+ZaXISzESFXv4310GuPXXcYGjICZ3FemdxtoFnjSUP x2Qgi6F9CvOn7nwi9QzeYbs0UzE74oC4XQGCcr17xnJW4LmwBJv7KnVRslgYDCJnWWaL PzFF/sfZ4x+te6+2v4vjKJo+y0ZgewesEF2qSyVD7yKBuU5b/mc87lSiWQP/QPI6GlWT ca/ix5fgF8UlupUyGkZpiOiyrTbWiZtovf700v9H2+fSjoOEaOttmSsbyoLnQeAsWnnR Qo8HhthqOrz1rmrgUUsrTIXa6iKj0m4RDPAKWt8oUk8fDKgGte8tMwIsxPSnxraA+BpQ /GcA== X-Gm-Message-State: AOAM533M8OSnIsLoR4fO6fKHSpBdZOHXXcyvQs7TE23WDuhzPk+ciGkA 0a55v8ZlM+xmFnMSmJu6MY3n9QwMUkhL9AiRWAOgSXW+enF1uR3LXt8HfoNhBzq83XmgD471NjP TXzihcLK9YxsjXTeJ/Pf/Kj1n X-Received: by 2002:aa7:d04c:: with SMTP id n12mr5711171edo.342.1628610158547; Tue, 10 Aug 2021 08:42:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyBVhIH/CxAEIZ8O7TgUTYcwTvqeBDxkaPFxmnjiTYDoowFMl+1bHcw8HnjrkF9XJmRXrIuBQ== X-Received: by 2002:aa7:d04c:: with SMTP id n12mr5711159edo.342.1628610158398; Tue, 10 Aug 2021 08:42:38 -0700 (PDT) Received: from Keschdeichel.fritz.box ([2001:67c:1560:8007::aac:c4ad]) by smtp.gmail.com with ESMTPSA id ck3sm9729443edb.80.2021.08.10.08.42.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Aug 2021 08:42:38 -0700 (PDT) From: christian.ehrhardt@canonical.com To: Dana Vardi Cc: Liron Himi , dpdk stable Date: Tue, 10 Aug 2021 17:39:21 +0200 Message-Id: <20210810154022.749358-41-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210810154022.749358-1-christian.ehrhardt@canonical.com> References: <20210810154022.749358-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'crypto/mvsam: fix AES-GCM session parameters' has been queued to stable release 19.11.10 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 Sender: "stable" 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 --- >From d127198bed96dc5c8fd6b5602ca0c0f854ff72c8 Mon Sep 17 00:00:00 2001 From: Dana Vardi 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 Reviewed-by: Liron Himi Tested-by: Liron Himi --- 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@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,