VirtualBox

Changeset 103726 in vbox


Ignore:
Timestamp:
Mar 7, 2024 10:45:05 AM (7 months ago)
Author:
vboxsync
Message:

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

Make changes specific to Linux only.

File:
1 edited

Legend:

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

    r103723 r103726  
    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
     58#if defined(RT_OS_LINUX)
     59# if RTLNX_VER_MIN(4,15,10)
     60#  include <asm/nospec-branch.h>
     61# endif /* < 4.15.10 */
     62# if RTLNX_VER_MIN(5,17,0)
     63#  include <asm/linkage.h>
     64# endif /* < 5.17.0 */
     65#endif /* !RT_OS_LINUX */
    6466
    6567/*********************************************************************************************************************************
     
    15051507            movq    g_pfnSupdrvProbeFireKernel(%rip), %rax              \n\
    15061508            "
    1507 #  if RTLNX_VER_MIN(4,15,10)
     1509#  if defined(RT_OS_LINUX)
     1510#   if RTLNX_VER_MIN(4,15,10)
    15081511            ANNOTATE_RETPOLINE_SAFE
     1512#   endif
    15091513#  endif
    15101514            " \n\
     
    15151519            movl    g_pfnSupdrvProbeFireKernel, %eax                    \n\
    15161520            "
    1517 #  if RTLNX_VER_MIN(4,15,10)
     1521#  if defined(RT_OS_LINUX)
     1522#   if RTLNX_VER_MIN(4,15,10)
    15181523            ANNOTATE_RETPOLINE_SAFE
     1524#   endif
    15191525#  endif
    15201526            " \n\
     
    15311537supdrvTracerProbeFireStub:                                              \n\
    15321538        "
     1539# if defined(RT_OS_LINUX)
    15331540#  if RTLNX_VER_MIN(5,17,0)
    15341541        ASM_RET "\n\
    15351542        "
    1536 #  else
     1543#  else /* < 5.17.0 */
    15371544        "ret \n\
    15381545        "
    1539 #  endif
     1546#  endif /* < 5.17.0 */
     1547# else /* !RT_OS_LINUX */
     1548        "ret \n\
     1549        "
     1550# endif /* !RT_OS_LINUX */
    15401551        ".size supdrvTracerProbeFireStub, . - supdrvTracerProbeFireStub  \n\
    15411552                                                                        \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