1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright (c) 2021 Facebook */
4 #include <bpf/bpf_helpers.h>
5 #include <bpf/bpf_tracing.h>
7 char LICENSE[] SEC("license") = "GPL";
13 SEC("fentry/__x64_sys_nanosleep")
14 int BPF_PROG(nanosleep_fentry, const struct pt_regs *regs)
16 if (bpf_get_current_pid_tgid() >> 32 != pid)
23 SEC("fexit/__x64_sys_nanosleep")
24 int BPF_PROG(nanosleep_fexit, const struct pt_regs *regs, int ret)
26 if (bpf_get_current_pid_tgid() >> 32 != pid)