On 12/12/24 12:11, David Woodhouse wrote: > From: David Woodhouse > > The virtual mapping of the control page may have been _PAGE_GLOBAL and > thus its PTE might not have been flushed on the %cr3 switch and it might > effectively still be read-only. Move the writes to it down into the > identity_mapped() function where the same %rip-relative addressing will > get the new mapping. > > The stack is fine, as that's using the identity mapped address anyway. Shouldn't we also ensure that Global entries don't bite anyone else? Something like the completely untested attached patch?