Relief for retpoline pain
Relief for retpoline pain
Posted Dec 15, 2018 8:39 UTC (Sat) by zev (subscriber, #88455)Parent article: Relief for retpoline pain
For a research project a few years ago I set up a prototype system somewhat similar to the "optpolines" described here -- it used perf to profile a running workload and discover common indirect call targets, and then took a whole syscall path and used LTO to compile a version of it with all indirect calls de-indirected and even inlined (with a guard check that fell back to the original code of course) to generate an optimized version of the hot code path for that specific running system (from syscall entry points all the way down to device drivers), which it then spliced into the running system as a livepatch.
While I was working on it the results weren't quite dramatic enough to justify pursuing it further, but this was well before Spectre -- perhaps it just wasn't timed right...
