summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/kernel/hw_breakpoint.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/arch/powerpc/kernel/hw_breakpoint.c b/arch/powerpc/kernel/hw_breakpoint.c
index 241e09712314..5a1d55d06a08 100644
--- a/arch/powerpc/kernel/hw_breakpoint.c
+++ b/arch/powerpc/kernel/hw_breakpoint.c
@@ -304,15 +304,16 @@ int __kprobes single_step_dabr_instruction(struct die_args *args)
if (!bp_info->extraneous_interrupt)
perf_bp_event(bp, regs);
+ set_dabr(bp_info->address | bp_info->type | DABR_TRANSLATION);
+ current->thread.last_hit_ubp = NULL;
+
/*
- * Do not disable MSR_SE if the process was already in
- * single-stepping mode.
+ * If the process was being single-stepped by ptrace, let the
+ * other single-step actions occur (e.g. generate SIGTRAP).
*/
- if (!test_thread_flag(TIF_SINGLESTEP))
- regs->msr &= ~MSR_SE;
+ if (test_thread_flag(TIF_SINGLESTEP))
+ return NOTIFY_DONE;
- set_dabr(bp_info->address | bp_info->type | DABR_TRANSLATION);
- current->thread.last_hit_ubp = NULL;
return NOTIFY_STOP;
}
OpenPOWER on IntegriCloud