diff options
Diffstat (limited to 'arch/um/kernel/skas/syscall.c')
| -rw-r--r-- | arch/um/kernel/skas/syscall.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/arch/um/kernel/skas/syscall.c b/arch/um/kernel/skas/syscall.c index 50b476f2b38..c0681e09743 100644 --- a/arch/um/kernel/skas/syscall.c +++ b/arch/um/kernel/skas/syscall.c @@ -3,11 +3,14 @@ * Licensed under the GPL */ -#include "linux/kernel.h" -#include "linux/ptrace.h" -#include "kern_util.h" -#include "sysdep/ptrace.h" -#include "sysdep/syscalls.h" +#include <linux/kernel.h> +#include <linux/ptrace.h> +#include <kern_util.h> +#include <sysdep/ptrace.h> +#include <sysdep/syscalls.h> + +extern int syscall_table_size; +#define NR_SYSCALLS (syscall_table_size / sizeof(void *)) void handle_syscall(struct uml_pt_regs *r) { @@ -15,10 +18,7 @@ void handle_syscall(struct uml_pt_regs *r) long result; int syscall; - syscall_trace(r, 0); - - current->thread.nsyscalls++; - nsyscalls++; + syscall_trace_enter(regs); /* * This should go in the declaration of syscall, but when I do that, @@ -30,11 +30,11 @@ void handle_syscall(struct uml_pt_regs *r) * in case it's a compiler bug. */ syscall = UPT_SYSCALL_NR(r); - if ((syscall >= NR_syscalls) || (syscall < 0)) + if ((syscall >= NR_SYSCALLS) || (syscall < 0)) result = -ENOSYS; else result = EXECUTE_SYSCALL(syscall, regs); - REGS_SET_SYSCALL_RETURN(r->gp, result); + PT_REGS_SET_SYSCALL_RETURN(regs, result); - syscall_trace(r, 1); + syscall_trace_leave(regs); } |
