linux/tools
Emil Tsalapatis 7cefbb47cc libbpf: Do not use PROG_TYPE_TRACEPOINT program for feature gating
Commit 728ff16791 uses a PROG_TYPE_TRACEPOINT BPF test program to
check whether the running kernel supports large LDIMM64 offsets. The
feature gate incorrectly assumes that the program will fail at
verification time with one of two messages, depending on whether the
feature is supported by the running kernel. However,
PROG_TYPE_TRACEPOINT programs may fail to load before verification even
starts, e.g., if the shell does not have the appropriate capabilities.
Use a BPF_PROG_TYPE_SOCKET_FILTER program for the feature gate instead.

Also fix two minor issues. First, ensure the log buffer for the test is
initialized: Failing program load before verification led to libbpf dumping
uninitialized data to stdout. Also, ensure that close() is only called
for program_fd in the probe if the program load actually succeeded. The
call was currently failing silently with -EBADF most of the time.

Fixes: 728ff16791 ("libbpf: Add gating for arena globals relocation feature")
Reported-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Emil Tsalapatis <emil@etsalapatis.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20260217204345.548648-2-emil@etsalapatis.com
2026-02-17 14:17:06 -08:00
..
accounting delayacct: add timestamp of delay max 2026-01-31 16:16:06 -08:00
arch Loongarch: 2026-02-13 11:31:15 -08:00
bootconfig
bpf resolve_btfids: Refactor the sort_btf_by_name function 2026-02-04 10:17:19 -08:00
build tools build: Fix the common set of features test wrt libopenssl 2025-12-27 20:26:44 -08:00
certs
cgroup
counter
crypto
debugging kernel-chktaint: add reporting for tainted modules 2026-01-26 19:07:15 -08:00
dma dma-mapping updates for Linux 6.19: 2025-12-06 09:25:05 -08:00
docs tools: sphinx-build-wrapper: improve its help message 2026-02-02 09:57:46 -07:00
firewire
firmware
gpio
hv
iio
include Updates for the VDSO subsystem: 2026-02-10 17:02:23 -08:00
kvm/kvm_stat
laptop
leds
lib libbpf: Do not use PROG_TYPE_TRACEPOINT program for feature gating 2026-02-17 14:17:06 -08:00
memory-model
mm tools/mm/slabinfo: fix --partial long option mapping 2026-01-20 19:24:43 -08:00
net NFSD 7.0 Release Notes 2026-02-12 08:23:53 -08:00
objtool - A nice cleanup to the paravirt code containing a unification of the paravirt 2026-02-10 19:01:45 -08:00
pcmcia
perf Loongarch: 2026-02-13 11:31:15 -08:00
power cpupower: make systemd unit installation optional 2026-01-16 13:41:26 -07:00
rcu
sched
sched_ext sched_ext: Changes for v6.20 2026-02-11 13:35:24 -08:00
scripts tools headers: Sync syscall table with kernel sources 2025-12-24 11:43:36 -08:00
sound
spi spi: tools: Add include folder to .gitignore 2026-02-09 12:27:31 +00:00
testing selftests/bpf: enable fsession_test on riscv64 2026-02-13 14:14:27 -08:00
thermal tools/thermal/thermal-engine: Fix format string bug in thermal-engine 2025-11-25 11:00:28 +01:00
time
tracing rtla: Fix parse_cpu_set() bug introduced by strtoi() 2026-01-13 08:32:52 +01:00
usb
verification verification/rvgen: Remove unused variable declaration from containers 2026-01-12 07:43:51 +01:00
virtio tools/virtio: add device, device_driver stubs 2025-12-24 08:02:56 -05:00
wmi
workqueue
writeback
Makefile