Quantcast
Channel: lkml.org : Shesha Sreenivasamurthy
Viewing all articles
Browse latest Browse all 1267

Re: [PATCH RFC rebase 3/9] powerpc/64: Use barrier_nospec in sysca ...

$
0
0
Linus Torvalds writes: (Summary) Even if you were to do an expensive serialization before the branch, the branch will still predict after the serialization.
the serialization.
The thing is, it doesn't make sense to insert a barrier before a conditional branch for Spectre mitigation.
conditional branch for Spectre mitigation.
The problem is not that the data isn't ready for the branch - the problem is that the branch is predicted _regardless_ of the data. You'll want to do I$ prefetching etc.
So the problem is that even if the data is ready, the branch will be predicted according to some unrelated historical data, and a barrier to make the branch conditional be stable is pointless.

Viewing all articles
Browse latest Browse all 1267

Trending Articles