Liste des Groupes | Revenir à c arch |
Lawrence D'Oliveiro <ldo@nz.invalid> writes:Not allowing a dependent AGEN to happen when the first AGEN takesOn Wed, 24 Jul 2024 13:22:46 GMT, Scott Lurndal wrote:>
>Lawrence D'Oliveiro <ldo@nz.invalid> writes:>>>
I was wondering how those code patches would
impact on shared code.
Global branch prediction, of course.
But the characteristics of a program run in one thread/process might not
match those in another.
They might not, or they might. When the hardware branch predictor
researchers looked into it, they found that there is more synergy than
interference. Consequently, they did not take measures to avoid
sharing. And for the approach of patching the hints in the code, the
results of sharing will be beneficial on average, too, because the
only difference from the 2-bit/branch predictor is that the latter is
in microarchitectural state instead of in the code.
>
Now somebody will point out that sharing makes it possible for an
attacker to train branch predictors in one process to attack a
different process through Spectre and friends. While preventing
sharing would close that, it does not close training the predictors in
the same thread.
>
Closing Spectre through invisible speculation (several papers exist
about that) makes it irrelevant (for Spectre) whether the predictors
are shared or not. Of course, for invisible speculation the permanent
branch predictors must not be updated speculatively, but that's
probably better anyway.
>
- anton
Les messages affichés proviennent d'usenet.