Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp5086533rwb; Mon, 8 Aug 2022 11:56:53 -0700 (PDT) X-Google-Smtp-Source: AA6agR460sg5upjBn+VKKREheZhc9PsUze61crF49ZNs5ycO2HKHdCz6M2Px6mpi61t1PmRvnCOl X-Received: by 2002:a05:6402:11d1:b0:43e:33b:93fa with SMTP id j17-20020a05640211d100b0043e033b93famr19060095edw.419.1659985012861; Mon, 08 Aug 2022 11:56:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659985012; cv=none; d=google.com; s=arc-20160816; b=HGo0fATbwYNMide+ao4T88a+hyxHfYvjWNMn28Q98Q8rCvlnXFiMKEtsduoswIOCNo 1JNeU6W3g8FP4JExtnWQqmR9Qy7sAuANS45XttIQ1lJkAaoVpvVFWzgi2ITcAEdHSpk7 diWpK5aIXmtGYcape85ehNAdeJkLGvV/tDYYca4vSHkBSeezETppUMLnf7iX1exmGfuh Z3MeixQ+M3+SRoQHA0Qd4b+/9WILsPF5xaAafGHZB7ceEGASBo/VsH/r0JQTWYuEcLgc qHrSL5v89WL2j3Lt7nBuYfiQqMD5GsEXhWEwpg3S+40MQvZ4zWNLdsGSKhQrq+uHgzHs aCuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=vByx37oJV2F2hB9Z2stvMAw6Cuu4xsUY5OlwZjau8DU=; b=rN3Qz04/rFxljZuKOCWiMK3ntcQQD8OyXEqEG4C9EWpzMF23mrj4qKCQtDuum8Eu6N 6JyZufWn8HgL/MGi6GF+ZNHLASMuznmNDG9xoeW9eOxjs2rCx6PaSAyf+BwdzUEVcP1B Nrokse29ha9O8neh/QsHH89z7svODhdys0i8CxtoX6tscsOK1YCbAl3W0K1sJFF4I0CS RIB6o2gFT8Fk4b0alpzjnCDCU1Oj7HT5fDA63ZvDzurpKT+/hV7ieIQDjc7Rr+BRZ2zY /NJxN9IZRM+tbpHRNrb3lM8IlM4M982xFGqYhcsIO0nRkjwxtSPsl4wBYR5wy8K+ngVh NwwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=m9TCF1Lb; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hd9-20020a170907968900b0072b4151c094si227093ejc.879.2022.08.08.11.56.27; Mon, 08 Aug 2022 11:56:52 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=m9TCF1Lb; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243914AbiHHSdm (ORCPT + 99 others); Mon, 8 Aug 2022 14:33:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59880 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235278AbiHHSdj (ORCPT ); Mon, 8 Aug 2022 14:33:39 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B7D4DE82; Mon, 8 Aug 2022 11:33:39 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0062F61245; Mon, 8 Aug 2022 18:33:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2F40CC433D7; Mon, 8 Aug 2022 18:33:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1659983618; bh=D2XW8J2IVrVhTm9qso0bSI1eB34b3POF3YjI53CNJj4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=m9TCF1LblgMJD9S1VkUE1pBE+IEXHKG5gTnWhHoVjYzgmUxhwaysmPAQvRofn/80w RyDEbWSMcg77uqD8/ygAOFo6i+JcrqbhmrB+sIHzc4iFNGLTsy7Bhuq08Txqm92O8j +jsZ13tpScJr+DjRmevGyqJQMs4jUiSYh4RhL/Kk7NuokDsjucHxnXHojQxOAoRn2l mk25fUHPE5q6IvRDFkA4u2JFjEXXo/7/5ZP0unvdPkEvRR3trTvmrwMPIIZM2fG7vb oDgJ1YM4frZ6AU3rMsdAhwx02Ea7pU8U1mIoDduRDaISAM8rHn90yNplMy+c/vRZJK T+FQ+5abhb/fg== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id F27384035A; Mon, 8 Aug 2022 15:33:34 -0300 (-03) Date: Mon, 8 Aug 2022 15:33:34 -0300 From: Arnaldo Carvalho de Melo To: Daniel Borkmann Cc: 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, terrelln@fb.com, nathan@kernel.org, ndesaulniers@google.com, bpf@vger.kernel.org, linux-perf-users@vger.kernel.org, llvm@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH 4/4] build: Switch to new openssl API for test-libcrypto Message-ID: References: <20220719170555.2576993-1-roberto.sassu@huawei.com> <20220719170555.2576993-4-roberto.sassu@huawei.com> <5f867295-10d2-0085-d1dc-051f56e7136a@iogearbox.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5f867295-10d2-0085-d1dc-051f56e7136a@iogearbox.net> X-Url: http://acmel.wordpress.com X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 Em Mon, Aug 08, 2022 at 06:14:48PM +0200, Daniel Borkmann escreveu: > 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? Sure. > [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]); > > -- - Arnaldo