From 10faa81e102e2b7695f386812055cd2ef9e44b4c Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 30 Jan 2008 13:30:54 +0100 Subject: x86: debugctlmsr arch_has_block_step This implements user-mode step-until-branch on x86 using the BTF bit in MSR_IA32_DEBUGCTLMSR. It's just like single-step, only less so. Signed-off-by: Roland McGrath Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner --- arch/x86/kernel/traps_64.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'arch/x86/kernel/traps_64.c') diff --git a/arch/x86/kernel/traps_64.c b/arch/x86/kernel/traps_64.c index 874aca397b0..610a64d6bdf 100644 --- a/arch/x86/kernel/traps_64.c +++ b/arch/x86/kernel/traps_64.c @@ -850,6 +850,12 @@ asmlinkage void __kprobes do_debug(struct pt_regs * regs, get_debugreg(condition, 6); + /* + * The processor cleared BTF, so don't mark that we need it set. + */ + clear_tsk_thread_flag(tsk, TIF_DEBUGCTLMSR); + tsk->thread.debugctlmsr = 0; + if (notify_die(DIE_DEBUG, "debug", regs, condition, error_code, SIGTRAP) == NOTIFY_STOP) return; -- cgit v1.2.3