1
0
Fork 0
alistair23-linux/tools
Hendrik Brueckner c682ccc496 bpf: fix broken BPF selftest build on s390
With 720f228e8d ("bpf: fix broken BPF selftest build") the
inclusion of arch-specific header files changed.  Including the
asm/bpf_perf_event.h on s390, correctly includes the s390 specific
header file.  This header file tries then to include the s390
asm/ptrace.h and the build fails with:

cc -Wall -O2 -I../../../include/uapi -I../../../lib -I../../../../include/generated  -I../../../include    test_verifier.c
+/root/git/linux/tools/testing/selftests/bpf/libbpf.a /root/git/linux/tools/testing/selftests/bpf/cgroup_helpers.c -lcap -lelf -o
+/root/git/linux/tools/testing/selftests/bpf/test_verifier
In file included from ../../../include/uapi/asm/bpf_perf_event.h:4:0,
                 from ../../../include/uapi/linux/bpf_perf_event.h:11,
                 from test_verifier.c:29:
../../../include/uapi/../../arch/s390/include/uapi/asm/bpf_perf_event.h:7:9: error: unknown type name 'user_pt_regs'
 typedef user_pt_regs bpf_user_pt_regs_t;
         ^~~~~~~~~~~~
make: *** [../lib.mk:109: /root/git/linux/tools/testing/selftests/bpf/test_verifier] Error 1

This is caused by a recent update to the s390 asm/ptrace.h file
that is not (yet) available in the local installation.  That means,
the s390 asm/ptrace.h must be included from the tools/arch/s390
directory.

Because there is no proper framework to deal with asm specific
includes in tools/, slightly modify the s390 asm/bpf_perf_event.h
to include the local ptrace.h header file.

See also discussion on
https://marc.info/?l=linux-s390&m=151359424420691&w=2

Please note that this needs to be preserved until tools/ is able to
correctly handle asm specific headers.

References: https://marc.info/?l=linux-s390&m=151359424420691&w=2
Fixes: 720f228e8d ("bpf: fix broken BPF selftest build")
Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
2017-12-19 01:19:30 +01:00
..
accounting License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
arch bpf: fix broken BPF selftest build on s390 2017-12-19 01:19:30 +01:00
bpf tools: bpftool: declare phony targets as such 2017-11-30 02:09:29 +01:00
build License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cgroup License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
firewire License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
gpio This is the bulk of GPIO changes for the v4.15 kernel cycle: 2017-11-14 17:23:44 -08:00
hv hv: kvp: Avoid reading past allocated blocks from KVP file 2017-11-28 16:56:26 +01:00
iio License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
include Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-12-15 13:08:37 -08:00
kvm/kvm_stat First batch of KVM changes for 4.15 2017-11-16 13:00:24 -08:00
laptop License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
leds License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
lib tools/lib/traceevent/parse-filter.c: clean up clang build warning 2017-11-17 16:10:02 -08:00
nfsd License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
objtool Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-12-15 12:14:33 -08:00
pci License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pcmcia License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
perf Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-12-15 12:14:33 -08:00
power Power management fixes for v4.15-rc2 2017-11-30 18:45:55 -05:00
scripts kbuild: /bin/pwd -> pwd 2017-11-18 11:32:27 +09:00
spi License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
testing bpf: add test case for ld_abs and helper changing pkt data 2017-12-15 09:19:36 -08:00
thermal/tmon Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux 2017-11-17 14:31:27 -08:00
time
usb usbip: prevent vhci_hcd driver from leaking a socket pointer address 2017-12-08 17:32:23 +01:00
virtio virtio: regression fixes 2017-12-15 12:56:23 -08:00
vm tools/slabinfo-gnuplot: force to use bash shell 2017-12-14 16:00:48 -08:00
wmi tools/wmi: add a sample for dell smbios communication over WMI 2017-11-03 16:34:00 -07:00
Makefile platform-drivers-x86 for v4.15-1 2017-11-18 10:26:57 -08:00