]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
x86/xen/pvh: Annotate indirect branch as safe
authorJosh Poimboeuf <jpoimboe@redhat.com>
Thu, 21 Jan 2021 21:29:30 +0000 (15:29 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2024 18:47:43 +0000 (19:47 +0100)
[ Upstream commit 82694854caa8badab7c5d3a19c0139e8b471b1d3 ]

This indirect jump is harmless; annotate it to keep objtool's retpoline
validation happy.

Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Juergen Gross <jgross@suse.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Link: https://lore.kernel.org/r/4797c72a258b26e06741c58ccd4a75c42db39c1d.1611263462.git.jpoimboe@redhat.com
Stable-dep-of: e8fbc0d9cab6 ("x86/pvh: Call C code via the kernel virtual mapping")
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/x86/platform/pvh/head.S

index afbf0bb252da5c5d379b38304bd0e9c41de710f7..b0490701da2ab596a063304f49a10e76da5b16a1 100644 (file)
@@ -16,6 +16,7 @@
 #include <asm/boot.h>
 #include <asm/processor-flags.h>
 #include <asm/msr.h>
+#include <asm/nospec-branch.h>
 #include <xen/interface/elfnote.h>
 
        __HEAD
@@ -103,6 +104,7 @@ SYM_CODE_START_LOCAL(pvh_start_xen)
        /* startup_64 expects boot_params in %rsi. */
        mov $_pa(pvh_bootparams), %rsi
        mov $_pa(startup_64), %rax
+       ANNOTATE_RETPOLINE_SAFE
        jmp *%rax
 
 #else /* CONFIG_X86_64 */