x86/srso: Fix return thunks in generated code
stable inclusion from stable-v5.10.189 commit 4873939c0e1cec2fd04a38ddf2c03a05e4eeb7ef category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/I7RQ67 CVE: CVE-2023-20569 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=4873939c0e1cec2fd04a38ddf2c03a05e4eeb7ef -------------------------------- Upstream commit: 238ec850 Set X86_FEATURE_RETHUNK when enabling the SRSO mitigation so that generated code (e.g., ftrace, static call, eBPF) generates "jmp __x86_return_thunk" instead of RET. [ bp: Add a comment. ] Fixes: fb3bd914 ("x86/srso: Add a Speculative RAS Overflow mitigation") Signed-off-by:Josh Poimboeuf <jpoimboe@kernel.org> Signed-off-by:
Borislav Petkov (AMD) <bp@alien8.de> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by:
Jialin Zhang <zhangjialin11@huawei.com>
Loading
Please sign in to comment