2 * Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
3 * Licensed under the GPL
6 #include <linux/kernel.h>
7 #include <linux/ptrace.h>
9 #include <sysdep/ptrace.h>
10 #include <sysdep/syscalls.h>
13 void handle_syscall(struct uml_pt_regs *r)
15 struct pt_regs *regs = container_of(r, struct pt_regs, regs);
19 if (syscall_trace_enter(regs)) {
24 syscall = get_syscall(r);
26 if ((syscall > __NR_syscall_max) || syscall < 0)
29 result = EXECUTE_SYSCALL(syscall, regs);
32 PT_REGS_SET_SYSCALL_RETURN(regs, result);
34 syscall_trace_leave(regs);