diff options
-rw-r--r-- | arch/x86/syscalls/syscall_32.tbl | 1 | ||||
-rw-r--r-- | arch/x86/syscalls/syscall_64.tbl | 1 | ||||
-rw-r--r-- | include/linux/syscalls.h | 3 | ||||
-rw-r--r-- | include/uapi/asm-generic/unistd.h | 4 | ||||
-rw-r--r-- | kernel/sys_ni.c | 3 |
5 files changed, 10 insertions, 2 deletions
diff --git a/arch/x86/syscalls/syscall_32.tbl b/arch/x86/syscalls/syscall_32.tbl index 028b78168d85..9fe1b5d002f0 100644 --- a/arch/x86/syscalls/syscall_32.tbl +++ b/arch/x86/syscalls/syscall_32.tbl | |||
@@ -363,3 +363,4 @@ | |||
363 | 354 i386 seccomp sys_seccomp | 363 | 354 i386 seccomp sys_seccomp |
364 | 355 i386 getrandom sys_getrandom | 364 | 355 i386 getrandom sys_getrandom |
365 | 356 i386 memfd_create sys_memfd_create | 365 | 356 i386 memfd_create sys_memfd_create |
366 | 357 i386 bpf sys_bpf | ||
diff --git a/arch/x86/syscalls/syscall_64.tbl b/arch/x86/syscalls/syscall_64.tbl index 35dd922727b9..281150b539a2 100644 --- a/arch/x86/syscalls/syscall_64.tbl +++ b/arch/x86/syscalls/syscall_64.tbl | |||
@@ -327,6 +327,7 @@ | |||
327 | 318 common getrandom sys_getrandom | 327 | 318 common getrandom sys_getrandom |
328 | 319 common memfd_create sys_memfd_create | 328 | 319 common memfd_create sys_memfd_create |
329 | 320 common kexec_file_load sys_kexec_file_load | 329 | 320 common kexec_file_load sys_kexec_file_load |
330 | 321 common bpf sys_bpf | ||
330 | 331 | ||
331 | # | 332 | # |
332 | # x32-specific system call numbers start at 512 to avoid cache impact | 333 | # x32-specific system call numbers start at 512 to avoid cache impact |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 0f86d85a9ce4..bda9b81357cc 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -65,6 +65,7 @@ struct old_linux_dirent; | |||
65 | struct perf_event_attr; | 65 | struct perf_event_attr; |
66 | struct file_handle; | 66 | struct file_handle; |
67 | struct sigaltstack; | 67 | struct sigaltstack; |
68 | union bpf_attr; | ||
68 | 69 | ||
69 | #include <linux/types.h> | 70 | #include <linux/types.h> |
70 | #include <linux/aio_abi.h> | 71 | #include <linux/aio_abi.h> |
@@ -875,5 +876,5 @@ asmlinkage long sys_seccomp(unsigned int op, unsigned int flags, | |||
875 | const char __user *uargs); | 876 | const char __user *uargs); |
876 | asmlinkage long sys_getrandom(char __user *buf, size_t count, | 877 | asmlinkage long sys_getrandom(char __user *buf, size_t count, |
877 | unsigned int flags); | 878 | unsigned int flags); |
878 | 879 | asmlinkage long sys_bpf(int cmd, union bpf_attr *attr, unsigned int size); | |
879 | #endif | 880 | #endif |
diff --git a/include/uapi/asm-generic/unistd.h b/include/uapi/asm-generic/unistd.h index 11d11bc5c78f..22749c134117 100644 --- a/include/uapi/asm-generic/unistd.h +++ b/include/uapi/asm-generic/unistd.h | |||
@@ -705,9 +705,11 @@ __SYSCALL(__NR_seccomp, sys_seccomp) | |||
705 | __SYSCALL(__NR_getrandom, sys_getrandom) | 705 | __SYSCALL(__NR_getrandom, sys_getrandom) |
706 | #define __NR_memfd_create 279 | 706 | #define __NR_memfd_create 279 |
707 | __SYSCALL(__NR_memfd_create, sys_memfd_create) | 707 | __SYSCALL(__NR_memfd_create, sys_memfd_create) |
708 | #define __NR_bpf 280 | ||
709 | __SYSCALL(__NR_bpf, sys_bpf) | ||
708 | 710 | ||
709 | #undef __NR_syscalls | 711 | #undef __NR_syscalls |
710 | #define __NR_syscalls 280 | 712 | #define __NR_syscalls 281 |
711 | 713 | ||
712 | /* | 714 | /* |
713 | * All syscalls below here should go away really, | 715 | * All syscalls below here should go away really, |
diff --git a/kernel/sys_ni.c b/kernel/sys_ni.c index 391d4ddb6f4b..b4b5083f5f5e 100644 --- a/kernel/sys_ni.c +++ b/kernel/sys_ni.c | |||
@@ -218,3 +218,6 @@ cond_syscall(sys_kcmp); | |||
218 | 218 | ||
219 | /* operate on Secure Computing state */ | 219 | /* operate on Secure Computing state */ |
220 | cond_syscall(sys_seccomp); | 220 | cond_syscall(sys_seccomp); |
221 | |||
222 | /* access BPF programs and maps */ | ||
223 | cond_syscall(sys_bpf); | ||