From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EED117EC for ; Mon, 22 Aug 2022 09:16:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 40D73C433C1; Mon, 22 Aug 2022 09:16:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661159806; bh=bzquj3qt1EtQk+OChulRIFKTfQUr9RSZAGXRtx/8tCI=; h=Subject:To:Cc:From:Date:From; b=BIgGa/hyKWniZwYLx4Bfylc8piDZyxltOo9vQOG+ETPHZ1JTyXII5S+J2u36oFVco t10Qttj5iDdQKeUCKb3IsWC8vFLI0X5EPmBSmdXA9RombBTtzo1D5qjLNjiA6ZOA0s NT/uB81O0gBCYf5+uLOkPXjzEgJLl3NQd+vzLNvU= Subject: Patch "tools build: Switch to new openssl API for test-libcrypto" has been added to the 5.19-stable tree To: acme@redhat.com,andrii@kernel.org,ast@kernel.org,daniel@iogearbox.net,gregkh@linuxfoundation.org,john.fastabend@gmail.com,kpsingh@kernel.org,llvm@lists.linux.dev,martin.lau@linux.dev,mingo@redhat.com,nathan@kernel.org,ndesaulniers@google.com,peterz@infradead.org,quentin@isovalent.com,roberto.sassu@huawei.com,sdf@google.com,song@kernel.org,terrelln@fb.com Cc: From: Date: Mon, 22 Aug 2022 11:16:05 +0200 Message-ID: <16611597657271@kroah.com> Precedence: bulk X-Mailing-List: llvm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit X-stable: commit X-Patchwork-Hint: ignore This is a note to let you know that I've just added the patch titled tools build: Switch to new openssl API for test-libcrypto to the 5.19-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: tools-build-switch-to-new-openssl-api-for-test-libcrypto.patch and it can be found in the queue-5.19 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >From 5b245985a6de5ac18b5088c37068816d413fb8ed Mon Sep 17 00:00:00 2001 From: Roberto Sassu Date: Tue, 19 Jul 2022 19:05:55 +0200 Subject: tools build: Switch to new openssl API for test-libcrypto From: Roberto Sassu commit 5b245985a6de5ac18b5088c37068816d413fb8ed upstream. Switch to new EVP API for detecting libcrypto, as Fedora 36 returns an error when it encounters the deprecated function MD5_Init() and the others. The error would be interpreted as missing libcrypto, while in reality it is not. Fixes: 6e8ccb4f624a73c5 ("tools/bpf: properly account for libbfd variations") Signed-off-by: Roberto Sassu Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: bpf@vger.kernel.org Cc: Daniel Borkmann Cc: Ingo Molnar Cc: John Fastabend Cc: KP Singh Cc: llvm@lists.linux.dev Cc: Martin KaFai Lau Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Nick Terrell Cc: Peter Zijlstra Cc: Quentin Monnet Cc: Song Liu Cc: Stanislav Fomichev Link: https://lore.kernel.org/r/20220719170555.2576993-4-roberto.sassu@huawei.com Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Greg Kroah-Hartman --- tools/build/feature/test-libcrypto.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) --- a/tools/build/feature/test-libcrypto.c +++ b/tools/build/feature/test-libcrypto.c @@ -1,16 +1,23 @@ // SPDX-License-Identifier: GPL-2.0 +#include #include #include int main(void) { - MD5_CTX context; + EVP_MD_CTX *mdctx; unsigned char md[MD5_DIGEST_LENGTH + SHA_DIGEST_LENGTH]; unsigned char dat[] = "12345"; + unsigned int digest_len; - MD5_Init(&context); - MD5_Update(&context, &dat[0], sizeof(dat)); - MD5_Final(&md[0], &context); + mdctx = EVP_MD_CTX_new(); + if (!mdctx) + return 0; + + EVP_DigestInit_ex(mdctx, EVP_md5(), NULL); + EVP_DigestUpdate(mdctx, &dat[0], sizeof(dat)); + EVP_DigestFinal_ex(mdctx, &md[0], &digest_len); + EVP_MD_CTX_free(mdctx); SHA1(&dat[0], sizeof(dat), &md[0]); Patches currently in stable-queue which might be from roberto.sassu@huawei.com are queue-5.19/tools-build-switch-to-new-openssl-api-for-test-libcrypto.patch