Hacker News new | ask | show | jobs
by ant6n 3085 days ago
New CPUs could just convert the retpoline back to the original jump in microcode, and enable the now timing-attack safe branch predictor.
1 comments

But even then a performance hit remains due to the increased code size of the instruction sequence.
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.