]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - arch/x86/kernel/ftrace_32.S
x86/cpu/AMD: Fix erratum 1076 (CPB bit)
[mirror_ubuntu-artful-kernel.git] / arch / x86 / kernel / ftrace_32.S
index 722a145b4139bc1072eb41cfb3e6c0b84b3ad334..ebe38b2b17e936811eb5891bc08fd653068b0d17 100644 (file)
@@ -7,6 +7,7 @@
 #include <asm/segment.h>
 #include <asm/export.h>
 #include <asm/ftrace.h>
+#include <asm/nospec-branch.h>
 
 #ifdef CC_USING_FENTRY
 # define function_hook __fentry__
@@ -196,7 +197,8 @@ ftrace_stub:
        movl    0x4(%ebp), %edx
        subl    $MCOUNT_INSN_SIZE, %eax
 
-       call    *ftrace_trace_function
+       movl    ftrace_trace_function, %ecx
+       CALL_NOSPEC %ecx
 
        popl    %edx
        popl    %ecx
@@ -240,5 +242,5 @@ return_to_handler:
        movl    %eax, %ecx
        popl    %edx
        popl    %eax
-       jmp     *%ecx
+       JMP_NOSPEC %ecx
 #endif