Improved Retpoline Code In The Linux 5.16 Kernel

Written by Michael Larabel in Linux Kernel on 10 November 2021 at 04:40 AM EST. 1 Comment
LINUX KERNEL
Merged last week into the Linux 5.16 kernel is improved Retpoline "return trampoline" code.

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.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week