1// SPDX-License-Identifier: GPL-2.0 2// Copyright (c) 2017 Facebook 3 4#include "vmlinux.h" 5#include <bpf/bpf_helpers.h> 6#include <bpf/bpf_tracing.h> 7#include <bpf/bpf_core_read.h> 8#include "bpf_misc.h" 9 10int kprobe_res = 0; 11 12/** 13 * This program will be manually made sleepable on the userspace side 14 * and should thus be unattachable. 15 */ 16SEC("kprobe/" SYS_PREFIX "sys_nanosleep") 17int handle_kprobe_sleepable(struct pt_regs *ctx) 18{ 19 kprobe_res = 1; 20 return 0; 21} 22 23char _license[] SEC("license") = "GPL"; 24