Re: [PATCH 12/31] x86/entry/32: Add PTI cr3 switch to non-NMI entry/exit points

From: Dave Hansen
Date: Thu Mar 01 2018 - 13:36:27 EST


On 03/01/2018 10:24 AM, Brian Gerst wrote:
> One thing that I am not certain about is whether debug exception can
> happen even if the IF flag is cleared. If it can, debug exception should
> be handled like NMI as the state of the CR3 can be indeterminate if the
> exception happens in the entry/exit code.

It can happen with IF cleared. I ran into it during PTI development
more than once. That's why the debug fault code uses paranoid_entry on
64-bit just like the NMI code.