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 AB22542D83 for ; Wed, 28 Jun 2023 16:11:03 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A5E1E41138; Wed, 28 Jun 2023 16:11:03 +0200 (CEST) Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) by mails.dpdk.org (Postfix) with ESMTP id ADBC6400EF for ; Wed, 28 Jun 2023 16:11:01 +0200 (CEST) Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-3fa7512e599so69884325e9.2 for ; Wed, 28 Jun 2023 07:11:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687961461; x=1690553461; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Q/a0IB+7+pHaLnyKP+2WYOWDDcn93VBa5Myyc+i2Az0=; b=LDDpO1C7b9aRHrF7xA2bGhtBqz3/6BDpSpCLUebkLpGsEejLkOlgDYqNg7WzVCIFj7 CV/4FHto2OYAtT6LnlbetTo/VjU2Vw6nQMq9d1lKki3ZynBNjQfZEd8w50Vc9tWumJ9z dqAbv74Q83Sja1rfKhDJqOvE3FuUpwpdAYTNSBJlHvyIPMzjhjpT+hynBWupUU0LWl8d /ernVbxzJzm6MGHWffSzMoe5y+HAoomPyWexRS47VC0GthCeN5xt/eCbecMoOaMJwm+I vdI7YsGuhzKQipT/NKQovPX6pJKl81oOF5h0ChD2KKlAAaiD4Is5w3bMh0Ygsf+74Crm VV8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687961461; x=1690553461; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Q/a0IB+7+pHaLnyKP+2WYOWDDcn93VBa5Myyc+i2Az0=; b=BZm2pV3zeHvQSGCn1/tutFBTHLneAaROm1530TCpLfiezrd0qrbzbiv9S3hNkN0TE7 c03AmPSDFyjbp9w0l2mPAvKnpnxeBvImLV45HMAc+2VCatAKAef44lZNFHuZVyFcqteB EK8ldFACbGpdRknI+qTX3bcPJxrpY12cRG3UMiCnu4qlVWrGUCG8wiAZ+u7McmuUosfA /zSFr2cZLTP1kzHG3TQQK91D/R4cWzPNdtMQn+uCxs1fsS8LCxbb1jOG5+WVoqq4olkg UArEXyE3Ouj2Xd9eKF1fYXr9BRPZKvjhBkMlbhn3yWAaHaA37oGe/yRjpEEOyGL3ja7q XNtQ== X-Gm-Message-State: AC+VfDyRijq76kR6hiQ0l09Pa1lRo/Cv52/sIT/d08h9RvRO7O5Ku5OG T7OeTVLluNR52SC3JYWo2JOyejIzuCOAuQ== X-Google-Smtp-Source: ACHHUZ6b0quF1GbYisLMjmQfVMAJohmxrEekpDThWUti7a2B2xAz/JXst8nq0H10R9L8wAum5pSPyQ== X-Received: by 2002:a1c:7705:0:b0:3fa:c3e8:901a with SMTP id t5-20020a1c7705000000b003fac3e8901amr5927795wmi.25.1687961461222; Wed, 28 Jun 2023 07:11:01 -0700 (PDT) Received: from localhost ([2a01:4b00:d307:1000:f1d3:eb5e:11f4:a7d9]) by smtp.gmail.com with ESMTPSA id m14-20020a7bca4e000000b003fa786b5195sm13941027wml.42.2023.06.28.07.11.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jun 2023 07:11:00 -0700 (PDT) From: luca.boccassi@gmail.com To: Didier Pallard Cc: Kai Ji , dpdk stable Subject: patch 'crypto/openssl: skip workaround at compilation time' has been queued to stable release 20.11.9 Date: Wed, 28 Jun 2023 15:10:28 +0100 Message-Id: <20230628141046.2145871-4-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230628141046.2145871-1-luca.boccassi@gmail.com> References: <20230615013258.1439718-63-luca.boccassi@gmail.com> <20230628141046.2145871-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 20.11.9 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/30/23. 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/002685408d2231b30b1144a7f6506407c23c7fdb Thanks. Luca Boccassi --- >From 002685408d2231b30b1144a7f6506407c23c7fdb Mon Sep 17 00:00:00 2001 From: Didier Pallard Date: Tue, 18 Apr 2023 16:56:19 +0200 Subject: [PATCH] crypto/openssl: skip workaround at compilation time [ upstream commit 5b94ac1965620e945a3b8fcff84fab4fcb2ef801 ] This workaround was needed before version 1.0.1f. Do not build it for versions >= 1.1. Fixes: d61f70b4c918 ("crypto/libcrypto: add driver for OpenSSL library") Signed-off-by: Didier Pallard Acked-by: Kai Ji --- drivers/crypto/openssl/rte_openssl_pmd.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c index 786c87baed..089d879a5e 100644 --- a/drivers/crypto/openssl/rte_openssl_pmd.c +++ b/drivers/crypto/openssl/rte_openssl_pmd.c @@ -1061,8 +1061,11 @@ process_openssl_auth_encryption_gcm(struct rte_mbuf *mbuf_src, int offset, int srclen, uint8_t *aad, int aadlen, uint8_t *iv, uint8_t *dst, uint8_t *tag, EVP_CIPHER_CTX *ctx) { - int len = 0, unused = 0; + int len = 0; +#if OPENSSL_VERSION_NUMBER < 0x10100000L + int unused = 0; uint8_t empty[] = {}; +#endif if (EVP_EncryptInit_ex(ctx, NULL, NULL, NULL, iv) <= 0) goto process_auth_encryption_gcm_err; @@ -1076,9 +1079,11 @@ process_openssl_auth_encryption_gcm(struct rte_mbuf *mbuf_src, int offset, srclen, ctx, 0)) goto process_auth_encryption_gcm_err; +#if OPENSSL_VERSION_NUMBER < 0x10100000L /* Workaround open ssl bug in version less then 1.0.1f */ if (EVP_EncryptUpdate(ctx, empty, &unused, empty, 0) <= 0) goto process_auth_encryption_gcm_err; +#endif if (EVP_EncryptFinal_ex(ctx, dst, &len) <= 0) goto process_auth_encryption_gcm_err; @@ -1140,8 +1145,11 @@ process_openssl_auth_decryption_gcm(struct rte_mbuf *mbuf_src, int offset, int srclen, uint8_t *aad, int aadlen, uint8_t *iv, uint8_t *dst, uint8_t *tag, EVP_CIPHER_CTX *ctx) { - int len = 0, unused = 0; + int len = 0; +#if OPENSSL_VERSION_NUMBER < 0x10100000L + int unused = 0; uint8_t empty[] = {}; +#endif if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_SET_TAG, 16, tag) <= 0) goto process_auth_decryption_gcm_err; @@ -1158,9 +1166,11 @@ process_openssl_auth_decryption_gcm(struct rte_mbuf *mbuf_src, int offset, srclen, ctx, 0)) goto process_auth_decryption_gcm_err; +#if OPENSSL_VERSION_NUMBER < 0x10100000L /* Workaround open ssl bug in version less then 1.0.1f */ if (EVP_DecryptUpdate(ctx, empty, &unused, empty, 0) <= 0) goto process_auth_decryption_gcm_err; +#endif if (EVP_DecryptFinal_ex(ctx, dst, &len) <= 0) return -EFAULT; -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-06-28 11:40:08.240346384 +0100 +++ 0004-crypto-openssl-skip-workaround-at-compilation-time.patch 2023-06-28 11:40:08.020026763 +0100 @@ -1 +1 @@ -From 5b94ac1965620e945a3b8fcff84fab4fcb2ef801 Mon Sep 17 00:00:00 2001 +From 002685408d2231b30b1144a7f6506407c23c7fdb Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 5b94ac1965620e945a3b8fcff84fab4fcb2ef801 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -19 +20 @@ -index 9b83811d67..4569c5e62f 100644 +index 786c87baed..089d879a5e 100644 @@ -22 +23 @@ -@@ -1196,8 +1196,11 @@ process_openssl_auth_encryption_gcm(struct rte_mbuf *mbuf_src, int offset, +@@ -1061,8 +1061,11 @@ process_openssl_auth_encryption_gcm(struct rte_mbuf *mbuf_src, int offset, @@ -35 +36 @@ -@@ -1211,9 +1214,11 @@ process_openssl_auth_encryption_gcm(struct rte_mbuf *mbuf_src, int offset, +@@ -1076,9 +1079,11 @@ process_openssl_auth_encryption_gcm(struct rte_mbuf *mbuf_src, int offset, @@ -47 +48 @@ -@@ -1275,8 +1280,11 @@ process_openssl_auth_decryption_gcm(struct rte_mbuf *mbuf_src, int offset, +@@ -1140,8 +1145,11 @@ process_openssl_auth_decryption_gcm(struct rte_mbuf *mbuf_src, int offset, @@ -60 +61 @@ -@@ -1293,9 +1301,11 @@ process_openssl_auth_decryption_gcm(struct rte_mbuf *mbuf_src, int offset, +@@ -1158,9 +1166,11 @@ process_openssl_auth_decryption_gcm(struct rte_mbuf *mbuf_src, int offset,