On Wed, Nov 29, 2017 at 09:57:43AM -0800, Andy Lutomirski wrote: > On Tue, Nov 28, 2017 at 11:09 PM, Ingo Molnar <[email protected]> wrote:
> > On a related note, we should definitely extend the 'intended GS state' > > annotation > > comments I did in this patch to all SWAPGS instances - this way code review > > has a > > much higher chance of finding discrepancies between intent and actual code. > > Agreed. I'll send a patch. Alternatively we could do something like: SWITCH_TO_KERNEL_GS SWITCH_TO_USER_GS and have them do the SWAPGS with an (optional) assertion of the actual GS.

