kernel_optimize_test/tools/arch
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
..
alpha/include License cleanup: add SPDX license identifier to uapi header files with no license 2017-11-02 11:19:54 +01:00
arc/include/uapi/asm License cleanup: add SPDX license identifier to uapi header files with no license 2017-11-02 11:19:54 +01:00
arm/include tools headers: Synchronize KVM arch ABI headers 2017-11-28 14:31:01 -03:00
arm64/include Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-12-08 13:32:44 -08:00
frv/include/uapi/asm License cleanup: add SPDX license identifier to uapi header files with no license 2017-11-02 11:19:54 +01:00
h8300/include License cleanup: add SPDX license identifier to uapi header files with no license 2017-11-02 11:19:54 +01:00
hexagon/include/uapi/asm License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00
ia64/include License cleanup: add SPDX license identifier to uapi header files with no license 2017-11-02 11:19:54 +01:00
m32r/include/uapi/asm License cleanup: add SPDX license identifier to uapi header files with no license 2017-11-02 11:19:54 +01:00
microblaze/include/uapi/asm License cleanup: add SPDX license identifier to uapi header files with no license 2017-11-02 11:19:54 +01:00
mips/include License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00
mn10300/include/uapi/asm License cleanup: add SPDX license identifier to uapi header files with no license 2017-11-02 11:19:54 +01:00
parisc/include/uapi/asm License cleanup: add SPDX license identifier to uapi header files with no license 2017-11-02 11:19:54 +01:00
powerpc/include License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00
s390/include bpf: fix broken BPF selftest build on s390 2017-12-19 01:19:30 +01:00
score/include/uapi/asm License cleanup: add SPDX license identifier to uapi header files with no license 2017-11-02 11:19:54 +01:00
sh/include License cleanup: add SPDX license identifier to uapi header files with no license 2017-11-02 11:19:54 +01:00
sparc/include License cleanup: add SPDX license identifier to uapi header files with no license 2017-11-02 11:19:54 +01:00
tile/include License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00
x86 tools/headers: Synchronize kernel <-> tooling headers 2017-12-15 13:49:28 +01:00
xtensa/include License cleanup: add SPDX license identifier to uapi header files with no license 2017-11-02 11:19:54 +01:00