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 1ECABA0C4C for ; Mon, 12 Jul 2021 15:14:13 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 18B0D40685; Mon, 12 Jul 2021 15:14:13 +0200 (CEST) Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) by mails.dpdk.org (Postfix) with ESMTP id 68DCB411A0 for ; Mon, 12 Jul 2021 15:14:12 +0200 (CEST) Received: by mail-wm1-f47.google.com with SMTP id j25-20020a05600c1c19b02902269686f585so1199954wms.0 for ; Mon, 12 Jul 2021 06:14:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=u9CvQKVmQlhgbtNytQ2K6UdN5qgOmZhSYFKITTX31QY=; b=RzJXu0dOb4dtdfEWugv/pqRx4UNDhLEhPcqvcqihlYKUb1oAJlbpXpjiB6UXxsgIPA 56vc+Sy31MDOLXxsGGrLxE6NTndATt6tALT8wnqovy8Qbfa74Rrf2pU5NyJhQNrzhNeU zP1xlXXwB2HLOFLuWl+4raBFOJDc6NabyyJ1QvK8jZrWjNApWKBWgUu4Dqmjso/XiWbH H+hoFQzjbxnWpW8Ipygtagmc5JS5i2XPF1dcz+cftJSIdWbVyksBU4xrGF+Ikremp2FN cJPxG2f7ftEyKvo52tZBVvT28XQjHFLzfOT2rOoo8HacLarelpTErtKTloPmPAjjMYFF YlVg== 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=u9CvQKVmQlhgbtNytQ2K6UdN5qgOmZhSYFKITTX31QY=; b=n0oOPhV2e98c9IvSZqWb7j9/CSL2yqSG1sEBJGrdcScHeNUK2SfICxjIW4tf25w2Xc XjiOIvQbXyRdhY5OHZqPeI6Libx5uABgDsQ70dyOVMHCkhcsxljmkQZHcBTjWsrlYss0 i0Cku3Uexp89wWV8VjXcQAGLsQyrbNMGwx74LTRZAeBTp2xvOyQA2ZHdRWPKNUwkHaYq 0tVAzvm1tkgdtOHKSU/5grdogLdY6NFKLRwT3w2J5652jnLWmbndmFV84CZcQq7+Iu9r NMADSiU/dElXXgXJ3K8liI6Q6U+rGg03jn5JCfLDsIz8RbVaRqcjh9xLiqoaxA+uowYJ cHnw== X-Gm-Message-State: AOAM530LaWnDH0L6s+5dj9TzMyk2ZE5jHeTZVnGzHCWyFeY3N/Z3z3q3 o2bG1q3z/lRCtJ4dSNq9Djg= X-Google-Smtp-Source: ABdhPJxDo1ceHvXhh0IVKoS8Pk03Ms1WE5vam68w29b/TvTm+BBRngWZP7GIm94ZkzigEvu104EyuA== X-Received: by 2002:a1c:4c0a:: with SMTP id z10mr7329688wmf.24.1626095652182; Mon, 12 Jul 2021 06:14:12 -0700 (PDT) Received: from localhost ([137.220.125.106]) by smtp.gmail.com with ESMTPSA id b12sm14441500wrx.60.2021.07.12.06.14.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jul 2021 06:14:11 -0700 (PDT) From: luca.boccassi@gmail.com To: Dana Vardi Cc: Liron Himi , dpdk stable Date: Mon, 12 Jul 2021 14:05:14 +0100 Message-Id: <20210712130551.2462159-79-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210712130551.2462159-1-luca.boccassi@gmail.com> References: <20210712130551.2462159-1-luca.boccassi@gmail.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 20.11.3 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 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 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 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@dpdk.org @@ -22 +23 @@ -index b2cfa710f5..ba5cb28654 100644 +index bec51c9ff6..5ac8ee2060 100644