]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
libbpf: Allow use of feature cache for non-token cases
authorAlan Maguire <alan.maguire@oracle.com>
Wed, 8 Apr 2026 16:57:34 +0000 (17:57 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 10 Apr 2026 19:34:36 +0000 (12:34 -0700)
commit7419fcadd1dcd5efb5771a2725f9a80dc90d9e5a
treea165ced8f0344efc8174470ab8a285dcdaa81253
parentaacee214d57636fa1f63007c65f333b5ea75a7a0
libbpf: Allow use of feature cache for non-token cases

Allow bpf object feat_cache assignment in BPF selftests
to simulate missing features via inclusion of libbpf_internal.h
and use of bpf_object_set_feat_cache() and bpf_object__sanitize_btf() to
test BTF sanitization for cases where missing features are simulated.

Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
Link: https://lore.kernel.org/r/20260408165735.843763-2-alan.maguire@oracle.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/lib/bpf/libbpf.c
tools/lib/bpf/libbpf_internal.h