提交 22e19c8d 编写于 作者: T Thomas Meyer 提交者: Richard Weinberger

um: userspace - be more verbose in ptrace set regs error

When ptrace fails to set GP/FP regs for the target process,
log the error before crashing the UML kernel.
Signed-off-by: NThomas Meyer <thomas@m3y3r.de>
Signed-off-by: NRichard Weinberger <richard@nod.at>
上级 1bcbfbfd
......@@ -323,11 +323,17 @@ void userspace(struct uml_pt_regs *regs)
* fail. In this case, there is nothing to do but
* just kill the process.
*/
if (ptrace(PTRACE_SETREGS, pid, 0, regs->gp))
if (ptrace(PTRACE_SETREGS, pid, 0, regs->gp)) {
printk(UM_KERN_ERR "userspace - ptrace set regs "
"failed, errno = %d\n", errno);
fatal_sigsegv();
}
if (put_fp_registers(pid, regs->fp))
if (put_fp_registers(pid, regs->fp)) {
printk(UM_KERN_ERR "userspace - ptrace set fp regs "
"failed, errno = %d\n", errno);
fatal_sigsegv();
}
/* Now we set local_using_sysemu to be used for one loop */
local_using_sysemu = get_using_sysemu();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册