mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-18 08:46:14 +07:00
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>
This commit is contained in:
parent
79a3aaa7b8
commit
2201f31f2c
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user