1 | // SPDX-License-Identifier: GPL-2.0 |
---|---|
2 | #include "vmlinux.h" |
3 | #include <bpf/bpf_helpers.h> |
4 | #include <bpf/bpf_tracing.h> |
5 | |
6 | char _license[] SEC("license") = "GPL"; |
7 | |
8 | unsigned long uprobe_trigger_body; |
9 | |
10 | __u64 test1_result = 0; |
11 | SEC("uprobe//proc/self/exe:uprobe_trigger_body+1") |
12 | int BPF_UPROBE(test1) |
13 | { |
14 | __u64 addr = bpf_get_func_ip(ctx); |
15 | |
16 | test1_result = (const void *) addr == (const void *) uprobe_trigger_body + 1; |
17 | return 0; |
18 | } |
19 |