Re: Building release 6.8.0 on Debian 11

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2022-06-10 11:28 UTC+0000 ~ Shahab Vahedi <Shahab.Vahedi@xxxxxxxxxxxx>
> Hi,
> 
> This email is in the form of an inquiry and not a bug report.
> 
> When I tried to build bpftool 6.8.0 on my Debian 11 (bullseye) machine it
> failed with errors like:
> 
> -----------------------------------8<-----------------------------------
> $ make
>   .
>   .
>   .
>   CLANG    pid_iter.bpf.o
> skeleton/pid_iter.bpf.c:47:14: error: incomplete definition of type
>                                'struct bpf_perf_link'
>         perf_link = container_of(link, struct bpf_perf_link, link);
>   .
>   .
>   .
> skeleton/pid_iter.bpf.c:49:30: error: no member named 'bpf_cookie' in
>                                'struct perf_event'
>         return BPF_CORE_READ(event, bpf_cookie);
>   .
>   .
>   .
> 10 errors generated.
> make: *** [Makefile:176: pid_iter.bpf.o] Error 1
> 
> ----------------------------------->8-----------------------------------
> 
> This happens because in the generated vmlinux.h from my 5.10 kernel there is
> no relevant types regarding the bpf_cookies.
> 
> Release v6.7.0 builds fine because it doesn't have this commit [1]. That
> leaves me with the following questions:
> 
> - Should I stick to v6.7.0?
> - Maybe I could use a version of 6.8.0 that reverts the commit [1]?
> - Should the newly added bpf cookie section be guarded somehow?
> 
> [1] bpftool: Add bpf_cookie to link output
> https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git/commit/?id=cbdaf71f
> 
> 
> Cheers,
> Shahab

Hi Shahab,

I think we want to guard that section in the skeleton indeed. There was
a patch submitted for that purpose some time ago (motivated by the fact
this struct can also be missing on new kernels, if CONFIG_PERF_EVENTS is
not enabled in the kernel config) [0].

Alexander (+Cc): Hi, are you still working on this series?

[0] https://lore.kernel.org/bpf/20220421003152.339542-3-alobakin@xxxxx/T/#u

Quentin



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux