提交 50e43a57 编写于 作者: A Al Viro 提交者: Geert Uytterhoeven

m68k: Update ->thread.esp0 before calling syscall_trace() in ret_from_signal

We get there when sigreturn has performed obscene acts on kernel stack;
in particular, the location of pt_regs has shifted.  We are about to call
syscall_trace(), which might stop for tracer.  If that happens, we'd better
have task_pt_regs() returning correct result...
Fucked-up-by: NAl Viro <viro@zeniv.linux.org.uk>
Fixes: bd6f56a7 ("m68k: Missing syscall_trace() on sigreturn")
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
Tested-by: NMichael Schmitz <schmitzmic@gmail.com>
Reviewed-by: NMichael Schmitz <schmitzmic@gmail.com>
Tested-by: NFinn Thain <fthain@linux-m68k.org>
Link: https://lore.kernel.org/r/YP2dMWeV1LkHiOpr@zeniv-ca.linux.org.ukSigned-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
上级 4bb0bd81
......@@ -186,6 +186,8 @@ ENTRY(ret_from_signal)
movel %curptr@(TASK_STACK),%a1
tstb %a1@(TINFO_FLAGS+2)
jge 1f
lea %sp@(SWITCH_STACK_SIZE),%a1
movel %a1,%curptr@(TASK_THREAD+THREAD_ESP0)
jbsr syscall_trace
1: RESTORE_SWITCH_STACK
addql #4,%sp
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册