* [PATCH] powerpc: Fix ppc32 single step out of syscalls
@ 2007-05-24 5:41 Benjamin Herrenschmidt
0 siblings, 0 replies; only message in thread
From: Benjamin Herrenschmidt @ 2007-05-24 5:41 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
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
of 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>
---
arch/powerpc/kernel/ptrace.c | 2 ++
1 file changed, 2 insertions(+)
Index: linux-cell/arch/powerpc/kernel/ptrace.c
===================================================================
--- linux-cell.orig/arch/powerpc/kernel/ptrace.c 2007-05-24 15:18:42.000000000 +1000
+++ linux-cell/arch/powerpc/kernel/ptrace.c 2007-05-24 15:19:15.000000000 +1000
@@ -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 *ta
regs->msr &= ~MSR_SE;
#endif
}
+ clear_tsk_thread_flag(task, TIF_SINGLESTEP);
}
#endif /* CONFIG_PPC32 */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-05-24 5:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-24 5:41 [PATCH] powerpc: Fix ppc32 single step out of syscalls Benjamin Herrenschmidt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).