linux/tools/lib/bpf
Andrii Nakryiko e18e2e70db libbpf: handle yet another corner case of nulling out struct_ops program
There is yet another corner case where user can set STRUCT_OPS program
reference in STRUCT_OPS map to NULL, but libbpf will fail to disable
autoload for such BPF program. This time it's the case of "new" kernel
which has type information about callback field, but user explicitly
nulled-out program reference from user-space after opening BPF object.

Fix, hopefully, the last remaining unhandled case.

Fixes: 0737df6de9 ("libbpf: better fix for handling nulled-out struct_ops program")
Fixes: f973fccd43 ("libbpf: handle nulled-out program in struct_ops correctly")
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20240507001335.1445325-3-andrii@kernel.org
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
2024-05-07 16:21:59 -07:00
..
.gitignore libbpf: Make libbpf_version.h non-auto-generated 2021-09-13 15:36:47 -07:00
bpf_core_read.h libbpf: Use local bpf_helpers.h include 2024-04-02 09:28:34 -07:00
bpf_endian.h libbpf: Make bpf_endian co-exist with vmlinux.h 2020-07-01 09:06:12 +02:00
bpf_gen_internal.h libbpf: Support kfunc detection in light skeleton. 2023-03-22 09:31:05 -07:00
bpf_helpers.h libbpf: Fix bpf_ksym_exists() in GCC 2024-05-02 22:47:22 -07:00
bpf_prog_linfo.c libbpf: Streamline error reporting for high-level APIs 2021-05-25 17:32:35 -07:00
bpf_tracing.h libbpf: Avoid casts from pointers to enums in bpf_tracing.h 2024-05-02 22:58:58 -07:00
bpf.c libbpf: Add support for kprobe session attach 2024-04-30 09:45:53 -07:00
bpf.h libbpf: add support for BPF cookie for raw_tp/tp_btf programs 2024-03-19 23:05:34 -07:00
btf_dump.c libbpf: Fix dump of subsequent char arrays 2024-04-17 15:24:02 +02:00
btf.c libbpf: Correct debug message in btf__load_vmlinux_btf 2024-03-04 14:33:51 +01:00
btf.h libbpf: Don't require full struct enum64 in UAPI headers 2022-09-27 20:45:17 +02:00
Build libbpf: Move feature detection code into its own file 2024-01-24 16:21:02 -08:00
elf.c libbpf: Move feature detection code into its own file 2024-01-24 16:21:02 -08:00
features.c libbpf: Rewrite btf datasec names starting from '?' 2024-03-06 15:18:16 -08:00
gen_loader.c libbpf: Store zero fd to fd_array for loader kfunc relocation 2023-05-16 22:09:23 -07:00
hashmap.c libbpf: Hashmap interface update to allow both long and void* keys/values 2022-11-09 20:45:14 -08:00
hashmap.h libbpf: Remove HASHMAP_INIT static initialization helper 2023-07-11 09:40:05 -07:00
libbpf_common.h libbpf: Fix potential uninitialized tail padding with LIBBPF_OPTS_RESET 2023-11-09 19:07:51 -08:00
libbpf_errno.c libbpf: Optimized return value in libbpf_strerror when errno is libbpf errno 2022-12-14 18:39:33 +01:00
libbpf_internal.h libbpf: Mark libbpf_kallsyms_parse static function 2024-03-28 18:31:41 -07:00
libbpf_legacy.h libbpf: Clean up deprecated and legacy aliases 2022-08-17 22:42:56 +02:00
libbpf_probes.c bpf: improve error message for unsupported helper 2024-03-28 18:30:53 -07:00
libbpf_version.h libbpf: Start v1.5 development cycle 2024-04-06 09:11:10 -07:00
libbpf.c libbpf: handle yet another corner case of nulling out struct_ops program 2024-05-07 16:21:59 -07:00
libbpf.h libbpf: Add support for kprobe session attach 2024-04-30 09:45:53 -07:00
libbpf.map libbpf: Add bpf_link support for BPF_PROG_TYPE_SOCKMAP 2024-04-10 19:52:25 -07:00
libbpf.pc.template libbpf: Add zlib as a dependency in pkg-config template 2019-12-16 14:55:29 -08:00
linker.c libbpf: Add missed btf_ext__raw_data() API 2024-02-01 22:16:12 +01:00
Makefile kbuild: unexport abs_srctree and abs_objtree 2024-03-10 17:27:17 +09:00
netlink.c libbpf: Use OPTS_SET() macro in bpf_xdp_query() 2024-02-06 09:51:26 -08:00
nlattr.c libbpf: Fix alen calculation in libbpf_nla_dump_errormsg() 2023-02-10 15:27:22 -08:00
nlattr.h libbpf: add API to get XDP/XSK supported features 2023-02-02 20:48:24 -08:00
relo_core.c libbpf: fix signedness determination in CO-RE relo handling logic 2023-08-23 21:13:48 -07:00
relo_core.h bpf, libbpf: Add type match support 2022-07-05 21:14:25 -07:00
ringbuf.c libbpf: fix ring_buffer__consume_n() return result logic 2024-05-02 16:41:03 -07:00
skel_internal.h libbpf: add map_get_fd_by_id and map_delete_elem in light skeleton 2022-08-25 18:52:29 -07:00
str_error.c libbpf: Poison kernel-only integer types 2020-01-10 10:38:00 -08:00
str_error.h libbpf: Move feature detection code into its own file 2024-01-24 16:21:02 -08:00
strset.c libbpf: Hashmap interface update to allow both long and void* keys/values 2022-11-09 20:45:14 -08:00
strset.h libbpf: Extract internal set-of-strings datastructure APIs 2021-03-18 16:14:22 -07:00
usdt.bpf.h libbpf: Avoid casts from pointers to enums in bpf_tracing.h 2024-05-02 22:58:58 -07:00
usdt.c libbpf: Add uprobe multi link support to bpf_program__attach_usdt 2023-08-21 15:51:26 -07:00
zip.c libbpf: Ignore warnings about "inefficient alignment" 2023-03-16 18:20:08 +01:00
zip.h libbpf: Implement basic zip archive parsing support 2023-03-01 16:05:34 -08:00