Nicholas Piggin <npig...@gmail.com> writes:

> When exiting xmon with 'x' (exit and recover), oops_begin bails
> out immediately, but die then calls __die() and oops_end(), which
> cause a lot of bad things to happen.

In fact oops_begin() returns 1, which oops_end() then passes directly to
raw_local_irq_restore() as flags. On 64-bit that actually works because
arch_local_irq_restore() takes just "en" (enable), not real flags. But
on 32-bit it's supposed to be the MSR value. So that's impressively
broken.

> If the debugger was attached then went to graceful recovery, exit
> from die() immediately.

Right. Crucially it doesn't change anything in terms of the actual logic
of oops_begin(), ie. previously oops_begin() did nothing prior to
calling debugger(), and after this patch that remains the same (which
you did mention above but just spelling it out for myself).

cheers

Reply via email to