1 // SPDX-License-Identifier: GPL-2.0
2 #include <asm/unistd.h>
9 # elif defined(__x86_64__)
11 # elif defined(__aarch64__)
13 # elif defined(__sparc__)
15 # elif defined(__s390__)
18 # error __NR_bpf not defined. libbpf does not support your arch.
26 /* Check fields in attr */
27 attr
.prog_type
= BPF_PROG_TYPE_KPROBE
;
34 attr
.kern_version
= 0;
38 * Test existence of __NR_bpf and BPF_PROG_LOAD.
39 * This call should fail if we run the testcase.
41 return syscall(__NR_bpf
, BPF_PROG_LOAD
, &attr
, sizeof(attr
));