提交 7d43e577 编写于 作者: B Benjamin Herrenschmidt 提交者: Paul Mackerras

[POWERPC] Fix ppc32 single-stepping out of syscalls

The ppc32 kernel didn't properly set/clear the TIF_SINGLESTEP
flag, causing return from syscalls to not SIGTRAP, thus executing
one more instruction before stopping again.

This fixes it.  The ptrace code is a bit of a mess, and is overdue
for at least a -proper- 32/64 bits split and possibly more cleanups
but this minimum fix should be ok for 2.6.22
Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: NPaul Mackerras <paulus@samba.org>
上级 5169b8a1
......@@ -218,6 +218,7 @@ set_single_step(struct task_struct *task)
regs->msr |= MSR_SE;
#endif
}
set_tsk_thread_flag(task, TIF_SINGLESTEP);
}
static inline void
......@@ -233,6 +234,7 @@ clear_single_step(struct task_struct *task)
regs->msr &= ~MSR_SE;
#endif
}
clear_tsk_thread_flag(task, TIF_SINGLESTEP);
}
#endif /* CONFIG_PPC32 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册