]> Git Repo - linux.git/blob - tools/testing/selftests/bpf/progs/get_func_ip_uprobe_test.c
Linux 6.14-rc3
[linux.git] / tools / testing / selftests / bpf / progs / get_func_ip_uprobe_test.c
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 }
This page took 0.032045 seconds and 4 git commands to generate.