Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2204035iog; Sun, 26 Jun 2022 09:15:32 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vkMxTTUYRxvzL8qbGHwUiflIT65Lh7ofMgmPCJLEPU7zWl5N0K8z88GAqgH3BC2EzNsnBD X-Received: by 2002:a17:902:dacd:b0:16a:4110:22a with SMTP id q13-20020a170902dacd00b0016a4110022amr10098644plx.11.1656260132628; Sun, 26 Jun 2022 09:15:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656260132; cv=none; d=google.com; s=arc-20160816; b=HmUJCx5z2GGzIiIliJmTo6rr8N+XA1FOd08cEE7uHYMc/w7eqUNnhKEoRVcfz0Pexh UCfAJJsMsRkkivwZ4l2yvovfMO2ZG2eHJPK5OauZYKLcDBebIRWnk7el//3hzhCT62og AjJ8SO/br2b0xLZsjwIOvVgBq/dBPQLwoBNvnbATNYqX7Z+u7Y+oFNXKUHVeqXW/d+wU m2l2nHTubMZHpdqNtg5xD8C5kzREc9a48t6xgV/YZ/NX0rSVtBQO4DMrVAK0ZPS0Dogk 4dDRjJ7bWx5vj0Crx+VV0GmMfN00rruEKg7ovAIbcO7i+KpKgD+MLZ5BsT3x4W3yY9AL Dvrg== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=NFwK6+oKiKjOmz9QhUAkENLmG6Obe5miicOLq4yrskQ=; b=URuRWTcYGXdrjxFbN1tAYrF6Ui33+dKjmfLh2qZ6GuUVozwChq5prK9iQ/n61UD+ae dsjEDhV2ne+K+fC6u9qD3nStgE1VbihJuWugo4iyTvzvONesM7nRhVPFRMLKpDBNqlFB 9mqAMR+u+iCkcRYYMnBKVt6cLE99IOeur/JbD1NoYmgzxtsn+Ier92RFwi1UWsLLTyUa mz8lNY1SRVP+Xx312Kdt9oHqg3D+0D1JgYp71IN3CVlW4/g46bLu5LAbuxn1jAD5oFLO KNI6GXIY7AW4rLgz9Fy1edDad+gO4v+tUGxTI+RQ37wXedu9NAybHpzKff3T+8UW8CSA Fmbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NiTWeoQ+; 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 q1-20020a654941000000b0040c7d4c3d90si11415016pgs.361.2022.06.26.09.14.46; Sun, 26 Jun 2022 09:15:32 -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=NiTWeoQ+; 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 S231514AbiFZPSt (ORCPT + 99 others); Sun, 26 Jun 2022 11:18:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229450AbiFZPSs (ORCPT ); Sun, 26 Jun 2022 11:18:48 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5316AFD1E; Sun, 26 Jun 2022 08:18:47 -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 CB4F56128E; Sun, 26 Jun 2022 15:18:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D0D7BC34114; Sun, 26 Jun 2022 15:18:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1656256726; bh=OfyIZ2aNwQeuhLBDMPwxc5nqF+GSkCgpyg8gVm/NQEM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NiTWeoQ+Pwq4w5SvvhHHG5XMx/B4B94NQm/vC1/y6dpDqeEuBhr3He3hxp08Sd38o c+8I2P6bHAHFTOBXxCWHjjcy//PgoMhgtFPqtnLD7JxAa4VMJZWOfgueW6tMLcHobs dapKuCJt11q/jMdeq9yLelu7Ee2hh6SxEvdJPTr7u28EZlX7187MOnS0WXWyKbhvlf evBOBMIioJwCipx6iC2EsXj6covjOkpw+eQ81nM66XOhnVZ/oAM0pE6bl96Qmv8FcM TZo21vgd8jJDaWd4GHkAkbOQaKqCHqy/pfquaXRjmEvIwKX/gt0uunJykCz3OTNuOV nND3rMNxnmVLg== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 97AFE4096F; Sun, 26 Jun 2022 12:18:43 -0300 (-03) Date: Sun, 26 Jun 2022 12:18:43 -0300 From: Arnaldo Carvalho de Melo To: Jiri Olsa Cc: Zixuan Tan , terrelln@fb.com, Zixuan Tan , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org Subject: Re: [PATCH] perf build: Suppress openssl v3 deprecation warnings in libcrypto feature test Message-ID: References: <20220625153439.513559-1-tanzixuan.me@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Url: http://acmel.wordpress.com X-Spam-Status: No, score=-7.5 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 Sun, Jun 26, 2022 at 04:45:39PM +0200, Jiri Olsa escreveu: > On Sat, Jun 25, 2022 at 11:34:38PM +0800, Zixuan Tan wrote: > > With OpenSSL v3 installed, the libcrypto feature check fails as it use the > > deprecated MD5_* API (and is compiled with -Werror). The error message is > > as follows. > > > > $ make tools/perf > > ``` > > Makefile.config:778: No libcrypto.h found, disables jitted code injection, > > please install openssl-devel or libssl-dev > > > > Auto-detecting system features: > > ... dwarf: [ on ] > > ... dwarf_getlocations: [ on ] > > ... glibc: [ on ] > > ... libbfd: [ on ] > > ... libbfd-buildid: [ on ] > > ... libcap: [ on ] > > ... libelf: [ on ] > > ... libnuma: [ on ] > > ... numa_num_possible_cpus: [ on ] > > ... libperl: [ on ] > > ... libpython: [ on ] > > ... libcrypto: [ OFF ] > > ... libunwind: [ on ] > > ... libdw-dwarf-unwind: [ on ] > > ... zlib: [ on ] > > ... lzma: [ on ] > > ... get_cpuid: [ on ] > > ... bpf: [ on ] > > ... libaio: [ on ] > > ... libzstd: [ on ] > > ... disassembler-four-args: [ on ] > > ``` > > > > This is very confusing because the suggested library (on my Ubuntu 20.04 > > it is libssl-dev) is already installed. As the test only checks for the > > presence of libcrypto, this commit suppresses the deprecation warning to > > allow the test to pass. > > > > Signed-off-by: Zixuan Tan > > --- > > tools/build/feature/test-libcrypto.c | 6 ++++++ > > 1 file changed, 6 insertions(+) > > > > diff --git a/tools/build/feature/test-libcrypto.c b/tools/build/feature/test-libcrypto.c > > index a98174e0569c..31afff093d0b 100644 > > --- a/tools/build/feature/test-libcrypto.c > > +++ b/tools/build/feature/test-libcrypto.c > > @@ -2,6 +2,12 @@ > > #include > > #include > > > > +/* > > + * The MD5_* API have been deprecated since OpenSSL 3.0, which causes the > > + * feature test to fail silently. This is a workaround. > > + */ > > then we use these deprecated MD5 calls in util/genelf.c if libcrypto is detected, > so I wonder how come the rest of the compilation passed for you.. do you have > CONFIG_JITDUMP disabled? So, here, on fedora 36: [acme@quaco perf-urgent]$ m make: Entering directory '/home/acme/git/perf-urgent/tools/perf' BUILD: Doing 'make -j8' parallel build HOSTCC /tmp/build/perf-urgent/fixdep.o HOSTLD /tmp/build/perf-urgent/fixdep-in.o LINK /tmp/build/perf-urgent/fixdep Warning: Kernel ABI header at 'tools/include/uapi/linux/kvm.h' differs from latest version at 'include/uapi/linux/kvm.h' diff -u tools/include/uapi/linux/kvm.h include/uapi/linux/kvm.h Warning: Kernel ABI header at 'tools/arch/x86/include/asm/disabled-features.h' differs from latest version at 'arch/x86/include/asm/disabled-features.h' diff -u tools/arch/x86/include/asm/disabled-features.h arch/x86/include/asm/disabled-features.h Warning: Kernel ABI header at 'tools/arch/arm64/include/uapi/asm/perf_regs.h' differs from latest version at 'arch/arm64/include/uapi/asm/perf_regs.h' diff -u tools/arch/arm64/include/uapi/asm/perf_regs.h arch/arm64/include/uapi/asm/perf_regs.h Warning: Kernel ABI header at 'tools/arch/x86/include/uapi/asm/svm.h' differs from latest version at 'arch/x86/include/uapi/asm/svm.h' diff -u tools/arch/x86/include/uapi/asm/svm.h arch/x86/include/uapi/asm/svm.h Warning: Kernel ABI header at 'tools/arch/arm64/include/uapi/asm/kvm.h' differs from latest version at 'arch/arm64/include/uapi/asm/kvm.h' diff -u tools/arch/arm64/include/uapi/asm/kvm.h arch/arm64/include/uapi/asm/kvm.h Warning: Kernel ABI header at 'tools/include/linux/coresight-pmu.h' differs from latest version at 'include/linux/coresight-pmu.h' diff -u tools/include/linux/coresight-pmu.h include/linux/coresight-pmu.h Makefile.config:778: No libcrypto.h found, disables jitted code injection, please install openssl-devel or libssl-dev Makefile.config:1108: No openjdk development package found, please install JDK package, e.g. openjdk-8-jdk, java-1.8.0-openjdk-devel Auto-detecting system features: ... dwarf: [ on ] ... dwarf_getlocations: [ on ] ... glibc: [ on ] ... libbfd: [ on ] ... libbfd-buildid: [ on ] ... libcap: [ on ] ... libelf: [ on ] ... libnuma: [ on ] ... numa_num_possible_cpus: [ on ] ... libperl: [ on ] ... libpython: [ on ] ... libcrypto: [ OFF ] <------------------------------------------------------- ... libunwind: [ on ] ... libdw-dwarf-unwind: [ on ] ... zlib: [ on ] ... lzma: [ on ] ... get_cpuid: [ on ] ... bpf: [ on ] ... libaio: [ on ] ... libzstd: [ on ] ... disassembler-four-args: [ on ] GEN /tmp/build/perf-urgent/common-cmds.h MKDIR /tmp/build/perf-urgent/fd/ CC /tmp/build/perf-urgent/exec-cmd.o CC /tmp/build/perf-urgent/fd/array.o But then: ⬢[acme@toolbox perf-urgent]$ perf -vv perf version 5.19.rc3.gfbec4d8dd3a7 dwarf: [ on ] # HAVE_DWARF_SUPPORT dwarf_getlocations: [ on ] # HAVE_DWARF_GETLOCATIONS_SUPPORT glibc: [ on ] # HAVE_GLIBC_SUPPORT syscall_table: [ on ] # HAVE_SYSCALL_TABLE_SUPPORT libbfd: [ on ] # HAVE_LIBBFD_SUPPORT debuginfod: [ on ] # HAVE_DEBUGINFOD_SUPPORT libelf: [ on ] # HAVE_LIBELF_SUPPORT libnuma: [ on ] # HAVE_LIBNUMA_SUPPORT numa_num_possible_cpus: [ on ] # HAVE_LIBNUMA_SUPPORT libperl: [ on ] # HAVE_LIBPERL_SUPPORT libpython: [ on ] # HAVE_LIBPYTHON_SUPPORT libslang: [ on ] # HAVE_SLANG_SUPPORT libcrypto: [ OFF ] # HAVE_LIBCRYPTO_SUPPORT libunwind: [ on ] # HAVE_LIBUNWIND_SUPPORT libdw-dwarf-unwind: [ on ] # HAVE_DWARF_SUPPORT zlib: [ on ] # HAVE_ZLIB_SUPPORT lzma: [ on ] # HAVE_LZMA_SUPPORT get_cpuid: [ on ] # HAVE_AUXTRACE_SUPPORT bpf: [ on ] # HAVE_LIBBPF_SUPPORT aio: [ on ] # HAVE_AIO_SUPPORT zstd: [ on ] # HAVE_ZSTD_SUPPORT libpfm4: [ OFF ] # HAVE_LIBPFM ⬢[acme@toolbox perf-urgent]$ But...: ⬢[acme@toolbox perf-urgent]$ ldd ~/bin/perf | grep ssl libssl.so.3 => /lib64/libssl.so.3 (0x00007f02dc87e000) ⬢[acme@toolbox perf-urgent]$ - Arnaldo