> bpf_object__probe_loading() tries to load trivial SOCKET_FILTER and
> TRACEPOINT programs to verify the BPF environment works. When a
> BPF token is in use with restricted program type permissions, these
> probe loads may fail because the token does not allow the specific
> program types, even though BPF loading is perfectly functional.
> Fix by skipping the probe when a token FD is present: BPF token
> creation itself proves the kernel has a working BPF subsystem.
> Real BPF issues will be caught during actual program and map loading.
> Signed-off-by: Yuan Chen <[email protected]>
This describes a bug fix but there is no Fixes: tag.
The probe-loading failure with a restricted BPF token came in when the
token-aware opts were added to bpf_object__probe_loading(), passing the
token FD into the trivial SOCKET_FILTER and TRACEPOINT probe loads:
LIBBPF_OPTS(bpf_prog_load_opts, opts,
.token_fd = obj->token_fd,
.prog_flags = obj->token_fd ? BPF_F_TOKEN_FD : 0,
);
which is the code this patch removes. Should this include:
Fixes: 6b434b61b4d9 ("libbpf: Wire up BPF token support at BPF object level")
In the earlier resend thread, Mykyta Yatsenko asked for a Fixes: tag to
be added:
https://lore.kernel.org/bpf/[email protected]/
> Please resend your patch applying these: ... add fixes tag ...
That request does not appear to be reflected in this version, which still
carries no Fixes: tag.
The same thread also asked to include any Acked-bys. Mykyta Yatsenko gave
an Acked-by on v2:
https://lore.kernel.org/bpf/[email protected]/
> This change makes sense ...
> Acked-by: Mykyta Yatsenko <[email protected]>
Should this be carried forward as:
Acked-by: Mykyta Yatsenko <[email protected]>
---
AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md
CI run summary: https://github.com/kernel-patches/bpf/actions/runs/27285576775