diff options
Diffstat (limited to 'arch/um/kernel/skas/syscall.c')
-rw-r--r-- | arch/um/kernel/skas/syscall.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/arch/um/kernel/skas/syscall.c b/arch/um/kernel/skas/syscall.c index 48b0dcbd8..b783ac87d 100644 --- a/arch/um/kernel/skas/syscall.c +++ b/arch/um/kernel/skas/syscall.c @@ -20,19 +20,14 @@ 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; - /* Update the syscall number after orig_ax has potentially been updated - * with ptrace. - */ - UPT_SYSCALL_NR(r) = PT_SYSCALL_NR(r->gp); - syscall = UPT_SYSCALL_NR(r); + /* Do the seccomp check after ptrace; failures should be fast. */ + if (secure_computing(NULL) == -1) + goto out; + syscall = UPT_SYSCALL_NR(r); if (syscall >= 0 && syscall <= __NR_syscall_max) PT_REGS_SET_SYSCALL_RETURN(regs, EXECUTE_SYSCALL(syscall, regs)); |