linux-stable/tools/lib/bpf
Toke Høiland-Jørgensen af0efa050c libbpf: Restore errno return for functions that were already returning it
The update to streamline libbpf error reporting intended to change all
functions to return the errno as a negative return value if
LIBBPF_STRICT_DIRECT_ERRS is set. However, if the flag is *not* set, the
return value changes for the two functions that were already returning a
negative errno unconditionally: bpf_link__unpin() and perf_buffer__poll().

This is a user-visible API change that breaks applications; so let's revert
these two functions back to unconditionally returning a negative errno
value.

Fixes: e9fc3ce99b ("libbpf: Streamline error reporting for high-level APIs")
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210706122355.236082-1-toke@redhat.com
2021-07-06 21:13:08 -07:00
..
.gitignore libbpf: Stop using feature-detection Makefiles 2021-02-04 01:22:00 +01:00
Build libbpf: Generate loader program out of BPF ELF file. 2021-05-19 00:39:40 +02:00
Makefile libbpf: Install skel_internal.h header used from light skeletons 2021-06-03 15:50:11 +02:00
bpf.c libbpf: Streamline error reporting for low-level APIs 2021-05-25 17:32:35 -07:00
bpf.h bpf: Extend libbpf with bpf_map_lookup_and_delete_elem_flags 2021-05-24 13:30:51 -07:00
bpf_core_read.h selftests/bpf: Fix BPF_CORE_READ_BITFIELD() macro 2021-04-26 18:37:13 -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: Cleanup temp FDs when intermediate sys_bpf fails. 2021-05-19 00:40:44 +02:00
bpf_helpers.h libbpf: Move BPF_SEQ_PRINTF and BPF_SNPRINTF to bpf_helpers.h 2021-05-26 10:45:41 -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: Fail compilation if target arch is missing 2021-06-16 20:15:30 -07:00
btf.c libbpf: Streamline error reporting for high-level APIs 2021-05-25 17:32:35 -07:00
btf.h libbpf: Add explicit padding to btf_dump_emit_type_decl_opts 2021-03-19 14:03:39 -07:00
btf_dump.c libbpf: Streamline error reporting for high-level APIs 2021-05-25 17:32:35 -07:00
gen_loader.c libbpf: Cleanup temp FDs when intermediate sys_bpf fails. 2021-05-19 00:40:44 +02:00
hashmap.c libbpf: Centralize poisoning and poison reallocarray() 2020-08-18 18:38:25 -07:00
hashmap.h libbpf, hashmap: Fix undefined behavior in hash_bits 2020-11-02 23:33:51 +01:00
libbpf.c libbpf: Restore errno return for functions that were already returning it 2021-07-06 21:13:08 -07:00
libbpf.h libbpf: Add libbpf_set_strict_mode() API to turn on libbpf 1.0 behaviors 2021-05-25 17:32:34 -07:00
libbpf.map libbpf: Move few APIs from 0.4 to 0.5 version 2021-06-03 15:50:05 +02:00
libbpf.pc.template libbpf: Add zlib as a dependency in pkg-config template 2019-12-16 14:55:29 -08:00
libbpf_common.h libbpf: Implement generalized .BTF.ext func/line info adjustment 2020-09-03 17:14:40 -07:00
libbpf_errno.c libbpf: Streamline error reporting for high-level APIs 2021-05-25 17:32:35 -07:00
libbpf_internal.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2021-06-17 11:54:56 -07:00
libbpf_legacy.h libbpf: Streamline error reporting for low-level APIs 2021-05-25 17:32:35 -07:00
libbpf_probes.c libbpf: Add support for task local storage 2020-11-06 08:08:37 -08:00
linker.c libbpf: Streamline error reporting for high-level APIs 2021-05-25 17:32:35 -07:00
netlink.c libbpf: Switch to void * casting in netlink helpers 2021-06-22 17:04:02 +02:00
nlattr.c libbpf: Switch to void * casting in netlink helpers 2021-06-22 17:04:02 +02:00
nlattr.h libbpf: Switch to void * casting in netlink helpers 2021-06-22 17:04:02 +02:00
ringbuf.c libbpf: Streamline error reporting for high-level APIs 2021-05-25 17:32:35 -07:00
skel_internal.h bpf: Add cmd alias BPF_PROG_RUN 2021-05-19 15:35:12 +02:00
str_error.c libbpf: Poison kernel-only integer types 2020-01-10 10:38:00 -08:00
str_error.h libbpf: relicense libbpf as LGPL-2.1 OR BSD-2-Clause 2018-10-08 10:09:48 +02:00
strset.c libbpf: Extract internal set-of-strings datastructure APIs 2021-03-18 16:14:22 -07:00
strset.h libbpf: Extract internal set-of-strings datastructure APIs 2021-03-18 16:14:22 -07:00
xsk.c libbpf: Fixes incorrect rx_ring_setup_done 2021-06-07 17:44:03 -07:00
xsk.h libbpf: xsk: Move barriers from libbpf_util.h to xsk.h 2021-03-10 13:45:16 -08:00