]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
bpf: enable bpf syscall on x64 and i386
authorAlexei Starovoitov <ast@plumgrid.com>
Fri, 26 Sep 2014 07:16:58 +0000 (00:16 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 26 Sep 2014 19:05:14 +0000 (15:05 -0400)
done as separate commit to ease conflict resolution

Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/x86/syscalls/syscall_32.tbl
arch/x86/syscalls/syscall_64.tbl
include/linux/syscalls.h
include/uapi/asm-generic/unistd.h
kernel/sys_ni.c

index 028b78168d85ac51d70c6b750d59fc23ae7cc028..9fe1b5d002f0ad5a30039ba672c85dbbf1c3ca38 100644 (file)
 354    i386    seccomp                 sys_seccomp
 355    i386    getrandom               sys_getrandom
 356    i386    memfd_create            sys_memfd_create
+357    i386    bpf                     sys_bpf
index 35dd922727b9a577a5de0108dd5f9d79cce4b9c1..281150b539a2fb8eb802816612e768cf25dc9990 100644 (file)
 318    common  getrandom               sys_getrandom
 319    common  memfd_create            sys_memfd_create
 320    common  kexec_file_load         sys_kexec_file_load
+321    common  bpf                     sys_bpf
 
 #
 # x32-specific system call numbers start at 512 to avoid cache impact
index 0f86d85a9ce44cc771bb7118eb7b4cbc28ae905d..bda9b81357ccf13ae68f2c951e9d38d86896cbad 100644 (file)
@@ -65,6 +65,7 @@ struct old_linux_dirent;
 struct perf_event_attr;
 struct file_handle;
 struct sigaltstack;
+union bpf_attr;
 
 #include <linux/types.h>
 #include <linux/aio_abi.h>
@@ -875,5 +876,5 @@ asmlinkage long sys_seccomp(unsigned int op, unsigned int flags,
                            const char __user *uargs);
 asmlinkage long sys_getrandom(char __user *buf, size_t count,
                              unsigned int flags);
-
+asmlinkage long sys_bpf(int cmd, union bpf_attr *attr, unsigned int size);
 #endif
index 11d11bc5c78f2d480ecac331cbf5d73f58001bb7..22749c13411775a77cabae4617f228228aadd47f 100644 (file)
@@ -705,9 +705,11 @@ __SYSCALL(__NR_seccomp, sys_seccomp)
 __SYSCALL(__NR_getrandom, sys_getrandom)
 #define __NR_memfd_create 279
 __SYSCALL(__NR_memfd_create, sys_memfd_create)
+#define __NR_bpf 280
+__SYSCALL(__NR_bpf, sys_bpf)
 
 #undef __NR_syscalls
-#define __NR_syscalls 280
+#define __NR_syscalls 281
 
 /*
  * All syscalls below here should go away really,
index 391d4ddb6f4bb7e83593841ada8096f9d20eae54..b4b5083f5f5eda735f664f4c37af7e1777d44012 100644 (file)
@@ -218,3 +218,6 @@ cond_syscall(sys_kcmp);
 
 /* operate on Secure Computing state */
 cond_syscall(sys_seccomp);
+
+/* access BPF programs and maps */
+cond_syscall(sys_bpf);