diff options
author | Kees Cook <keescook@google.com> | 2016-03-08 09:56:09 -0800 |
---|---|---|
committer | Kees Cook <keescook@google.com> | 2016-03-08 09:56:09 -0800 |
commit | 2ad1a30bbdffd6f53c33bb8562a8eef7f4732310 (patch) | |
tree | 19a0625964fd70e51ac8ee4c1041a65b6c24d3be /arch/mips/kernel/scall64-n32.S | |
parent | d12b59f861a0eb9b4313ea5a8993989cf6e80f2a (diff) | |
parent | babe638e91d0f2804b3d7357e4aa575f8fa2248b (diff) | |
download | v4.1-2ad1a30bbdffd6f53c33bb8562a8eef7f4732310.tar.gz |
Merge branch 'master' into update
Diffstat (limited to 'arch/mips/kernel/scall64-n32.S')
-rw-r--r-- | arch/mips/kernel/scall64-n32.S | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S index 446cc654da5..611ba3bdbb8 100644 --- a/arch/mips/kernel/scall64-n32.S +++ b/arch/mips/kernel/scall64-n32.S @@ -52,6 +52,7 @@ NESTED(handle_sysn32, PT_SIZE, sp) and t0, t1, t0 bnez t0, n32_syscall_trace_entry +syscall_common: jalr t2 # Do The Real Thing (TM) li t0, -EMAXERRNO - 1 # error? @@ -75,9 +76,9 @@ n32_syscall_trace_entry: daddiu a1, v0, __NR_N32_Linux jal syscall_trace_enter - bltz v0, 2f # seccomp failed? Skip syscall + bltz v0, 1f # seccomp failed? Skip syscall - move t0, s0 + move t2, s0 RESTORE_STATIC ld a0, PT_R4(sp) # Restore argument registers ld a1, PT_R5(sp) @@ -85,19 +86,9 @@ n32_syscall_trace_entry: ld a3, PT_R7(sp) ld a4, PT_R8(sp) ld a5, PT_R9(sp) - jalr t0 + j syscall_common - li t0, -EMAXERRNO - 1 # error? - sltu t0, t0, v0 - sd t0, PT_R7(sp) # set error flag - beqz t0, 1f - - ld t1, PT_R2(sp) # syscall number - dnegu v0 # error - sd t1, PT_R0(sp) # save it for syscall restarting -1: sd v0, PT_R2(sp) # result - -2: j syscall_exit +1: j syscall_exit not_n32_scall: /* This is not an n32 compatibility syscall, pass it on to |