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: <20201125163834.GK2164284@krava>
Date:   Wed, 25 Nov 2020 17:38:34 +0100
From:   Jiri Olsa <jolsa@...hat.com>
To:     Song Liu <songliubraving@...com>
Cc:     open list <linux-kernel@...r.kernel.org>,
        Kernel Team <Kernel-team@...com>,
        Peter Ziljstra <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@...nel.org" <namhyung@...nel.org>
Subject: Re: [RFC 1/2] perf: support build BPF skeletons with perf

On Tue, Nov 24, 2020 at 11:47:05PM +0000, Song Liu wrote:
> 
> 
> > On Nov 22, 2020, at 3:27 PM, Jiri Olsa <jolsa@...hat.com> wrote:
> > 
> > On Wed, Nov 18, 2020 at 08:50:45PM -0800, Song Liu wrote:
> > 
> > SNIP
> > 
> >> # FEATURE_TESTS_BASIC + FEATURE_TESTS_EXTRA is the complete list
> >> # of all feature tests
> >> diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
> >> index ce8516e4de34f..1c2c0f4badd85 100644
> >> --- a/tools/perf/Makefile.config
> >> +++ b/tools/perf/Makefile.config
> >> @@ -619,6 +619,13 @@ ifndef NO_LIBBPF
> >>     msg := $(warning BPF API too old. Please install recent kernel headers. BPF support in 'perf record' is disabled.)
> >>     NO_LIBBPF := 1
> >>   endif
> >> +
> >> +  ifndef NO_BPF_SKEL
> >> +    ifeq ($(feature-clang-bpf-co-re), 1)
> >> +      BUILD_BPF_SKEL := 1
> >> +      $(call detected,CONFIG_PERF_BPF_SKEL)
> >> +    endif
> >> +  endif
> >> endif
> >> 
> >> dwarf-post-unwind := 1
> >> diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
> >> index 7ce3f2e8b9c74..9a9fc71e2ffa4 100644
> >> --- a/tools/perf/Makefile.perf
> >> +++ b/tools/perf/Makefile.perf
> >> @@ -126,6 +126,8 @@ include ../scripts/utilities.mak
> >> #
> >> # Define NO_LIBDEBUGINFOD if you do not want support debuginfod
> >> #
> >> +# Define NO_BPF_SKEL if you do not want build BPF skeletons
> > 
> > we will need to make this the other way round and disable it
> > by default before we figure out al lthe dependencies,
> > my build's failing on:
> > 
> > 	[jolsa@...va perf]$ make JOBS=1
> > 	  BUILD:   Doing 'make -j1' parallel build
> > 	  CC       /home/jolsa/kernel/linux-perf/tools/perf/util/bpf_skel/.tmp/prog.o
> > 	  CLANG    /home/jolsa/kernel/linux-perf/tools/perf/util/bpf_skel/.tmp/pid_iter.bpf.o
> > 	In file included from skeleton/pid_iter.bpf.c:4:
> > 	In file included from /home/jolsa/kernel/linux-perf/tools/lib/bpf/bpf_helpers.h:11:
> > 	/home/jolsa/kernel/linux-perf/tools/lib/bpf/bpf_helper_defs.h:3560:57: warning: declaration of 'struct bpf_redir_neigh' will not be visible outside of this function [-Wvisibility]
> > 	static long (*bpf_redirect_neigh)(__u32 ifindex, struct bpf_redir_neigh *params, int plen, __u64 flags) = (void *) 152;
> > 								^
> > 	skeleton/pid_iter.bpf.c:35:48: error: no member named 'id' in 'struct bpf_link'
> > 			return BPF_CORE_READ((struct bpf_link *)ent, id);
> > 			       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
> > 	/home/jolsa/kernel/linux-perf/tools/lib/bpf/bpf_core_read.h:339:18: note: expanded from macro 'BPF_CORE_READ'
> > 			___type((src), a, ##__VA_ARGS__) __r;                       \
> > 	...
> 
> I guess this was caused by older vmlinux.h. Could you please try build 
> vmlinux first? 

yes, that helped, but I think that's the one of the reasons
we need to make this to be built in conditionaly

thanks,
jirka

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ