Re: [PATCH 18/28] powerpc,kgdb: Introduce low level trap catching
From: Benjamin Herrenschmidt
Date: Tue Feb 16 2010 - 17:56:49 EST
On Tue, 2010-02-16 at 13:33 -0600, Jason Wessel wrote:
> I took a peek at xmon, and it suffers from the same problem where you
> can place a breakpoint in any part of rcu_lock, notify_die, or
> atomic_notifier_call_chain and meet with recursive faults. I also
> checked that xmon appears to correctly return so as to continue if the
> exception was not intended for xmon.
>
> The reason I had not just moved the code block previously is that I was
> not looking to break anything such as xmon, which is the the only other
> user of this function.
>
> I'll add your ack, if you agree with the new version of the patch.
Almost, just stick a blank line here:
+ /* Debugger is first in line to stop recursive faults in
+ * rcu_lock, notify_die, or atomic_notifier_call_chain */
+ if (debugger_bpt(regs))
+ return;
---->
/* trap exception */
if (notify_die(DIE_BPT, "breakpoint", regs, 5, 5, SIGTRAP)
== NOTIFY_STOP)
return;
Please :-)
Acked-by: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>
Cheers,
Ben.
--
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/