From: Sergey Matyukevich Date: Thu, 14 Apr 2022 08:17:22 +0000 (+0300) Subject: ARC: entry: fix syscall_trace_exit argument X-Git-Tag: v5.10.113~23 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5580b974a84b30f6da90a3a562ea0dbfb0038110;p=thirdparty%2Fkernel%2Fstable.git ARC: entry: fix syscall_trace_exit argument commit b1c6ecfdd06907554518ec384ce8e99889d15193 upstream. Function syscall_trace_exit expects pointer to pt_regs. However r0 is also used to keep syscall return value. Restore pointer to pt_regs before calling syscall_trace_exit. Cc: Signed-off-by: Sergey Matyukevich Signed-off-by: Vineet Gupta Signed-off-by: Greg Kroah-Hartman --- diff --git a/arch/arc/kernel/entry.S b/arch/arc/kernel/entry.S index ae656bfc31c3d..301ade4d0b943 100644 --- a/arch/arc/kernel/entry.S +++ b/arch/arc/kernel/entry.S @@ -199,6 +199,7 @@ tracesys_exit: st r0, [sp, PT_r0] ; sys call return value in pt_regs ;POST Sys Call Ptrace Hook + mov r0, sp ; pt_regs needed bl @syscall_trace_exit b ret_from_exception ; NOT ret_from_system_call at is saves r0 which ; we'd done before calling post hook above