]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
x86/cpu: Cleanup the untrain mess
authorPeter Zijlstra <peterz@infradead.org>
Mon, 14 Aug 2023 11:44:34 +0000 (13:44 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Aug 2023 15:32:40 +0000 (17:32 +0200)
commit9588fd887886e12c33b109f6aec37aa1564649a0
treeab03cc0d52c2d5ae51e7573900a0beff5428fdd6
parentee621dddfe0fa20e838218331125118c8dcb85fa
x86/cpu: Cleanup the untrain mess

commit e7c25c441e9e0fa75b4c83e0b26306b702cfe90d upstream.

Since there can only be one active return_thunk, there only needs be
one (matching) untrain_ret. It fundamentally doesn't make sense to
allow multiple untrain_ret at the same time.

Fold all the 3 different untrain methods into a single (temporary)
helper stub.

Fixes: fb3bd914b3ec ("x86/srso: Add a Speculative RAS Overflow mitigation")
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/20230814121149.042774962@infradead.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/include/asm/nospec-branch.h
arch/x86/kernel/cpu/bugs.c
arch/x86/lib/retpoline.S