On 01/08/2018 02:03 PM, Bill Schmidt wrote:
> 
> I agree 100% with this approach.  I just wanted to raise the point in case
> other architectures have different needs.  Power can work around this
> by just ignoring 4 of the 5 arguments.  As long as nobody else needs
> *additional* arguments, this should work out just fine.  But I want to be 
> clear
> that the only guarantee of the semantics for everybody is that "speculation 
> stops here," while on some processors it may be "speculation stops here
> if out of range."  If we can write this into the documentation, then I'm fine
> writing a target expander for Power as discussed.
My recollection of other micro-architectures and how they handle
conditional moves makes me believe that the test and conditional move
may be enough to stop the rampant speculation that causes the problems.
They're just enough of a fence to provide a level of mitigation.

So I see value in providing those arguments for architectures other than
ARM/AArch64.

What I think we're really trying to nail down is how crisply the
semantics of this builtin are, particularly around the need to test and
provide a failval.

I'm actually going to be in a meeting with another chip vendor tomorrow
AM and will make a point to discuss this with them and see what
direction they want to go.  I suspect they're closer to PPC in terms of
the semantics they want, but need to verify.


> 
> I had a brief interchange with Richi last week, and he suggested that for
> the automatic detection we might look into flagging MEM_REFs rather
> than inserting a built-in; a target hook can still handle such a flag.  That
> has some advantages and some disadvantages that I can think of, so
> we'll have to talk that out on the list over time after we get through the
> crisis mode reactions.
I think someone could likely spend a huge amount of time in this space.
Both with the analysis around finding potentially vulnerable sequences,
generating appropriate mitigation code and optimizing that to be as
painless as possible.  But as you say, this is something we should hash
out post-crisis.

jeff

Reply via email to