]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
x86/cpu: Fix __x86_return_thunk symbol type
authorPeter Zijlstra <peterz@infradead.org>
Mon, 14 Aug 2023 11:44:27 +0000 (13:44 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 4 Sep 2023 09:19:32 +0000 (11:19 +0200)
Commit

  fb3bd914b3ec ("x86/srso: Add a Speculative RAS Overflow mitigation")

reimplemented __x86_return_thunk with a mix of SYM_FUNC_START and
SYM_CODE_END, this is not a sane combination.

Since nothing should ever actually 'CALL' this, make it consistently
CODE.

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/20230814121148.571027074@infradead.org
CVE-2023-20569
(cherry picked from commit 77f67119004296a9b2503b377d610e08b08afc2a)
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Acked-by: Roxana Nicolescu <roxana.nicolescu@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
arch/x86/lib/retpoline.S

index 89c42410566e8edb38c900197ce61cd6d3ca729e..ead7d2b9a50f62fc502041cd01a3aa8cc109296d 100644 (file)
@@ -263,7 +263,9 @@ SYM_CODE_END(srso_safe_ret)
 SYM_FUNC_END(srso_untrain_ret)
 __EXPORT_THUNK(srso_untrain_ret)
 
-SYM_FUNC_START(__x86_return_thunk)
+SYM_CODE_START(__x86_return_thunk)
+       UNWIND_HINT_FUNC
+       ANNOTATE_NOENDBR
        ALTERNATIVE_2 "jmp __ret", "call srso_safe_ret", X86_FEATURE_SRSO, \
                        "call srso_safe_ret_alias", X86_FEATURE_SRSO_ALIAS
        int3