linux/tools
Mykyta Yatsenko 7b30c296af libbpbpf: Check bpf_map/bpf_program fd validity
libbpf creates bpf_program/bpf_map structs for each program/map that
user defines, but it allows to disable creating/loading those objects in
kernel, in that case they won't have associated file descriptor
(fd < 0). Such functionality is used for backward compatibility
with some older kernels.

Nothing prevents users from passing these maps or programs with no
kernel counterpart to libbpf APIs. This change introduces explicit
checks for kernel objects existence, aiming to improve visibility of
those edge cases and provide meaningful warnings to users.

Signed-off-by: Mykyta Yatsenko <yatsenko@meta.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20240318131808.95959-1-yatsenko@meta.com
2024-03-18 13:45:11 -07:00
..
accounting
arch Core x86 changes for v6.9: 2024-03-11 19:53:15 -07:00
bootconfig
bpf bpftool: Fix missing pids during link show 2024-03-14 13:37:43 -07:00
build
certs
cgroup samples: introduce new samples subdir for cgroup 2023-12-10 16:51:54 -08:00
counter tools/counter: Remove unneeded semicolon 2023-12-20 11:43:31 -05:00
crypto crypto: tcrypt - add script tcrypt_speed_compare.py 2023-12-29 11:25:55 +08:00
debugging
edid
firewire
firmware
gpio
hv
iio iio: add modifiers for A and B ultraviolet light 2023-12-04 13:57:24 +00:00
include for-netdev 2024-03-11 18:06:04 -07:00
kvm/kvm_stat
laptop
leds
lib libbpbpf: Check bpf_map/bpf_program fd validity 2024-03-18 13:45:11 -07:00
memory-model
mm
net/ynl netlink: specs: support generating code for genl socket priv 2024-03-11 15:15:42 -07:00
objtool hardening updates for v6.9-rc1 2024-03-12 14:49:30 -07:00
pci
pcmcia
perf perf evlist: Fix evlist__new_default() for > 1 core PMU 2024-01-30 11:40:28 -03:00
power tools cpupower bench: Override CFLAGS assignments 2024-01-21 16:57:51 -07:00
rcu
scripts
spi
testing selftests/bpf: Remove second semicolon 2024-03-15 14:53:56 +01:00
thermal tools/thermal/tmon: Fix compilation warning for wrong format 2024-01-02 09:33:19 +01:00
time
tracing tools/rtla: Exit with EXIT_SUCCESS when help is invoked 2024-02-12 10:59:09 +01:00
usb
verification tools/rv: Fix curr_reactor uninitialized variable 2024-02-12 09:58:36 +01:00
virtio tools: virtio: introduce vhost_net_test 2024-03-05 11:38:14 +01:00
wmi
workqueue workqueue: Implement BH workqueues to eventually replace tasklets 2024-02-04 11:28:06 -10:00
Makefile