]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
UBUNTU: SAUCE: early/late -- annotate indirect calls in early/late initialisation...
authorAndy Whitcroft <apw@canonical.com>
Tue, 20 Mar 2018 12:50:00 +0000 (12:50 +0000)
committerAndrea Righi <andrea.righi@canonical.com>
Thu, 9 Mar 2023 14:57:21 +0000 (15:57 +0100)
BugLink: http://bugs.launchpad.net/bugs/1758856
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
arch/x86/kernel/acpi/wakeup_32.S
arch/x86/kernel/head_32.S
arch/x86/kernel/reboot.c
arch/x86/kernel/relocate_kernel_32.S
arch/x86/realmode/rm/trampoline_32.S

index cf69081073b5414700b926761180b68df5cfd6a4..7534db1d5b4ac502d8d4b9a379f322106e945946 100644 (file)
@@ -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)
 
index 67c8ed99144b7a55c4e1665992da2a69c3bec445..2ce21a735ab1bb681d7b8ae5c74f4c5701c7a8e0 100644 (file)
@@ -27,6 +27,7 @@
 #include <asm/bootparam.h>
 #include <asm/export.h>
 #include <asm/pgtable_32.h>
+#include <asm/nospec-branch.h>
 
 /* Physical address */
 #define pa(X) ((X) - __PAGE_OFFSET)
index b7eac06acc580ba1682cde6df3829f26072db543..35bd7b48dc4e39774bb5bdc35a13e8cd07d1b151 100644 (file)
@@ -32,6 +32,7 @@
 #include <asm/realmode.h>
 #include <asm/x86_init.h>
 #include <asm/efi.h>
+#include <asm/nospec-branch.h>
 
 /*
  * Power off function, if any
@@ -119,11 +120,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
index c7c4b1917336d1d95b5b998b0b065a89513287cd..d4d065b6f2f829f2acfd559d9c036115bd757c61 100644 (file)
@@ -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
index 3fad907a179f15ea64106dff118c13ec4e79b837..578e8b1e252223657d45c39989c013eff769c8d3 100644 (file)
@@ -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)