From: "H. Peter Anvin" <hpa@zytor.com>
To: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>, Dan Rue <dan.rue@linaro.org>,
Shuah Khan <shuah@kernel.org>, Ingo Molnar <mingo@kernel.org>,
Dmitry Safonov <dsafonov@virtuozzo.com>,
"open list:KERNEL SELFTEST FRAMEWORK"
<linux-kselftest@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: selftests/x86/fsgsbase_64 test problem
Date: Mon, 29 Jan 2018 10:12:32 -0800 [thread overview]
Message-ID: <624b9e67-14ee-6882-e55e-f337ec2471d3@zytor.com> (raw)
In-Reply-To: <CALCETrW6SY8ktqSA-r108WkNf15js4eu0grDds=JVbNtBdSGqA@mail.gmail.com>
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
next prev parent reply other threads:[~2018-01-29 18:17 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-26 15:36 Dan Rue
2018-01-26 16:22 ` Andy Lutomirski
2018-01-26 18:59 ` Andy Lutomirski
2018-01-26 19:46 ` Andy Lutomirski
2018-01-26 22:38 ` Andy Lutomirski
2018-01-26 22:42 ` Andy Lutomirski
2018-01-28 19:21 ` Andy Lutomirski
2018-01-29 9:13 ` H. Peter Anvin
2018-01-29 16:37 ` Andy Lutomirski
2018-01-29 18:12 ` H. Peter Anvin [this message]
2018-01-29 18:26 ` Andy Lutomirski
2018-01-29 18:30 ` H. Peter Anvin
2018-02-27 22:59 ` Dan Rue
2018-01-26 22:56 ` Borislav Petkov
2018-01-28 19:21 ` Andy Lutomirski
2018-01-26 22:51 ` H. Peter Anvin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=624b9e67-14ee-6882-e55e-f337ec2471d3@zytor.com \
--to=hpa@zytor.com \
--cc=bp@alien8.de \
--cc=dan.rue@linaro.org \
--cc=dsafonov@virtuozzo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@kernel.org \
--cc=shuah@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®