From: Tom Lendacky <thomas.lendacky@amd.com>
To: "Woodhouse, David" <dwmw@amazon.co.uk>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"andi@firstfloor.org" <andi@firstfloor.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"peterz@infradead.org" <peterz@infradead.org>,
"tim.c.chen@linux.intel.com" <tim.c.chen@linux.intel.com>,
"torvalds@linux-foundation.org" <torvalds@linux-foundation.org>,
"ak@linux.intel.com" <ak@linux.intel.com>,
"x86@kernel.org" <x86@kernel.org>,
"luto@kernel.org" <luto@kernel.org>,
"pjt@google.com" <pjt@google.com>,
"dave.hansen@intel.com" <dave.hansen@intel.com>,
"jikos@kernel.org" <jikos@kernel.org>,
"gregkh@linux-foundation.org" <gregkh@linux-foundation.org>
Subject: Re: [PATCH v3 3/3] x86/retpoline: Convert generic specific retpolines to use RETPOLINE_GENERIC
Date: Wed, 10 Jan 2018 09:18:09 -0600 [thread overview]
Message-ID: <1e4e8acb-7f21-aa13-5c0c-5dccb2c4c8e4@amd.com> (raw)
In-Reply-To: <1515595594.22302.170.camel@amazon.co.uk>
On 1/10/2018 8:46 AM, Woodhouse, David wrote:
> On Wed, 2018-01-10 at 08:23 -0600, Tom Lendacky wrote:
>> On 1/10/2018 7:15 AM, Woodhouse, David wrote:
>>> On Tue, 2018-01-09 at 18:28 -0800, Andi Kleen wrote:
>>>> From: Andi Kleen <ak@linux.intel.com>
>>>>
>>>> X86_FEATURE_RETPOLINE has been renamed to X86_FEATURE_RETPOLINE_GENERIC.
>>>> Convert the sequences using it.
>>>
>>> AMD documentation says they need the RSB fill too, so these should stay
>>> under X86_FEATURE_RETPOLINE I think.
>>
>> AMD processors don't fall back to the indirect predictor on an underflow
>> so this isn't needed on AMD if it is purely for underflow prevention.
>
> It isn't purely for underflow protection. This is needed (see the AMD
> doc) for protecting against RSB entries that actually point to
> userspace addresses. It's only not needed if we have SMEP.
Ok, hence my caveat on the underflow in the reply. If it's to eliminate
userspace addresses, then yes, it needs to be applied for AMD as well.
In that case maybe the comments in arch/x86/entry/entry_{32,64}.S need to
be updated since they only talk about underflow.
Thanks,
Tom
>
>
>
> Amazon Web Services UK Limited. Registered in England and Wales with
> registration number 08650665 and which has its registered office at 60
> Holborn Viaduct, London EC1A 2FD, United Kingdom.
next prev parent reply other threads:[~2018-01-10 15:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-10 2:28 Update retpoline boot fix Andi Kleen
2018-01-10 2:28 ` [PATCH v3 1/3] x86/retpoline: Add X86_FEATURE_RETPOLINE_GENERIC Andi Kleen
2018-01-10 2:28 ` [PATCH v3 2/3] x86/retpoline: Use better sequences for NOSPEC_CALL/JMP Andi Kleen
2018-01-10 13:26 ` Woodhouse, David
2018-01-10 2:28 ` [PATCH v3 3/3] x86/retpoline: Convert generic specific retpolines to use RETPOLINE_GENERIC Andi Kleen
2018-01-10 13:15 ` Woodhouse, David
2018-01-10 14:23 ` Tom Lendacky
2018-01-10 14:46 ` Woodhouse, David
2018-01-10 15:18 ` Tom Lendacky [this message]
2018-01-10 15:20 ` Woodhouse, David
2018-01-10 10:41 ` Update retpoline boot fix Thomas Gleixner
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=1e4e8acb-7f21-aa13-5c0c-5dccb2c4c8e4@amd.com \
--to=thomas.lendacky@amd.com \
--cc=ak@linux.intel.com \
--cc=andi@firstfloor.org \
--cc=dave.hansen@intel.com \
--cc=dwmw@amazon.co.uk \
--cc=gregkh@linux-foundation.org \
--cc=jikos@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=peterz@infradead.org \
--cc=pjt@google.com \
--cc=tglx@linutronix.de \
--cc=tim.c.chen@linux.intel.com \
--cc=torvalds@linux-foundation.org \
--cc=x86@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®