mirror of
https://github.com/torvalds/linux.git
synced 2024-11-26 14:12:06 +00:00
878d8def06
Create three extensible alternatives to inconsistently named feature-probing APIs: - libbpf_probe_bpf_prog_type() instead of bpf_probe_prog_type(); - libbpf_probe_bpf_map_type() instead of bpf_probe_map_type(); - libbpf_probe_bpf_helper() instead of bpf_probe_helper(). Set up return values such that libbpf can report errors (e.g., if some combination of input arguments isn't possible to validate, etc), in addition to whether the feature is supported (return value 1) or not supported (return value 0). Also schedule deprecation of those three APIs. Also schedule deprecation of bpf_probe_large_insn_limit(). Also fix all the existing detection logic for various program and map types that never worked: - BPF_PROG_TYPE_LIRC_MODE2; - BPF_PROG_TYPE_TRACING; - BPF_PROG_TYPE_LSM; - BPF_PROG_TYPE_EXT; - BPF_PROG_TYPE_SYSCALL; - BPF_PROG_TYPE_STRUCT_OPS; - BPF_MAP_TYPE_STRUCT_OPS; - BPF_MAP_TYPE_BLOOM_FILTER. Above prog/map types needed special setups and detection logic to work. Subsequent patch adds selftests that will make sure that all the detection logic keeps working for all current and future program and map types, avoiding otherwise inevitable bit rot. [0] Closes: https://github.com/libbpf/libbpf/issues/312 Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Dave Marchevsky <davemarchevsky@fb.com> Cc: Julia Kartseva <hex@fb.com> Link: https://lore.kernel.org/bpf/20211217171202.3352835-2-andrii@kernel.org |
||
---|---|---|
.. | ||
.gitignore | ||
bpf_core_read.h | ||
bpf_endian.h | ||
bpf_gen_internal.h | ||
bpf_helpers.h | ||
bpf_prog_linfo.c | ||
bpf_tracing.h | ||
bpf.c | ||
bpf.h | ||
btf_dump.c | ||
btf.c | ||
btf.h | ||
Build | ||
gen_loader.c | ||
hashmap.c | ||
hashmap.h | ||
libbpf_common.h | ||
libbpf_errno.c | ||
libbpf_internal.h | ||
libbpf_legacy.h | ||
libbpf_probes.c | ||
libbpf_version.h | ||
libbpf.c | ||
libbpf.h | ||
libbpf.map | ||
libbpf.pc.template | ||
linker.c | ||
Makefile | ||
netlink.c | ||
nlattr.c | ||
nlattr.h | ||
relo_core.c | ||
relo_core.h | ||
ringbuf.c | ||
skel_internal.h | ||
str_error.c | ||
str_error.h | ||
strset.c | ||
strset.h | ||
xsk.c | ||
xsk.h |