]> git.baikalelectronics.ru Git - kernel.git/commit
x86/speculation: Fix RSB filling with CONFIG_RETPOLINE=n
authorJosh Poimboeuf <jpoimboe@kernel.org>
Mon, 3 Oct 2022 13:10:20 +0000 (10:10 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Oct 2022 07:16:55 +0000 (09:16 +0200)
commitd679555ec34487e484f598eab602e91832cf3959
tree78be22db9c5c651a9933765a6a6ce85c46d8e8e0
parent0ed7cb276b349b309bcbed1750c334c5aab6d1f6
x86/speculation: Fix RSB filling with CONFIG_RETPOLINE=n

commit 5e71b41907088352f09fcf317517dfc548edc299 upstream.

If a kernel is built with CONFIG_RETPOLINE=n, but the user still wants
to mitigate Spectre v2 using IBRS or eIBRS, the RSB filling will be
silently disabled.

There's nothing retpoline-specific about RSB buffer filling.  Remove the
CONFIG_RETPOLINE guards around it.

Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/entry/entry_32.S
arch/x86/entry/entry_64.S
arch/x86/include/asm/nospec-branch.h