diff options
author | KP Singh <kpsingh@google.com> | 2020-03-04 20:18:52 +0100 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2020-03-04 13:41:06 -0800 |
commit | da00d2f117a08fbca262db5ea422c80a568b112b (patch) | |
tree | 81519be4eb8e8c8b69ca88d834f79aae9f925db8 /kernel | |
parent | aca228cd3387447d99d3ebaee3ebcc2b015a3e46 (diff) |
bpf: Add test ops for BPF_PROG_TYPE_TRACING
The current fexit and fentry tests rely on a different program to
exercise the functions they attach to. Instead of doing this, implement
the test operations for tracing which will also be used for
BPF_MODIFY_RETURN in a subsequent patch.
Also, clean up the fexit test to use the generated skeleton.
Signed-off-by: KP Singh <kpsingh@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20200304191853.1529-7-kpsingh@chromium.org
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/trace/bpf_trace.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c index 07764c761073..363e0a2c75cf 100644 --- a/kernel/trace/bpf_trace.c +++ b/kernel/trace/bpf_trace.c @@ -1266,6 +1266,7 @@ const struct bpf_verifier_ops tracing_verifier_ops = { }; const struct bpf_prog_ops tracing_prog_ops = { + .test_run = bpf_prog_test_run_tracing, }; static bool raw_tp_writable_prog_is_valid_access(int off, int size, |