Re:LLVM patch to fix half of Spectre attack
by ant6n on Thursday January 04, 2018 @11:30AM
(#16071590)
New CPUs could just convert the retpoline back to the original jump in microcode, and enable the now timing-attack safe branch predictor.
[ Parent
| on HN ]
Re:LLVM patch to fix half of Spectre attack
by gmueckl on Thursday January 04, 2018 @11:50AM
(#16071793)
But even then a performance hit remains due to the increased code size of the instruction sequence.
Re:LLVM patch to fix half of Spectre attack
by ant6n on Thursday January 04, 2018 @07:55PM
(#16075574)
There's a lot of space left in code already to insert trampolines later. And in the end of the day most memory is data, not code.
And eventually, this code will get replaced anyway (just like today there are often multiple code paths in binaries, and a lot of code is compiled for host anyway).
In any case, the performance impact of a couple extra bytes per indirect call is small compared to disabling branch target prediction.