lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YotP8BrIK/dwLJLL@krava>
Date:   Mon, 23 May 2022 11:12:16 +0200
From:   Jiri Olsa <olsajiri@...il.com>
To:     Ian Rogers <irogers@...gle.com>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Namhyung Kim <namhyung@...nel.org>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Andrii Nakryiko <andrii@...nel.org>,
        Martin KaFai Lau <kafai@...com>,
        Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
        John Fastabend <john.fastabend@...il.com>,
        KP Singh <kpsingh@...nel.org>,
        linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org,
        netdev@...r.kernel.org, bpf@...r.kernel.org
Subject: Re: [PATCH] perf build: Error for BPF skeletons without LIBBPF

On Fri, May 20, 2022 at 02:18:26PM -0700, Ian Rogers wrote:
> LIBBPF requires LIBELF so doing "make BUILD_BPF_SKEL=1 NO_LIBELF=1"
> fails with compiler errors about missing declarations. Similar could
> happen if libbpf feature detection fails. Prefer to error when
> BUILD_BPF_SKEL is enabled but LIBBPF isn't.
> 
> Signed-off-by: Ian Rogers <irogers@...gle.com>

Acked-by: Jiri Olsa <jolsa@...nel.org>

thanks,
jirka

> ---
>  tools/perf/Makefile.config | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
> index d9b699ad402c..bedb734bd6f2 100644
> --- a/tools/perf/Makefile.config
> +++ b/tools/perf/Makefile.config
> @@ -664,6 +664,9 @@ ifdef BUILD_BPF_SKEL
>    ifeq ($(feature-clang-bpf-co-re), 0)
>      dummy := $(error Error: clang too old/not installed. Please install recent clang to build with BUILD_BPF_SKEL)
>    endif
> +  ifeq ($(filter -DHAVE_LIBBPF_SUPPORT, $(CFLAGS)),)
> +    dummy := $(error Error: BPF skeleton support requires libbpf)
> +  endif
>    $(call detected,CONFIG_PERF_BPF_SKEL)
>    CFLAGS += -DHAVE_BPF_SKEL
>  endif
> -- 
> 2.36.1.124.g0e6072fb45-goog
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ