diff options
Diffstat (limited to 'arch/um/kernel/skas/syscall.c')
-rw-r--r-- | arch/um/kernel/skas/syscall.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/um/kernel/skas/syscall.c b/arch/um/kernel/skas/syscall.c index 6cadce761bcf..48b0dcbd87be 100644 --- a/arch/um/kernel/skas/syscall.c +++ b/arch/um/kernel/skas/syscall.c @@ -5,6 +5,7 @@ #include <linux/kernel.h> #include <linux/ptrace.h> +#include <linux/seccomp.h> #include <kern_util.h> #include <sysdep/ptrace.h> #include <sysdep/ptrace_user.h> @@ -19,6 +20,10 @@ void handle_syscall(struct uml_pt_regs *r) UPT_SYSCALL_NR(r) = PT_SYSCALL_NR(r->gp); PT_REGS_SET_SYSCALL_RETURN(regs, -ENOSYS); + /* Do the secure computing check first; failures should be fast. */ + if (secure_computing() == -1) + return; + if (syscall_trace_enter(regs)) goto out; |