diff options
author | Yonghong Song <yhs@fb.com> | 2018-04-28 22:28:15 -0700 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2018-04-29 08:45:54 -0700 |
commit | 173965fbfba596c02fa128966c2a33cb88afcd7f (patch) | |
tree | 1fc1303c919ac14b3b00564823c056b19e9fcfa4 /tools/testing/selftests/bpf/test_stacktrace_build_id.c | |
parent | 2abe611c5f031f06ab783102e62c0ae9dfd93e80 (diff) |
tools/bpf: add a test for bpf_get_stack with raw tracepoint prog
The test attached a raw_tracepoint program to raw_syscalls/sys_enter.
It tested to get stack for user space, kernel space and user
space with build_id request. It also tested to get user
and kernel stack into the same buffer with back-to-back
bpf_get_stack helper calls.
If jit is not enabled, the user space application will check
to ensure that the kernel function for raw_tracepoint
___bpf_prog_run is part of the stack.
If jit is enabled, we did not have a reliable way to
verify the kernel stack, so just assume the kernel stack
is good when the kernel stack size is greater than 0.
Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/test_stacktrace_build_id.c')
0 files changed, 0 insertions, 0 deletions