You can do
cat /sys/devices/system/cpu/vulnerabilities/spectre_v2
and if you don't have a compiler that supports the retpoline mitigations, you'll get:
Vulnerable: Minimal generic ASM retpoline
because only the assembly code (not the C code) will have the retpoline mitigation. So keep that in mind.
I guess that is phrased incorrectly, and should read ”if this kernel wasn't compiled with a compiler that supports the retpoline mitigations”, as checking whether I have one, even if limited to the boot device, wouldn’t be fast, and quite convoluted to do from the kernel.
2 comments
[ 2.9 ms ] story [ 20.0 ms ] thread