lkml.org 
[lkml]   [2018]   [Jan]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: selftests/x86/fsgsbase_64 test problem
From
Date
On 01/29/18 08:37, Andy Lutomirski wrote:
>
> That's what I thought, too, and the SDM does say that, but the SDM
> says all kinds of not-quite-correct things about segmentation.
>
>> It is pretty much scratch space (I have
>> suggested using it for the gsbase once all those issues get sorted out,
>> because it lets the paranoid code do something like:
>>
>> rdgsbase %rax
>> push %rax /* Save old gsbase */
>> push %rax /* Reserve space on stack */
>> sgdt -2(%rsp) /* We don't care about the limit */
>> pop %rax /* %rax <- gdtbase */
>> mov (%rax),%rax /* GDT[0] holds the gsbase for this cpu */
>> wrgsbase %rax
>
> That will utterly suck on non-UMIP machines that have
> hypervisor-provided UMIP emulation.
>

Is that a valid thing to optimize for, especially given that paranoid
entries aren't the most common anyway?

-hpa

\
 
 \ /
  Last update: 2018-01-29 19:18    [W:0.103 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site