1 // SPDX-License-Identifier: GPL-2.0
2 // Copyright (c) 2017 Facebook
4 #include <linux/ptrace.h>
6 #include <bpf/bpf_helpers.h>
7 #include <bpf/bpf_tracing.h>
10 int kretprobe_res
= 0;
12 int uretprobe_res
= 0;
14 SEC("kprobe/sys_nanosleep")
15 int handle_kprobe(struct pt_regs
*ctx
)
21 SEC("kretprobe/sys_nanosleep")
22 int BPF_KRETPROBE(handle_kretprobe
)
28 SEC("uprobe/trigger_func")
29 int handle_uprobe(struct pt_regs
*ctx
)
35 SEC("uretprobe/trigger_func")
36 int handle_uretprobe(struct pt_regs
*ctx
)
42 char _license
[] SEC("license") = "GPL";