]> git.baikalelectronics.ru Git - kernel.git/commit
x86/speculation: Add eIBRS + Retpoline options
authorPeter Zijlstra <peterz@infradead.org>
Wed, 16 Feb 2022 19:57:01 +0000 (20:57 +0100)
committerBorislav Petkov <bp@suse.de>
Mon, 21 Feb 2022 09:21:35 +0000 (10:21 +0100)
commit5efc5731949b9261991a58db5add6131e002b325
tree406c56c0f671da6a45aa02a4694f60dd993db13d
parent04bb976c7a6030a97f83df48707ba07f5948fe20
x86/speculation: Add eIBRS + Retpoline options

Thanks to the chaps at VUsec it is now clear that eIBRS is not
sufficient, therefore allow enabling of retpolines along with eIBRS.

Add spectre_v2=eibrs, spectre_v2=eibrs,lfence and
spectre_v2=eibrs,retpoline options to explicitly pick your preferred
means of mitigation.

Since there's new mitigations there's also user visible changes in
/sys/devices/system/cpu/vulnerabilities/spectre_v2 to reflect these
new mitigations.

  [ bp: Massage commit message, trim error messages,
    do more precise eIBRS mode checking. ]

Co-developed-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Patrick Colp <patrick.colp@oracle.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/include/asm/nospec-branch.h
arch/x86/kernel/cpu/bugs.c