
Phoronix readers should be very familiar with Retpolines by now as being used for Spectre Variant Two mitigations. This improved Retpoline code in Linux 5.16 as part of the "objtool/core" changes rewrites Retpolines to indirect instructions in situations where Retpolines are not enabled. There is also a change for rewriting an indirect LFENCE for the AMD handling. The x86 BPF code is also better handled around its Retpoline behavior.
The updated objtool code should see a lower memory footprint and better optimizations around the run-time patching as a result. More details via the objtool pull of the material that made it into the kernel last week.