On Mon, Jan 8, 2018 at 5:47 AM, Jeff Law <l...@redhat.com> wrote:
> On 01/07/2018 07:20 PM, Bill Schmidt wrote:
>> Hi Richard,
>>
>> Unfortunately, I don't see any way that this will be useful for the ppc 
>> targets.  We don't
>> have a way to force resolution of a condition prior to continuing 
>> speculation, so this
>> will just introduce another comparison that we would speculate past.  For 
>> our mitigation
>> we will have to introduce an instruction that halts all speculation at that 
>> point, and place
>> it in front of all dangerous loads.  I wish it were otherwise.
> So could you have an expander for __builtin_load_no_speculate that just
> emits the magic insn that halts all speculation and essentially ignores
> the additional stuff that __builtin_load_no_speculate might be able to
> do on other platforms?

I think you at least need to expand the builtin semantically given as designed
it might consume the condition entirely in the source code.

I also think the user documentation in extend.texi should contain examples on
how to actually use the builtin to mitigate the Spectre attack, that
is, code before
and after using it.

And somebody might want to set up a spectre.html page and some NEWS item
at some point.

Richard.

>
> jeff

Reply via email to