Linux 5.13 Brings Simplified Retpolines Handling
Written by Michael Larabel in Linux Kernel on 9 May 2021 at 08:50 AM EDT. Add A Comment
LINUX KERNEL --
In addition to work like Linux 5.13 addressing some network overhead caused by Retpolines, this next kernel's return trampoline implementation itself is seeing a simplification.

Merged as part of x86/core last week for the Linux 5.13 kernel were enabling PPIN support for Xeon Sapphire Rapids, KProbes improvements, and other minor changes plus simplifying the Retpolines implementation used by some CPUs as part of the Spectre V2 mitigations. The x86/core pull request for Linux 5.13 also re-sorts and better documents Intel's increasingly long list of different CPU cores/models.

The Retpolines work for Linux 5.13 was summed up as, "Simplify the retpolines by folding the entire thing into an
alternative now that objtool can handle alternatives with stack ops. Then, have objtool rewrite the call to the retpoline with the alternative which then will get patched at boot time.
"

This Retpolines simplification work was led by longtime kernel developer Peter Zijlstra. As part of consolidating unused bytes and other alterations to shrink the size of Retpolines, a Retpoline was reduced to 15 bytes so that four can live now in a cache line.

With the Linux 5.13 merge window ending today, it's time to start firing up more Linux 5.13 kernel benchmarks in looking for any performance changes relative to 5.12 stable.
Related News
About The Author
Author picture

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 or contacted via MichaelLarabel.com.

Popular News This Week