Skip to contentSkip to conversation

m68k: ptrace fixes

PATCH New Andreas Schwab 1 participant 1 message May 19, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 m68k: ptrace fixes

This fixes the following issues in ptrace:

- when single stepping into the signal handler stop at the first insn of the handler
- handle non-zero stkadj when accessing pc and sr in ptregs
- correctly handle PT_SR in PTRACE_POKEUSR
- report -EIO when trying to read unknown offset in PTRACE_PEEKUSR

Additionally, the handling of the special case that PT_SR accesses a 16 bit word instead of a 32 bit word has been moved into get_reg/put_reg.

---
This patch is to be applied on top of the ptrace patch in
<http://marc.info/?l=linux-m68k&m=124203433410424&w=2>.

---
 arch/m68k/kernel/entry.S  |    6 +++++-
 arch/m68k/kernel/ptrace.c |   45 +++++++++++++++++++++++++++++----------------
 2 files changed, 34 insertions(+), 17 deletions(-)
arch/m68k/kernel/entry.S +5 -1
index 8744f60..521ca1c 100644
@@ -179,7 +179,11 @@ do_signal_return:
 	addql	#8,%sp
 	RESTORE_SWITCH_STACK
 	addql	#4,%sp
-	jbra	resume_userspace
+	tstl	%d0
+	jeq	resume_userspace
+	| when single stepping into handler stop at the first insn
+	btst	#6,%curptr@(TASK_INFO+TINFO_FLAGS+2)
+	jeq	resume_userspace
 
 do_delayed_trace:
 	bclr	#7,%sp@(PT_SR)		| clear trace bit in SR
arch/m68k/kernel/ptrace.c +29 -16

110 lines not on this page · raw message

Signature · 6 lines
1.6.3.1

-- 
Andreas Schwab, [email protected]
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."