Re: [PATCH bpf-next 4/9] bpf: Add log support for cgroup prog link_create

From: Leon Hwang

Date: Wed Nov 11 2026 - 10:43:48 EST


On 2026/11/9 22:47, bot+bpf-ci@xxxxxxxxxx wrote:
>> bpf: Add log support for cgroup prog link_create
>
> TL;DR: Nit only: the new <linux/bpf_verifier.h> include in bpf-cgroup.h may be
> unnecessary, since a forward declaration would likely suffice and avoid
> pulling it into tcp.h users.
>
>> diff --git a/include/linux/bpf-cgroup.h b/include/linux/bpf-cgroup.h
>> --- a/include/linux/bpf-cgroup.h
>> +++ b/include/linux/bpf-cgroup.h
>> @@ -4,6 +4,7 @@
>>
>> #include <linux/bpf.h>
>> #include <linux/bpf-cgroup-defs.h>
>> +#include <linux/bpf_verifier.h>
>> #include <linux/errno.h>
>> #include <linux/jump_label.h>
>> #include <linux/percpu.h>
>
> this isn't a bug, but is the <linux/bpf_verifier.h> include needed here?
>
> bpf.h already forward-declares struct bpf_verifier_log, which is all the
> new cgroup_bpf_link_attach() prototype and its stub need, and cgroup.c
> already includes bpf_verifier.h for bpf_log().
>
> Since bpf-cgroup.h is included from include/net/tcp.h, would a plain
> forward declaration (as done for trace_events.h earlier in this series)
> keep the verifier header out of those translation units?
>
Good catch.

Will drop this include.

Thanks,
Leon