aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/scall64-o32.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/kernel/scall64-o32.S')
-rw-r--r--arch/mips/kernel/scall64-o32.S21
1 files changed, 7 insertions, 14 deletions
diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S
index f543ff4feef9..6369cfd390c6 100644
--- a/arch/mips/kernel/scall64-o32.S
+++ b/arch/mips/kernel/scall64-o32.S
@@ -87,6 +87,7 @@ loads_done:
87 and t0, t1, t0 87 and t0, t1, t0
88 bnez t0, trace_a_syscall 88 bnez t0, trace_a_syscall
89 89
90syscall_common:
90 jalr t2 # Do The Real Thing (TM) 91 jalr t2 # Do The Real Thing (TM)
91 92
92 li t0, -EMAXERRNO - 1 # error? 93 li t0, -EMAXERRNO - 1 # error?
@@ -130,9 +131,9 @@ trace_a_syscall:
130 131
1311: jal syscall_trace_enter 1321: jal syscall_trace_enter
132 133
133 bltz v0, 2f # seccomp failed? Skip syscall 134 bltz v0, 1f # seccomp failed? Skip syscall
134 135
135 move t0, s0 136 move t2, s0
136 RESTORE_STATIC 137 RESTORE_STATIC
137 ld a0, PT_R4(sp) # Restore argument registers 138 ld a0, PT_R4(sp) # Restore argument registers
138 ld a1, PT_R5(sp) 139 ld a1, PT_R5(sp)
@@ -142,19 +143,9 @@ trace_a_syscall:
142 ld a5, PT_R9(sp) 143 ld a5, PT_R9(sp)
143 ld a6, PT_R10(sp) 144 ld a6, PT_R10(sp)
144 ld a7, PT_R11(sp) # For indirect syscalls 145 ld a7, PT_R11(sp) # For indirect syscalls
145 jalr t0 146 j syscall_common
146 147
147 li t0, -EMAXERRNO - 1 # error? 1481: j syscall_exit
148 sltu t0, t0, v0
149 sd t0, PT_R7(sp) # set error flag
150 beqz t0, 1f
151
152 ld t1, PT_R2(sp) # syscall number
153 dnegu v0 # error
154 sd t1, PT_R0(sp) # save it for syscall restarting
1551: sd v0, PT_R2(sp) # result
156
1572: j syscall_exit
158 149
159/* ------------------------------------------------------------------------ */ 150/* ------------------------------------------------------------------------ */
160 151
@@ -584,4 +575,6 @@ EXPORT(sys32_call_table)
584 PTR sys_memfd_create 575 PTR sys_memfd_create
585 PTR sys_bpf /* 4355 */ 576 PTR sys_bpf /* 4355 */
586 PTR compat_sys_execveat 577 PTR compat_sys_execveat
578 PTR sys_userfaultfd
579 PTR sys_membarrier
587 .size sys32_call_table,.-sys32_call_table 580 .size sys32_call_table,.-sys32_call_table