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 E1786A0350 for ; Mon, 21 Feb 2022 16:43:31 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DBD764013F; Mon, 21 Feb 2022 16:43:31 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 61E234114A for ; Mon, 21 Feb 2022 16:43:30 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645458209; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4UQHUkRa+kfcQvIwXEoJ3vE1SQE8ykE0ER0310npbUo=; b=E1Xm6IBCDB3fuhUD3knzWFQRB2IG4xgObP8G5VoJlShYjPTshXp+6mQ8/OgU7i6e3t6vlw s7UNN3ZM7Kd+Ae7+K5csWC5wG0m2esqOfKiz3WQdma3aXJVokktWeNj5m1TMFoCvr7ndeV sFoEZBbz/AQnDh9ZiWUbmaJ8LxopLCA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-301-oZawAlA6MTaKe0AV5JALvg-1; Mon, 21 Feb 2022 10:43:25 -0500 X-MC-Unique: oZawAlA6MTaKe0AV5JALvg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C6BC4814245; Mon, 21 Feb 2022 15:43:24 +0000 (UTC) Received: from rh.Home (unknown [10.39.195.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id BDE1B7E131; Mon, 21 Feb 2022 15:43:23 +0000 (UTC) From: Kevin Traynor To: Hemant Agrawal Cc: dpdk stable Subject: patch 'crypto/dpaax_sec: fix auth/cipher xform chain checks' has been queued to stable release 21.11.1 Date: Mon, 21 Feb 2022 15:36:21 +0000 Message-Id: <20220221153625.152324-192-ktraynor@redhat.com> In-Reply-To: <20220221153625.152324-1-ktraynor@redhat.com> References: <20220221153625.152324-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ktraynor@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" 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 Hi, FYI, your patch has been queued to stable release 21.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 02/26/22. 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/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/0627e93c26d18553a9e19816aa965c2606278c96 Thanks. Kevin --- >From 0627e93c26d18553a9e19816aa965c2606278c96 Mon Sep 17 00:00:00 2001 From: Hemant Agrawal Date: Thu, 10 Feb 2022 16:28:50 +0530 Subject: [PATCH] crypto/dpaax_sec: fix auth/cipher xform chain checks [ upstream commit 99cc26f6652caa2c779fd169cadd62a1c365d52f ] This patch add more checks on next type for PDCP cases. Fixes: 45e019608f31 ("crypto/dpaa2_sec: support integrity only PDCP") Fixes: a1173d55598c ("crypto/dpaa_sec: support PDCP offload") Signed-off-by: Hemant Agrawal --- drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 6 ++++-- drivers/crypto/dpaa_sec/dpaa_sec.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c index a5b052375d..5b5c4f3639 100644 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c @@ -3139,5 +3139,6 @@ dpaa2_sec_set_pdcp_session(struct rte_cryptodev *dev, if (xform->type == RTE_CRYPTO_SYM_XFORM_CIPHER) { cipher_xform = &xform->cipher; - if (xform->next != NULL) { + if (xform->next != NULL && + xform->next->type == RTE_CRYPTO_SYM_XFORM_AUTH) { session->ext_params.aead_ctxt.auth_cipher_text = true; auth_xform = &xform->next->auth; @@ -3145,5 +3146,6 @@ dpaa2_sec_set_pdcp_session(struct rte_cryptodev *dev, } else if (xform->type == RTE_CRYPTO_SYM_XFORM_AUTH) { auth_xform = &xform->auth; - if (xform->next != NULL) { + if (xform->next != NULL && + xform->next->type == RTE_CRYPTO_SYM_XFORM_CIPHER) { session->ext_params.aead_ctxt.auth_cipher_text = false; cipher_xform = &xform->next->cipher; diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c index f20acdd123..98bc495c35 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.c +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c @@ -2987,9 +2987,11 @@ dpaa_sec_set_pdcp_session(struct rte_cryptodev *dev, if (xform->type == RTE_CRYPTO_SYM_XFORM_CIPHER) { cipher_xform = &xform->cipher; - if (xform->next != NULL) + if (xform->next != NULL && + xform->next->type == RTE_CRYPTO_SYM_XFORM_AUTH) auth_xform = &xform->next->auth; } else if (xform->type == RTE_CRYPTO_SYM_XFORM_AUTH) { auth_xform = &xform->auth; - if (xform->next != NULL) + if (xform->next != NULL && + xform->next->type == RTE_CRYPTO_SYM_XFORM_CIPHER) cipher_xform = &xform->next->cipher; } else { -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-02-21 15:22:48.782731023 +0000 +++ 0192-crypto-dpaax_sec-fix-auth-cipher-xform-chain-checks.patch 2022-02-21 15:22:44.381704779 +0000 @@ -1 +1 @@ -From 99cc26f6652caa2c779fd169cadd62a1c365d52f Mon Sep 17 00:00:00 2001 +From 0627e93c26d18553a9e19816aa965c2606278c96 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 99cc26f6652caa2c779fd169cadd62a1c365d52f ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -19 +20 @@ -index 444e1f0043..cb8aaf6446 100644 +index a5b052375d..5b5c4f3639 100644 @@ -22 +23 @@ -@@ -3232,5 +3232,6 @@ dpaa2_sec_set_pdcp_session(struct rte_cryptodev *dev, +@@ -3139,5 +3139,6 @@ dpaa2_sec_set_pdcp_session(struct rte_cryptodev *dev, @@ -30 +31 @@ -@@ -3238,5 +3239,6 @@ dpaa2_sec_set_pdcp_session(struct rte_cryptodev *dev, +@@ -3145,5 +3146,6 @@ dpaa2_sec_set_pdcp_session(struct rte_cryptodev *dev, @@ -39 +40 @@ -index 1137b142e9..75e437f696 100644 +index f20acdd123..98bc495c35 100644 @@ -42 +43 @@ -@@ -2985,9 +2985,11 @@ dpaa_sec_set_pdcp_session(struct rte_cryptodev *dev, +@@ -2987,9 +2987,11 @@ dpaa_sec_set_pdcp_session(struct rte_cryptodev *dev,