Re: [PATCH 4/7] x86: Add support for rd/wr fs/gs base

H. Peter Anvin
2014-05-01T22:45:52Z

On 05/01/2014 03:18 PM, Andi Kleen wrote:
>> I haven't looked through the flows (I'm at LCE so I have limited screen
>> bandwidth) to see how that would be handled in this case, but in the
>> general paranoid case it comes down to the fact that in this particular
>> subcase we don't necessarily know exactly how many SWAPGS are between us
>> and userspace after we IRET.
>
> There is none as far as I know. Certainly wasn't any when the code
> was originally written.
>

This applies for an asynchronous entry from kernel space. Obviously in
the case where we actually come directly from user space (the stack
frame CS.RPL == 3) then that doesn't apply.

-hpa