Origin: https://bugs.launchpad.net/ubuntu/+source/virtualbox/+bug/2053024 Author: Xu Zhen (xuzhen666) Forwarded: irc diff --git a/src/VBox/HostDrivers/Support/SUPDrvTracer.cpp b/src/VBox/HostDrivers/Support/SUPDrvTracer.cpp index 7b25b5cec..5cc50bf15 100644 --- a/src/VBox/HostDrivers/Support/SUPDrvTracer.cpp +++ b/src/VBox/HostDrivers/Support/SUPDrvTracer.cpp @@ -1476,6 +1476,8 @@ SUPR0DECL(int) SUPR0TracerDeregisterImpl(void *hMod, PSUPDRVSESSION pSession) SUPR0_EXPORT_SYMBOL(SUPR0TracerDeregisterImpl); +#include +#include /* * The probe function is a bit more fun since we need tail jump optimizating. * @@ -1495,11 +1497,13 @@ SUPR0TracerFireProbe: \n\ # if defined(RT_ARCH_AMD64) __asm__("\ movq g_pfnSupdrvProbeFireKernel(%rip), %rax \n\ + " ANNOTATE_RETPOLINE_SAFE " \n\ jmp *%rax \n\ "); # elif defined(RT_ARCH_X86) __asm__("\ movl g_pfnSupdrvProbeFireKernel, %eax \n\ + " ANNOTATE_RETPOLINE_SAFE " \n\ jmp *%eax \n\ "); # else @@ -1511,7 +1515,7 @@ __asm__("\ .type supdrvTracerProbeFireStub,@function \n\ .global supdrvTracerProbeFireStub \n\ supdrvTracerProbeFireStub: \n\ - ret \n\ + " ASM_RET " \n\ .size supdrvTracerProbeFireStub, . - supdrvTracerProbeFireStub \n\ \n\ .previous \n\