Revisiting Intel CPU bug workarounds with Linux Kernel 5.2
The impact of all the workarounds for all the Intel security is not that bad when it comes to every-day workloads like kernel compilation if you risk leaving SMT on. Turning SMT off does have a very real and noticeable impact on performance. Leaving SMT on and sticking with the kernels default settings will only add about a minute to a half-an-hour long compile job compared to turning the workarounds off with mitigations=off
This test was done using a laptop with a
Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz which has
bugs: cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds identified and exposed by the kernel in
This i7-5500U is a dual-core four-thread CPU. It is older Broadwell technology which means that the real difference in seconds is higher and more visible than it would be on a newer and faster CPU. Also, we don't have any newer and faster Intel CPUs anymore.
Compiling Linux Kernel 5.2 with GCC 9.1.1 using no kernel parameters and the default kernel settings, which in this kernel is equal to
mitigations=auto according to
admin-guide/kernel-parameters.txt, results in a compile-time of 28 minutes and 9 seconds.
mitigations=off for maximum risk, excitement and performance shaves kernel compile time on this system down to 27 minutes and 25 seconds. That's just 43 seconds on a half-an-hour compile job. It really isn't all that noticeable.
mds=full,nosmt for maximum security on this CPU increases the compile-time to 33 minutes and 16 seconds. That is almost six minutes slower than
The obvious conclusion is that there really isn't that much difference between
mitigations=off and the default
mitigations=auto setting. But there is a huge difference between leaving SMT on and
The stock kernel defaults are probably fine unless you're a financial institution or a cloud provider. The risks entailed by leaving SMT on are much bigger if random people/customers are able to run whatever they want on a shared CPU. They are not that high on a casually used home laptop or a gaming rig with more RGB lights than a Christmas tree.
published 2019-07-09 - last edited 2019-07-09
Latest News Headlines
- Firefox will do monthly releases starting next year
- Richard Stallman has resigned from his position as president of the Free Software Foundation
- Linux Kernel 5.3 is released
- Linux Kernel 5.3 rc8 is released and 5.3 final is coming soon
- F-Droid 1.7.1 available
- Qt Creator 4.10.0 released with Android targets for CMake and Qbs projects
- Mesa 19.2 rc2 released with support for Navi and "unreleased" AMD chip
- Warzone 2100 3.3 released with better graphics and high resolution monitor support
- Git v2.23.0 is released and available
See the more archive for news headlines