diff options
author | Richard Weinberger <richard@nod.at> | 2015-10-25 21:54:33 +0300 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2015-11-07 00:49:09 +0300 |
commit | 1d80f0cda10118d7505bd0a09a5c1c72f3a5f6c8 (patch) | |
tree | af1013ab500f852040bfe4ac4f579584e54650ac /arch/um/os-Linux | |
parent | 44011b897adf4be7a5bd7f2baf2ffec9cd87ec74 (diff) | |
download | linux-1d80f0cda10118d7505bd0a09a5c1c72f3a5f6c8.tar.xz |
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')
-rw-r--r-- | arch/um/os-Linux/skas/process.c | 10 |
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) |