summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/trace_helpers.h
diff options
context:
space:
mode:
authorAndrii Nakryiko <andrii@kernel.org>2021-08-15 00:06:06 -0700
committerDaniel Borkmann <daniel@iogearbox.net>2021-08-17 00:45:08 +0200
commita549aaa67395eea89c2b9d2bea01ab0455b18408 (patch)
treecc1a06d1162d2ad29d9bc9f818abf5e0ba7e2b9c /tools/testing/selftests/bpf/trace_helpers.h
parentf36d3557a132ec0ccb8a3536d3ebd778049d48ca (diff)
selftests/bpf: Extract uprobe-related helpers into trace_helpers.{c,h}
Extract two helpers used for working with uprobes into trace_helpers.{c,h} to be re-used between multiple uprobe-using selftests. Also rename get_offset() into more appropriate get_uprobe_offset(). Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20210815070609.987780-14-andrii@kernel.org
Diffstat (limited to 'tools/testing/selftests/bpf/trace_helpers.h')
-rw-r--r--tools/testing/selftests/bpf/trace_helpers.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/trace_helpers.h b/tools/testing/selftests/bpf/trace_helpers.h
index f62fdef9e589..3d9435b3dd3b 100644
--- a/tools/testing/selftests/bpf/trace_helpers.h
+++ b/tools/testing/selftests/bpf/trace_helpers.h
@@ -18,4 +18,7 @@ int kallsyms_find(const char *sym, unsigned long long *addr);
void read_trace_pipe(void);
+ssize_t get_uprobe_offset(const void *addr, ssize_t base);
+ssize_t get_base_addr(void);
+
#endif