VirtualBox

Changeset 103723 in vbox for trunk/src/VBox/HostDrivers


Ignore:
Timestamp:
Mar 7, 2024 10:20:39 AM (12 months ago)
Author:
vboxsync
Message:

Linux: SUPDrvTracer.cpp: Annotate indirect jumps to instruct objtool that such jump is vouched safe for retpoline build, bugref:10617.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/SUPDrvTracer.cpp

    r103684 r103723  
    5656#include <iprt/uuid.h>
    5757
     58#if RTLNX_VER_MIN(4,15,10)
     59# include <asm/nospec-branch.h>
     60#endif
     61#if RTLNX_VER_MIN(5,17,0)
     62# include <asm/linkage.h>
     63#endif
    5864
    5965/*********************************************************************************************************************************
     
    14981504__asm__("\
    14991505            movq    g_pfnSupdrvProbeFireKernel(%rip), %rax              \n\
     1506            "
     1507#  if RTLNX_VER_MIN(4,15,10)
     1508            ANNOTATE_RETPOLINE_SAFE
     1509#  endif
     1510            " \n\
    15001511            jmp     *%rax \n\
    15011512");
     
    15031514__asm__("\
    15041515            movl    g_pfnSupdrvProbeFireKernel, %eax                    \n\
     1516            "
     1517#  if RTLNX_VER_MIN(4,15,10)
     1518            ANNOTATE_RETPOLINE_SAFE
     1519#  endif
     1520            " \n\
    15051521            jmp     *%eax \n\
    15061522");
     
    15141530        .global supdrvTracerProbeFireStub                               \n\
    15151531supdrvTracerProbeFireStub:                                              \n\
    1516         ret                                                             \n\
    1517         .size supdrvTracerProbeFireStub, . - supdrvTracerProbeFireStub  \n\
     1532        "
     1533#  if RTLNX_VER_MIN(5,17,0)
     1534        ASM_RET "\n\
     1535        "
     1536#  else
     1537        "ret \n\
     1538        "
     1539#  endif
     1540        ".size supdrvTracerProbeFireStub, . - supdrvTracerProbeFireStub  \n\
    15181541                                                                        \n\
    15191542        .previous                                                       \n\
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette