* Building release 6.8.0 on Debian 11
@ 2022-06-10 11:28 Shahab Vahedi
2022-06-10 15:24 ` Quentin Monnet
0 siblings, 1 reply; 2+ messages in thread
From: Shahab Vahedi @ 2022-06-10 11:28 UTC (permalink / raw)
To: bpf
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Building release 6.8.0 on Debian 11
2022-06-10 11:28 Building release 6.8.0 on Debian 11 Shahab Vahedi
@ 2022-06-10 15:24 ` Quentin Monnet
0 siblings, 0 replies; 2+ messages in thread
From: Quentin Monnet @ 2022-06-10 15:24 UTC (permalink / raw)
To: Shahab Vahedi, bpf, Alexander Lobakin
2022-06-10 11:28 UTC+0000 ~ Shahab Vahedi <Shahab.Vahedi@synopsys.com>
> 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@pm.me/T/#u
Quentin
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-06-10 15:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-10 11:28 Building release 6.8.0 on Debian 11 Shahab Vahedi
2022-06-10 15:24 ` Quentin Monnet
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.