Re: [RFC PATCH] x86 NMI-safe INT3 and Page Fault (v2)

From: Ingo Molnar
Date: Wed Apr 16 2008 - 09:06:41 EST



* Mathieu Desnoyers <compudj@xxxxxxxxxxxxxxxxxx> wrote:

> Implements an alternative iret with popf and return so trap and
> exception handlers can return to the NMI handler without issuing iret.
> iret would cause NMIs to be reenabled prematurely. x86_32 uses popf
> and far return. x86_64 has to copy the return instruction pointer to
> the top of the previous stack, issue a popf, loads the previous esp
> and issue a near return (ret).

thanks Mathieu, i've picked this up into x86.git for more testing.

note that this also fixes an oprofile regression: when oprofile is used
to generate stack-backtraces, we can fault on address resolution from
NMI context and currently we do an IRET - with your fixes it should work
fine. Obscure case but still worth fixing.

Ingo
--
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/