summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Poimboeuf <jpoimboe@redhat.com>2021-01-21 15:29:30 -0600
committerJosh Poimboeuf <jpoimboe@redhat.com>2021-01-26 11:33:02 -0600
commit82694854caa8badab7c5d3a19c0139e8b471b1d3 (patch)
tree419fb41735124660c878641966adb2f7526ce94d
parentf4b4bc10b0b85ec66f1a9bf5dddf475e6695b6d2 (diff)
downloadlinux-stable-82694854caa8badab7c5d3a19c0139e8b471b1d3.tar.gz
linux-stable-82694854caa8badab7c5d3a19c0139e8b471b1d3.tar.bz2
linux-stable-82694854caa8badab7c5d3a19c0139e8b471b1d3.zip
x86/xen/pvh: Annotate indirect branch as safe
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
-rw-r--r--arch/x86/platform/pvh/head.S2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/platform/pvh/head.S b/arch/x86/platform/pvh/head.S
index 43b4d864817e..d2ccadc247e6 100644
--- a/arch/x86/platform/pvh/head.S
+++ b/arch/x86/platform/pvh/head.S
@@ -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
@@ -105,6 +106,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 */