diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-03 19:25:26 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-03 19:25:26 +0000 |
commit | ef6fed2eb60f1d490dd8c6b7a5ae88c29e77522a (patch) | |
tree | c7830d9586142e9f5d69374f645bf313244797bc /arch/mips/kernel/scall32-o32.S | |
parent | Adding debian version 5.10.216-1. (diff) | |
download | linux-ef6fed2eb60f1d490dd8c6b7a5ae88c29e77522a.tar.xz linux-ef6fed2eb60f1d490dd8c6b7a5ae88c29e77522a.zip |
Merging upstream version 5.10.218.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'arch/mips/kernel/scall32-o32.S')
-rw-r--r-- | arch/mips/kernel/scall32-o32.S | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S index b449b6866..80747719a 100644 --- a/arch/mips/kernel/scall32-o32.S +++ b/arch/mips/kernel/scall32-o32.S @@ -80,6 +80,18 @@ loads_done: PTR load_a7, bad_stack_a7 .previous + /* + * syscall number is in v0 unless we called syscall(__NR_###) + * where the real syscall number is in a0 + */ + subu t2, v0, __NR_O32_Linux + bnez t2, 1f /* __NR_syscall at offset 0 */ + LONG_S a0, TI_SYSCALL($28) # Save a0 as syscall number + b 2f +1: + LONG_S v0, TI_SYSCALL($28) # Save v0 as syscall number +2: + lw t0, TI_FLAGS($28) # syscall tracing enabled? li t1, _TIF_WORK_SYSCALL_ENTRY and t0, t1 @@ -117,16 +129,7 @@ syscall_trace_entry: SAVE_STATIC move a0, sp - /* - * syscall number is in v0 unless we called syscall(__NR_###) - * where the real syscall number is in a0 - */ - move a1, v0 - subu t2, v0, __NR_O32_Linux - bnez t2, 1f /* __NR_syscall at offset 0 */ - lw a1, PT_R4(sp) - -1: jal syscall_trace_enter + jal syscall_trace_enter bltz v0, 1f # seccomp failed? Skip syscall |