3 ms·
#1 was the most interesting part of this paper to me. I don't think I've seen a compiler variant of Spectre discussed elsewhere, and now I'm curious whether a s
by mjn 9y ago
#1 was the most interesting part of this paper to me. I don't think I've seen a compiler variant of Spectre discussed elsewhere, and now I'm curious whether a similar issue might be present in more mainstream compilers too. The key bit seems to be that a compiler optimization that converts an explicit conditional to branchless code is doing the software-level moral equivalent of speculative execution (because it executes both sides of a conditional, and then throws one side out).
- runeks 9y ago> The key bit seems to be that a compiler optimization that converts an explicit conditional to branchless code is doing the software-level moral equivalent of speculative execution (because it executes both sides of a conditional, and then throws one side out). Isn't speculative execution only a potential problem when the speculative executer has access to memory that the code in question is not supposed to have access to? I.e. compiler-speculative execution, as it were, is not a problem, because the compiler can't reveal anything it doesn't know about (private memory), whereas a CPU can reveal information about private memory because it has access to it.