diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2019-04-03 20:19:25 -0700 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2019-04-03 23:18:36 -0700 |
commit | 2201f31f2c6d6030cbd2f7085455e2172725b1c5 (patch) | |
tree | 67ea0ee67367c7050fce6ec793967486108b43c1 /arch/xtensa | |
parent | 79a3aaa7b82e3106be97842dedfd8429248896e6 (diff) | |
download | linux-2201f31f2c6d6030cbd2f7085455e2172725b1c5.tar.gz linux-2201f31f2c6d6030cbd2f7085455e2172725b1c5.tar.bz2 linux-2201f31f2c6d6030cbd2f7085455e2172725b1c5.zip |
xtensa: use actual syscall number in do_syscall_trace_leave
Syscall may alter pt_regs structure passed to it, resulting in a
mismatch between syscall entry end syscall exit entries in the ftrace.
Temporary restore syscall field of the pt_regs for the duration of
do_syscall_trace_leave.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'arch/xtensa')
-rw-r--r-- | arch/xtensa/kernel/entry.S | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/xtensa/kernel/entry.S b/arch/xtensa/kernel/entry.S index e50f5124dc6f..e54af8b7e0f8 100644 --- a/arch/xtensa/kernel/entry.S +++ b/arch/xtensa/kernel/entry.S @@ -1860,6 +1860,8 @@ ENTRY(system_call) l32i a7, a2, PT_SYSCALL 1: + s32i a7, a1, 4 + /* syscall = sys_call_table[syscall_nr] */ movi a4, sys_call_table @@ -1893,8 +1895,12 @@ ENTRY(system_call) retw 1: + l32i a4, a1, 4 + l32i a3, a2, PT_SYSCALL + s32i a4, a2, PT_SYSCALL mov a6, a2 call4 do_syscall_trace_leave + s32i a3, a2, PT_SYSCALL retw ENDPROC(system_call) |