Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp4960714rwb; Mon, 8 Aug 2022 09:43:30 -0700 (PDT) X-Google-Smtp-Source: AA6agR57iNlSLPfE41rFEjvp+t5kxqANWWNRI5cX6rxjCmrgJXHB017gIGJJ78zmbk8W3yDxj4ae X-Received: by 2002:a17:902:cf11:b0:16b:e1a5:aee with SMTP id i17-20020a170902cf1100b0016be1a50aeemr19735612plg.132.1659977009810; Mon, 08 Aug 2022 09:43:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659977009; cv=none; d=google.com; s=arc-20160816; b=cihO1Ha0rgPRMzEunheusBIzCyg+tIHBnzOOBwrTIAfRWT/lHGgpLHWZIyzUtZfM7d wFmDskFtJJ6Ws21d16i2NtN6UD2runi0/q506abUTtSVoxzLuOtenfMm889f7jBMoRnG nA2xN5/v+CZ17aUNvTRe9k6pLpxthO5kqk8Ce7A+JVzoQuKX/94bx9UQ2F5u4cAYTb7x mPBu0PEnX5hYH+FlLdp/aP0Sa+29GMzWbYbiZaNDnviZsaeOUtY/dSFKA3SjipuS2RNB 42SlNWRxrtT9x5wW8PKLMVRNwbC4p+vPPhbjCCdIjqFkHav0aOhrcsY3XV6I6o6HzRpI KuNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=5IqFSJRaGEpMyu4pl9IVR5yLz8J2IGxbo9euOgrQKJo=; b=kN5n9tlVTTXFKa49EmbkDJb9VkUMqXM6mkO/yIcVko+sUZeSGdsVtr/6WRqxadhPH3 VN/NNfHWbhcY004GAQfMLqgbVLaPZuOWFYAUHaL+GP4j+cP/id4L/0OxQ2kWdrxN1jZK 5xxv2OGG+bWCtIw1+hhlyJxzgua0BTApvvV7MWRjBQzN0kd1dDLbxGm/er3owg5idX7p kpHaIQHa7nw2/63B6qJsEoUWmv1idvknfTGMRE3423mWWWEI+81rkHSIotWHQOs+Ldln EPfcr4t6aXWtvJcDaeGpi2nViJFWRCno4AR9+ydV2R6TWtPz1kjxZFK/GPJnveVD3Vwt GfXw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ob10-20020a17090b390a00b001f0d1914b69si13242084pjb.9.2022.08.08.09.43.16; Mon, 08 Aug 2022 09:43:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243941AbiHHQPP (ORCPT + 99 others); Mon, 8 Aug 2022 12:15:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230398AbiHHQPO (ORCPT ); Mon, 8 Aug 2022 12:15:14 -0400 Received: from www62.your-server.de (www62.your-server.de [213.133.104.62]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 622FE126; Mon, 8 Aug 2022 09:15:12 -0700 (PDT) Received: from sslproxy01.your-server.de ([78.46.139.224]) by www62.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92.3) (envelope-from ) id 1oL5Oz-0002Rw-Hu; Mon, 08 Aug 2022 18:14:49 +0200 Received: from [85.1.206.226] (helo=linux.home) by sslproxy01.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oL5Oz-000OuE-0M; Mon, 08 Aug 2022 18:14:49 +0200 Subject: Re: [PATCH 4/4] build: Switch to new openssl API for test-libcrypto To: Roberto Sassu , quentin@isovalent.com, ast@kernel.org, andrii@kernel.org, martin.lau@linux.dev, song@kernel.org, john.fastabend@gmail.com, kpsingh@kernel.org, sdf@google.com, peterz@infradead.org, mingo@redhat.com, acme@kernel.org, terrelln@fb.com, nathan@kernel.org, ndesaulniers@google.com Cc: bpf@vger.kernel.org, linux-perf-users@vger.kernel.org, llvm@lists.linux.dev, linux-kernel@vger.kernel.org References: <20220719170555.2576993-1-roberto.sassu@huawei.com> <20220719170555.2576993-4-roberto.sassu@huawei.com> From: Daniel Borkmann Message-ID: <5f867295-10d2-0085-d1dc-051f56e7136a@iogearbox.net> Date: Mon, 8 Aug 2022 18:14:48 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <20220719170555.2576993-4-roberto.sassu@huawei.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.103.6/26621/Mon Aug 8 09:52:38 2022) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Arnaldo, On 7/19/22 7:05 PM, Roberto Sassu wrote: > 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. > > Signed-off-by: Roberto Sassu Given rest of the tooling fixes from Andres Freund went via perf tree and the below is perf related as well, I presume you'll pick this up, too? [0] https://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git/log/?h=perf/core > tools/build/feature/test-libcrypto.c | 15 +++++++++++---- > 1 file changed, 11 insertions(+), 4 deletions(-) > > diff --git a/tools/build/feature/test-libcrypto.c b/tools/build/feature/test-libcrypto.c > index a98174e0569c..bc34a5bbb504 100644 > --- 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]); > >