This is the mail archive of the
systemtap@sources.redhat.com
mailing list for the systemtap project.
[PATCH 2/2] kprobes: remove spurious MSR_SE masking
- From: Ananth N Mavinakayanahalli <ananth at in dot ibm dot com>
- To: linuxppc64-dev at ozlabs dot org
- Cc: anton at samba dot org, paulus at samba dot org, systemtap at sources dot redhat dot com, cchaney at us dot ibm dot com
- Date: Fri, 27 May 2005 11:43:32 -0400
- Subject: [PATCH 2/2] kprobes: remove spurious MSR_SE masking
- Reply-to: ananth at in dot ibm dot com
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();