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]
Date:   Mon, 6 Dec 2021 03:47:08 +0000
From:   Song Liu <songliubraving@...com>
To:     Arnaldo Carvalho de Melo <acme@...nel.org>
CC:     Jiri Olsa <jolsa@...nel.org>, Namhyung Kim <namhyung@...nel.org>,
        "Linux Kernel Mailing List" <linux-kernel@...r.kernel.org>,
        "linux-perf-users@...r.kernel.org" <linux-perf-users@...r.kernel.org>
Subject: Re: Building perf with BUILD_BPF_SKEL=1 by default



> On Dec 5, 2021, at 5:06 AM, Arnaldo Carvalho de Melo <acme@...nel.org> wrote:
> 
> Em Fri, Dec 03, 2021 at 07:32:34PM +0000, Song Liu escreveu:
>> 
>> 
>>> On Dec 3, 2021, at 5:10 AM, Arnaldo Carvalho de Melo <acme@...nel.org> wrote:
>>> 
>>> Hi Song,
>>> 
>>> 	So I'm changing all my containers to build with BUILD_BPF_SKEL=1
>>> to then make this the default, so far older containers fail either
>>> because the clang available is too old, so I've added a NO_BUILD_BPF_SKEL=1
>>> env var to disable that in those containers and then there is this other
>>> case where clang is recent enough but:
>>> 
>>>   util/bpf_skel/bperf_leader.bpf.c:13:20: error: use of undeclared identifier 'BPF_F_PRESERVE_ELEMS'
>>>           __uint(map_flags, BPF_F_PRESERVE_ELEMS);
>>> 
>>> Because the system's /usr/include/linux/bpf.h doesn't have that
>>> BPF_F_PRESERVE_ELEMS enum entry.
>>> 
>>> These are enums to make them available via BTF, but then I can't use
>>> the:
>>> 
>>> #ifdef BPF_F_PRESERVE_ELEMS
>>> #define BPF_F_PRESERVE_ELEMS (1U << 11)
>>> #endif
>>> 
>>> approach.
>>> 
>>> But then we _have_ it in the tools/include/uapi/linux/bpf.h we ship:
>>> 
>>> $ grep BPF_F_PRESERVE_ELEMS tools/include/uapi/linux/bpf.h
>>> 	BPF_F_PRESERVE_ELEMS	= (1U << 11),
>>> $
>>> 
>>> so we need to switch to using it somehow, this way we can build in more
>>> systems and make bperf and other BPF enabled features.
>>> 
>>> From a quick look I couldn't find where to add
>>> $(sourcedir)/tools/include/uapi/ to the include path used to build
>>> util/bpf_skel/bperf_leader.bpf.c, should be easy, can you take a look?
>>> 
>>> Thanks,
>>> 
>>> - Arnaldo
>> 
>> I think the following should fix it
> 
> I'm trying this now and tentatively sticking a Signed-off-by: you to it,
> ok?

Thanks for verifying this! I should learn to do these container tests myself. 
Yes, you can include 

Signed-off-by: Song Liu <song@...nel.org>

(or my fb email, either one works. )

Thanks,
Song

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ