lkml.org 
[lkml]   [2018]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [patch RFC 5/5] x86/speculation: Add basic speculation control code
From
Date
On Wed, 2018-01-10 at 16:47 +0100, Andrea Arcangeli wrote:
> On Wed, Jan 10, 2018 at 03:24:17PM +0000, David Woodhouse wrote:
> > Since it achieves nothing¹ but to make userspace run slower, there's no
> > need to write it again on returning to userspace. It will perform that
> > function just fine without doing so.
>
> Ok, very glad we are on the same page now.
>
> Note that as far as I can tell there was no way to answer the above
> question by reading the spec.

The spec does, I concede, leave something to be desired. This sentence
in particular — and it really is a single sentence — caused me to throw
my toys out of the pram and demand verbal explanations (which is
perhaps the only reason I managed to work it out):

"If IBRS is set, near returns and near indirect jumps/calls will not allow their
speculative target address to be controlled by code that executed in a less
privileged prediction mode before the IBRS mode was last written with a
value of 1 or on another logical processor so long as all RSB entries from the
previous less privileged prediction mode are overwritten"

But it *does* have the words "before the IBRS mode was last written
with a value of 1" in there somewhere... ;)[unhandled content-type:application/x-pkcs7-signature]
\
 
 \ /
  Last update: 2018-01-14 23:21    [W:0.099 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site