diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2019-11-29 23:54:06 +0100 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2019-11-30 00:47:54 +0100 |
commit | 02ce94c229251555ac726ecfebe3458ef5905fa9 (patch) | |
tree | 19e5ae21b866a950e0b42c5bc8655f5d8d1b0ef5 /arch/xtensa/kernel/entry.S | |
parent | xtensa: rearrange syscall tracing (diff) | |
download | linux-02ce94c229251555ac726ecfebe3458ef5905fa9.tar.xz linux-02ce94c229251555ac726ecfebe3458ef5905fa9.zip |
xtensa: fix system_call interaction with ptrace
Don't overwrite return value if system call was cancelled at entry by
ptrace. Return status code from do_syscall_trace_enter so that
pt_regs::syscall doesn't need to be changed to skip syscall.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'arch/xtensa/kernel/entry.S')
-rw-r--r-- | arch/xtensa/kernel/entry.S | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/xtensa/kernel/entry.S b/arch/xtensa/kernel/entry.S index 59af494d9940..138469e26560 100644 --- a/arch/xtensa/kernel/entry.S +++ b/arch/xtensa/kernel/entry.S @@ -1892,6 +1892,7 @@ ENTRY(system_call) mov a6, a2 call4 do_syscall_trace_enter + beqz a6, .Lsyscall_exit l32i a7, a2, PT_SYSCALL 1: @@ -1904,8 +1905,6 @@ ENTRY(system_call) addx4 a4, a7, a4 l32i a4, a4, 0 - movi a5, sys_ni_syscall; - beq a4, a5, 1f /* Load args: arg0 - arg5 are passed via regs. */ @@ -1925,6 +1924,7 @@ ENTRY(system_call) s32i a6, a2, PT_AREG2 bnez a3, 1f +.Lsyscall_exit: abi_ret(4) 1: |