lkml.org 
[lkml]   [2018]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 3/3] x86/retpoline: Convert generic specific retpolines to use RETPOLINE_GENERIC
From
Date
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.

\
 
 \ /
  Last update: 2018-01-14 23:21    [W:0.056 / U:0.532 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site