Re: [PATCH] arch/x86_64/kernel/traps.c

From: Andi Kleen
Date: Tue Dec 13 2005 - 22:53:36 EST


On Tue, Dec 13, 2005 at 11:30:15AM -0500, John Blackwood wrote:
> Hi Andi,
>
> I would like to throw out a suggestion for a possible change in the way that
> the debug register traps are handled in do_debug() when the trap occurs
> in kernel-mode.
>
> In the x86_64 version of do_debug(), the code will skip around sending
> a SIGTRAP to the current task if the trap occurred while in kernel mode.

Looks good thanks.

> Additionally, I realize that users that pull in a kernel debugger such as
> KGDB into their kernel might want to remove this change below when they add
> in KGDB support. However, they could alternatively look at the current
> task's thread.debugreg[] values to see if the trap occurred due to KGDB
> or instead because of a user-space debugger trap, and still honor the
> user SIGTRAP processing (instead of the KGDB breakpoint processing)
> if the trap matches up with the thread.debugreg[] registers.

That should be eaten up by the die notifier.

-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/