linux/tools/lib
Andrii Nakryiko f973fccd43 libbpf: handle nulled-out program in struct_ops correctly
If struct_ops has one of program callbacks set declaratively and host
kernel is old and doesn't support this callback, libbpf will allow to
load such struct_ops as long as that callback was explicitly nulled-out
(presumably through skeleton). This is all working correctly, except we
won't reset corresponding program slot to NULL before bailing out, which
will lead to libbpf not detecting that BPF program has to be not
auto-loaded. Fix this by unconditionally resetting corresponding program
slot to NULL.

Fixes: c911fc61a7 ("libbpf: Skip zeroed or null fields if not found in the kernel type.")
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20240428030954.3918764-1-andrii@kernel.org
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
2024-04-29 16:46:06 -07:00
..
api tools api fs: Avoid reading whole file for a 1 byte bool 2023-11-30 19:25:19 -03:00
bpf libbpf: handle nulled-out program in struct_ops correctly 2024-04-29 16:46:06 -07:00
perf libperf evlist: Avoid out-of-bounds access 2024-02-29 13:57:02 -08:00
subcmd tools subcmd: Add a no exec function call option 2024-02-22 09:12:25 -08:00
symbol
thermal
argv_split.c
bitmap.c
ctype.c
find_bit.c
hweight.c
list_sort.c
rbtree.c
slab.c
str_error_r.c
string.c
vsprintf.c
zalloc.c