xref: /linux/tools/testing/selftests/bpf/progs/fentry_sleepable.c (revision 045809795751897ebbb82ab775edd8a3d040d66f)
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 void *user_ptr;
9 int retval;
10 
11 SEC("fentry.s")
12 int BPF_PROG(fentry_xdp)
13 {
14 	char buff[64];
15 
16 	retval = bpf_copy_from_user(buff, sizeof(buff), user_ptr);
17 	return 0;
18 }
19