diff options
| author | Andrii Nakryiko <[email protected]> | 2020-02-29 23:11:10 +0000 |
|---|---|---|
| committer | Alexei Starovoitov <[email protected]> | 2020-03-03 00:25:14 +0000 |
| commit | fd56e0058412fb542db0e9556f425747cf3f8366 (patch) | |
| tree | fa11ac72a2bc294ab41dad229bb3142ef5996083 /tools/testing/selftests/bpf/prog_tests/stacktrace_map.c | |
| parent | bpftool: Add header guards to generated vmlinux.h (diff) | |
| download | kernel-fd56e0058412fb542db0e9556f425747cf3f8366.tar.gz kernel-fd56e0058412fb542db0e9556f425747cf3f8366.zip | |
libbpf: Fix use of PT_REGS_PARM macros with vmlinux.h
Add detection of vmlinux.h to bpf_tracing.h header for PT_REGS macro.
Currently, BPF applications have to define __KERNEL__ symbol to use correct
definition of struct pt_regs on x86 arch. This is due to different field names
under internal kernel vs UAPI conditions. To make this more transparent for
users, detect vmlinux.h by checking __VMLINUX_H__ symbol.
Signed-off-by: Andrii Nakryiko <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/stacktrace_map.c')
0 files changed, 0 insertions, 0 deletions
