summaryrefslogtreecommitdiffstats
path: root/arch/um/os-Linux/skas/process.c
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2015-10-25 19:54:33 +0100
committerRichard Weinberger <richard@nod.at>2015-11-06 22:49:09 +0100
commit1d80f0cda10118d7505bd0a09a5c1c72f3a5f6c8 (patch)
treeaf1013ab500f852040bfe4ac4f579584e54650ac /arch/um/os-Linux/skas/process.c
parentum: Define PTRACE_OLDSETOPTIONS (diff)
downloadlinux-1d80f0cda10118d7505bd0a09a5c1c72f3a5f6c8.tar.xz
linux-1d80f0cda10118d7505bd0a09a5c1c72f3a5f6c8.zip
um: Store syscall number after syscall_trace_enter()
To support changing syscall numbers we have to store it after syscall_trace_enter(). Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um/os-Linux/skas/process.c')
-rw-r--r--arch/um/os-Linux/skas/process.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/arch/um/os-Linux/skas/process.c b/arch/um/os-Linux/skas/process.c
index 3dddedba3a07..d38f4952d748 100644
--- a/arch/um/os-Linux/skas/process.c
+++ b/arch/um/os-Linux/skas/process.c
@@ -137,9 +137,6 @@ static void handle_trap(int pid, struct uml_pt_regs *regs,
if ((UPT_IP(regs) >= STUB_START) && (UPT_IP(regs) < STUB_END))
fatal_sigsegv();
- /* Mark this as a syscall */
- UPT_SYSCALL_NR(regs) = PT_SYSCALL_NR(regs->gp);
-
if (!local_using_sysemu)
{
err = ptrace(PTRACE_POKEUSER, pid, PT_SYSCALL_NR_OFFSET,
@@ -174,6 +171,13 @@ static void handle_trap(int pid, struct uml_pt_regs *regs,
handle_syscall(regs);
}
+int get_syscall(struct uml_pt_regs *regs)
+{
+ UPT_SYSCALL_NR(regs) = PT_SYSCALL_NR(regs->gp);
+
+ return UPT_SYSCALL_NR(regs);
+}
+
extern char __syscall_stub_start[];
static int userspace_tramp(void *stack)