Skip to contentSkip to conversation

ppc64 kprobes: remove spurious MSR_SE masking

PATCH New Paul Mackerras 1 participant 1 message Jun 7, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 ppc64 kprobes: remove spurious MSR_SE masking

From: Ananth N Mavinakayanahalli <[email protected]>

Remove spurious MSR_SE reset during kprobe processing. single_step_exception() already does it for us. Reset it to be safe when executing the fault_handler.

---

arch/ppc64/kernel/kprobes.c +1 -2
diff -urN linux-2.6/arch/ppc64/kernel/kprobes.c g5-ppc64/arch/ppc64/kernel/kprobes.c
@@ -177,8 +177,6 @@
 	ret = emulate_step(regs, p->ainsn.insn[0]);
 	if (ret == 0)
 		regs->nip = (unsigned long)p->addr + 4;
-
-	regs->msr &= ~MSR_SE;
 }
 
 static inline int post_kprobe_handler(struct pt_regs *regs)
@@ -215,6 +213,7 @@
 
 	if (kprobe_status & KPROBE_HIT_SS) {
 		resume_execution(current_kprobe, regs);
+		regs->msr &= ~MSR_SE;
 		regs->msr |= kprobe_saved_msr;
 
 		unlock_kprobes();