I have been updating some servers to the latest patchlevels and wanted to check the security state regarding Meltdown, Spectre and Spectre-NG.
Using the current V 0.39+ of the spectre-meltdown-checker I was astonished about my findings in a VM running CentOS 7 with VMWare ESXi 6.5 (all patched up to date).
Here I found "vulnerable for Spectre 2".
Strange. That was patched months ago by using retpoline.
OK - the new check states that retpoline is not enough. But CentOS 7 is lacking RSB. So the only other remaining option is to enable IBRS.
Strangely it is not activated automatically at boot-time.
Since I do not want to write a init-script
echo 1 >/sys/kernel/debug/x86/ibrs_enabled
Which will turn on IBRS an will get rid of Spectre v2 (according to the test-results of the script).
The question is: What is the best way to enable IBRS permanently on boot?
I was not able to find an according kernel-option.