This is the mail archive of the systemtap@sources.redhat.com mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 2/2] kprobes: remove spurious MSR_SE masking


Hi,

single_step_exception() masks MSR_SE upon entry. We don't have to do it
again during kprobe post processing.

This also will help applications like itrace that'd want to single-step
more than once, after a kprobe hit.

Regards,
Ananth

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.

Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>

 arch/ppc64/kernel/kprobes.c |    3 +--
 1 files changed, 1 insertion(+), 2 deletions(-)

Index: linux-2.6.12-rc5/arch/ppc64/kernel/kprobes.c
===================================================================
--- linux-2.6.12-rc5.orig/arch/ppc64/kernel/kprobes.c	2005-05-27 14:40:42.000000000 -0400
+++ linux-2.6.12-rc5/arch/ppc64/kernel/kprobes.c	2005-05-27 14:50:38.000000000 -0400
@@ -214,8 +214,6 @@ static void resume_execution(struct kpro
 	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)
@@ -260,6 +258,7 @@ static inline int kprobe_fault_handler(s
 
 	if (kprobe_status & KPROBE_HIT_SS) {
 		resume_execution(current_kprobe, regs);
+		regs->msr &= ~MSR_SE;
 		regs->msr |= kprobe_saved_msr;
 
 		unlock_kprobes();


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]