UBUNTU: SAUCE: early/late -- annotate indirect calls in early/late initialisation code
BugLink: http://bugs.launchpad.net/bugs/1758856 Signed-off-by: Andy Whitcroft <apw@canonical.com> Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
This commit is contained in:
committed by
Paolo Pisati
parent
f7e7d26d44
commit
67128b5b2b
@@ -3,6 +3,7 @@
|
||||
#include <linux/linkage.h>
|
||||
#include <asm/segment.h>
|
||||
#include <asm/page_types.h>
|
||||
#include <asm/nospec-branch.h>
|
||||
|
||||
# Copyright 2003, 2008 Pavel Machek <pavel@suse.cz
|
||||
|
||||
@@ -37,6 +38,7 @@ SYM_CODE_START(wakeup_pmode_return)
|
||||
|
||||
# jump to place where we left off
|
||||
movl saved_eip, %eax
|
||||
ANNOTATE_RETPOLINE_SAFE
|
||||
jmp *%eax
|
||||
SYM_CODE_END(wakeup_pmode_return)
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <asm/nospec-branch.h>
|
||||
#include <asm/bootparam.h>
|
||||
#include <asm/pgtable_32.h>
|
||||
#include <asm/nospec-branch.h>
|
||||
|
||||
/* Physical address */
|
||||
#define pa(X) ((X) - __PAGE_OFFSET)
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <asm/realmode.h>
|
||||
#include <asm/x86_init.h>
|
||||
#include <asm/efi.h>
|
||||
#include <asm/nospec-branch.h>
|
||||
|
||||
/*
|
||||
* Power off function, if any
|
||||
@@ -118,11 +119,11 @@ void __noreturn machine_real_restart(unsigned int type)
|
||||
|
||||
/* Jump to the identity-mapped low memory code */
|
||||
#ifdef CONFIG_X86_32
|
||||
asm volatile("jmpl *%0" : :
|
||||
asm volatile(ANNOTATE_RETPOLINE_SAFE "jmpl *%0" : :
|
||||
"rm" (real_mode_header->machine_real_restart_asm),
|
||||
"a" (type));
|
||||
#else
|
||||
asm volatile("ljmpl *%0" : :
|
||||
asm volatile(ANNOTATE_RETPOLINE_SAFE "ljmpl *%0" : :
|
||||
"m" (real_mode_header->machine_real_restart_asm),
|
||||
"D" (type));
|
||||
#endif
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <asm/kexec.h>
|
||||
#include <asm/nospec-branch.h>
|
||||
#include <asm/processor-flags.h>
|
||||
#include <asm/nospec-branch.h>
|
||||
|
||||
/*
|
||||
* Must be relocatable PIC code callable as a C function, in particular
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <linux/linkage.h>
|
||||
#include <asm/segment.h>
|
||||
#include <asm/page_types.h>
|
||||
#include <asm/nospec-branch.h>
|
||||
#include "realmode.h"
|
||||
|
||||
.text
|
||||
@@ -59,6 +60,7 @@ SYM_CODE_END(trampoline_start)
|
||||
.section ".text32","ax"
|
||||
.code32
|
||||
SYM_CODE_START(startup_32) # note: also used from wakeup_asm.S
|
||||
ANNOTATE_RETPOLINE_SAFE
|
||||
jmp *%eax
|
||||
SYM_CODE_END(startup_32)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user