[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <624b9e67-14ee-6882-e55e-f337ec2471d3@zytor.com>
Date: Mon, 29 Jan 2018 10:12:32 -0800
From: "H. Peter Anvin" <hpa@...or.com>
To: Andy Lutomirski <luto@...nel.org>
Cc: Borislav Petkov <bp@...en8.de>, Dan Rue <dan.rue@...aro.org>,
Shuah Khan <shuah@...nel.org>, Ingo Molnar <mingo@...nel.org>,
Dmitry Safonov <dsafonov@...tuozzo.com>,
"open list:KERNEL SELFTEST FRAMEWORK"
<linux-kselftest@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: selftests/x86/fsgsbase_64 test problem
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
Powered by blists - more mailing lists