]>
git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blob - tools/build/feature/test-bpf.c
1 #include <asm/unistd.h>
8 # elif defined(__x86_64__)
10 # elif defined(__aarch64__)
12 # elif defined(__sparc__)
15 # error __NR_bpf not defined. libbpf does not support your arch.
23 /* Check fields in attr */
24 attr
.prog_type
= BPF_PROG_TYPE_KPROBE
;
31 attr
.kern_version
= 0;
35 * Test existence of __NR_bpf and BPF_PROG_LOAD.
36 * This call should fail if we run the testcase.
38 return syscall(__NR_bpf
, BPF_PROG_LOAD
, &attr
, sizeof(attr
));