From: Greg Kroah-Hartman Date: Mon, 22 Aug 2022 09:13:50 +0000 (+0200) Subject: 4.14-stable patches X-Git-Tag: v4.9.326~65 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a8c1d2472cc33911bbadf0494ae0c93bd3eadb32;p=thirdparty%2Fkernel%2Fstable-queue.git 4.14-stable patches added patches: tools-build-switch-to-new-openssl-api-for-test-libcrypto.patch --- diff --git a/queue-4.14/series b/queue-4.14/series index d7633a6fe37..9072693f739 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -191,3 +191,4 @@ acpi-property-return-type-of-acpi_add_nondev_subnodes-should-be-bool.patch geneve-do-not-use-rt_tos-for-ipv6-flowlabel.patch vsock-fix-memory-leak-in-vsock_connect.patch vsock-set-socket-state-back-to-ss_unconnected-in-vsock_connect_timeout.patch +tools-build-switch-to-new-openssl-api-for-test-libcrypto.patch diff --git a/queue-4.14/tools-build-switch-to-new-openssl-api-for-test-libcrypto.patch b/queue-4.14/tools-build-switch-to-new-openssl-api-for-test-libcrypto.patch new file mode 100644 index 00000000000..2e3c3fde2d7 --- /dev/null +++ b/queue-4.14/tools-build-switch-to-new-openssl-api-for-test-libcrypto.patch @@ -0,0 +1,70 @@ +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]); +