linux-stable/tools
Andrii Nakryiko f3dcee938f libbpf: Wire up token_fd into feature probing logic
Adjust feature probing callbacks to take into account optional token_fd.
In unprivileged contexts, some feature detectors would fail to detect
kernel support just because BPF program, BPF map, or BTF object can't be
loaded due to privileged nature of those operations. So when BPF object
is loaded with BPF token, this token should be used for feature probing.

This patch is setting support for this scenario, but we don't yet pass
non-zero token FD. This will be added in the next patch.

We also switched BPF cookie detector from using kprobe program to
tracepoint one, as tracepoint is somewhat less dangerous BPF program
type and has higher likelihood of being allowed through BPF token in the
future. This change has no effect on detection behavior.

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/bpf/20240124022127.2379740-25-andrii@kernel.org
2024-01-24 16:21:02 -08:00
..
accounting
arch - Add synthetic X86_FEATURE flags for the different AMD Zen generations 2024-01-08 15:45:31 -08:00
bootconfig
bpf bpftool: Display cookie for kprobe multi link 2024-01-23 16:05:28 -08:00
build perf tools fixes for v6.6: 2nd batch 2023-10-30 13:46:27 -07:00
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 hv/hv_kvp_daemon: Some small fixes for handling NM keyfiles 2023-11-10 23:27:46 +00:00
iio iio: add modifiers for A and B ultraviolet light 2023-12-04 13:57:24 +00:00
include bpf: Add BPF token support to BPF_PROG_LOAD command 2024-01-24 16:21:01 -08:00
kvm/kvm_stat
laptop
leds
lib libbpf: Wire up token_fd into feature probing logic 2024-01-24 16:21:02 -08:00
memory-model
mm
net/ynl tools/net/ynl-gen-rst: Remove extra indentation from generated docs 2023-12-18 14:39:44 -08:00
objtool Address a GCC-14 warning: there's no real bug, but indeed the calloc order doesn't match 2024-01-08 18:31:27 -08:00
pci
pcmcia
perf lsm/stable-6.8 PR 20240105 2024-01-09 12:57:46 -08:00
power PM: tools: Fix sleepgraph syntax error 2023-11-20 17:59:58 +01:00
rcu
scripts
spi
testing selftests/bpf: Utilize string values for delegate_xxx mount options 2024-01-24 16:21:02 -08:00
thermal tools/thermal/tmon: Fix compilation warning for wrong format 2024-01-02 09:33:19 +01:00
time
tracing
usb
verification
virtio
wmi
workqueue
Makefile