linux-stable/tools
Andrii Nakryiko 9565fd5bff selftests/bpf: Prevent skeleton generation race
[ Upstream commit 1e2666e029 ]

Prevent "classic" and light skeleton generation rules from stomping on
each other's toes due to the use of the same <obj>.linked{1,2,3}.o
naming pattern. There is no coordination and synchronizataion between
.skel.h and .lskel.h rules, so they can easily overwrite each other's
intermediate object files, leading to errors like:

  /bin/sh: line 1: 170928 Bus error               (core dumped)
  /data/users/andriin/linux/tools/testing/selftests/bpf/tools/sbin/bpftool gen skeleton
  /data/users/andriin/linux/tools/testing/selftests/bpf/test_ksyms_weak.linked3.o
  name test_ksyms_weak
  > /data/users/andriin/linux/tools/testing/selftests/bpf/test_ksyms_weak.skel.h
  make: *** [Makefile:507: /data/users/andriin/linux/tools/testing/selftests/bpf/test_ksyms_weak.skel.h] Error 135
  make: *** Deleting file '/data/users/andriin/linux/tools/testing/selftests/bpf/test_ksyms_weak.skel.h'

Fix by using different suffix for light skeleton rule.

Fixes: c48e51c8b0 ("bpf: selftests: Add selftests for module kfunc support")
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20220509004148.1801791-2-andrii@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-09 10:25:48 +02:00
..
accounting
arch x86/tsx: Disable TSX development mode at boot 2022-04-20 09:36:26 +02:00
bootconfig
bpf bpftool: Fix print error when show bpf map 2022-04-08 13:58:22 +02:00
build perf build: Fix check for btf__load_from_kernel_by_id() in libbpf 2022-05-25 09:59:11 +02:00
cgroup
counter
debugging
edid
firewire
firmware
gpio
hv
iio
include bpf: Fix comment for helper bpf_current_task_under_cgroup() 2022-04-08 13:59:00 +02:00
io_uring
kvm/kvm_stat
laptop
leds
lib libbpf: Fix logic for finding matching program for CO-RE relocation 2022-06-09 10:25:44 +02:00
memory-model tools/memory-model/README: Update klitmus7 compat table 2022-06-06 08:47:53 +02:00
objtool objtool: Fix type of reloc::addend 2022-05-09 09:16:33 +02:00
pci
pcmcia
perf perf tools: Use Python devtools for version autodetection rather than runtime 2022-06-09 10:25:46 +02:00
power tools/power turbostat: fix ICX DRAM power numbers 2022-06-09 10:25:20 +02:00
rcu
scripts
spi
testing selftests/bpf: Prevent skeleton generation race 2022-06-09 10:25:48 +02:00
thermal/tmon
time
tracing rtla/osnoise: Fix osnoise hist stop tracing message 2022-04-08 13:57:53 +02:00
usb
virtio tools/virtio: compile with -pthread 2022-05-25 09:59:00 +02:00
vm
wmi
Makefile