Re: [Kgdb-bugreport] [GIT PULL] kgdb regression fixes for 2.6.35-rc5

From: DDD
Date: Wed Jul 28 2010 - 22:45:34 EST

Frederic Weisbecker wrote:
On Wed, Jul 28, 2010 at 07:14:42PM -0500, Jason Wessel wrote:
On 07/28/2010 04:26 PM, Linus Torvalds wrote:
On Wed, Jul 28, 2010 at 2:17 PM, Frederic Weisbecker <fweisbec@xxxxxxxxx> wrote:
I'm sorry I spot it a bit late.
There is a little issue in this patch, irqs won't
be restored:

@@ -588,9 +588,10 @@ int kgdb_ll_trap(int cmd, const char *str,
if (!kgdb_io_module_registered)

+ local_irq_save(flags);
return __kgdb_notify(&args, cmd);
+ local_irq_restore(flags);
Yeah, that's obviously crap. I also wonder why __kgdb_notify messes up
the flags to begin with.

This should not be needed as the irqs should already be off while in the overflow handler.

Interrupts are not disabled in the debug exception handler.

Hi Frederic,

The debug was initialized as an intr gate, thus the interrupts have been disabled in the debug exception handler. :-)

820 /* Set of traps needed for early debugging. */
821 void __init early_trap_init(void)
822 {
823 set_intr_gate_ist(1, &debug, DEBUG_STACK);
824 /* int3 can be called from all */
825 set_system_intr_gate_ist(3, &int3, DEBUG_STACK);
826 set_intr_gate(14, &page_fault);
827 load_idt(&idt_descr);
828 }


I'm not sure what would be the state of dr6 if a nested debug exception
would happen while do_debug() is interrupted.

Perhaps the previous dr6 value is dropped. Intel manuals don't seem to say anything
about that.

Anyway that's a separate issue. The current patch fixes a regression and
it looks good.


The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
Kgdb-bugreport mailing list

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at