aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2007-05-24 01:41:04 -0400
committerPaul Mackerras <paulus@samba.org>2007-06-02 07:01:55 -0400
commit7d43e57764fe6922703c36d8d0d56a7ead21f03d (patch)
tree86e61fb96320bc039c301c9bd690d7f8ea9320f7
parent5169b8a1659fef9cc093ed3d889a854945a18177 (diff)
[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: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r--arch/powerpc/kernel/ptrace.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c
index f4f391cdd8f5..bf76562167c3 100644
--- a/arch/powerpc/kernel/ptrace.c
+++ b/arch/powerpc/kernel/ptrace.c
@@ -218,6 +218,7 @@ set_single_step(struct task_struct *task)
218 regs->msr |= MSR_SE; 218 regs->msr |= MSR_SE;
219#endif 219#endif
220 } 220 }
221 set_tsk_thread_flag(task, TIF_SINGLESTEP);
221} 222}
222 223
223static inline void 224static inline void
@@ -233,6 +234,7 @@ clear_single_step(struct task_struct *task)
233 regs->msr &= ~MSR_SE; 234 regs->msr &= ~MSR_SE;
234#endif 235#endif
235 } 236 }
237 clear_tsk_thread_flag(task, TIF_SINGLESTEP);
236} 238}
237#endif /* CONFIG_PPC32 */ 239#endif /* CONFIG_PPC32 */
238 240