4 ms·
> But wait, why did I say "mostly"? Well, not everyone has a retpoline compiler yet... but OK, screw them; they need to update. That got me interested, who has
by shakna 9y ago
> But wait, why did I say "mostly"? Well, not everyone has a retpoline compiler yet... but OK, screw them; they need to update.
That got me interested, who has reptoline support, and from when?
GCC added support in 7.2 [0], which means a lot of people don't have access yet.
LLVM added it in D41723 [1], but I don't think that has landed in a release yet.
I can't find any talk around TCC, but that isn't exactly surprising.
Haven't heard anything about MSVC, and can't find anything, but that's not surprising as I don't think Windows is using reptoline in their mitigations, but I really have no idea.
[0] https://www.phoronix.com/scan.php?page=news_item&px=Clear-Linux-Retpoline-KPTI https://www.phoronix.com/scan.php?page=news_item&px=Clear-Li...
[1] https://reviews.llvm.org/D41723 https://reviews.llvm.org/D41723
- taspeotis 9y agoI'm not sure how close this is to the retpoline mitigation but ... https://blogs.msdn.microsoft.com/vcblog/2018/01/15/spectre-mitigations-in-msvc/ https://blogs.msdn.microsoft.com/vcblog/2018/01/15/spectre-m... Our tests show the performance impact of /Qspectre to be negligible. We have built all of Windows with /Qspectre enabled and did not notice any performance regressions of concern. Performance gains from speculative execution are lost where the mitigation is applied but the mitigation was needed in a relatively small number of instances across the large codebases that we recompiled.
- shakna 9y agoThanks! I think that and the inner-linked post tell us what we need to know. From Terry's post: > For context, on newer CPUs such as on Skylake and beyond, Intel has refined the instructions used to disable branch speculation to be more specific to indirect branches, reducing the overall performance penalty of the Spectre mitigation. And your link: > /d2guardspecload, that is currently equivalent to /Qspectre. It seems equivalent to reptoline, at least from a high level perspective. So MSVC is probably protected, but only optionally. They're leaving it up to developers to use the /Qspectre flag, it isn't something automatically enabled when you use an /O(x) optimise flag. Edit: I should add that /Qspectre is currently being added to a lot of Windows, but they're assessing where before doing so, because not everywhere should need it.
- cesarb 9y agoFrom what I understood from that link, /Qspectre is for variant 1, while retpoline is for variant 2, so it's not equivalent.
- juergbi 9y ago> GCC added support in 7.2 No, GCC adds support in 7.3, which is scheduled to be released tomorrow.
- cesarb 9y agoThat "not everyone has a retpoline compiler yet" was in the context of the Linux kernel, which so far compiles with GCC only (IIRC it also compiled with ICC in a distant past; and there's an effort to make it possible for LLVM/clang to compile the kernel, which is nearing completion). So in the context of this discussion, he's talking (and thinking) about GCC.
- shakna 9y agoSure, but it still got me curious what compilers had added support.