VirtualBox

Changeset 94503 in vbox


Ignore:
Timestamp:
Apr 6, 2022 5:24:39 PM (3 years ago)
Author:
vboxsync
Message:

Linux: Host Drivers: SUPDrv: fix build for non-linux platforms, ​bugref:10209.

File:
1 edited

Legend:

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

    r94500 r94503  
    7474# define VBOXDRV_IOCTL_ENTRY(pvSession, uIOCtl, pvReqHdr) do { } while (0)
    7575# define VBOXDRV_IOCTL_RETURN(pvSession, uIOCtl, pvReqHdr, rcRet, rcReq) do { } while (0)
     76#endif
     77
     78#if defined(RT_OS_LINUX)
     79/* In Linux 5.18-rc1, memcpy became a wrapper which does fortify checks
     80 * before triggering __underlying_memcpy() call. We do not pass these checks here,
     81 * so bypass them for now.  */
     82# if RTLNX_VER_MIN(5,18,0)
     83#  define SUPDRV_MEMCPY __underlying_memcpy
     84# else
     85# define SUPDRV_MEMCPY  memcpy
     86# endif
     87#else
     88# define SUPDRV_MEMCPY  memcpy
    7689#endif
    7790
     
    17521765            /* execute */
    17531766            pReq->u.Out.cFunctions = RT_ELEMENTS(g_aFunctions);
    1754 
    1755             /* In 5.18.0, memcpy became a wrapper which does fortify checks
    1756              * before triggering __underlying_memcpy() call. We do not pass these checks here,
    1757              * so bypass them for now.  */
    1758 #if RTLNX_VER_MIN(5,18,0)
    1759             __underlying_memcpy(&pReq->u.Out.aFunctions[0], g_aFunctions, sizeof(g_aFunctions));
    1760 #else
    1761             memcpy(&pReq->u.Out.aFunctions[0], g_aFunctions, sizeof(g_aFunctions));
    1762 #endif
     1767            SUPDRV_MEMCPY(&pReq->u.Out.aFunctions[0], g_aFunctions, sizeof(g_aFunctions));
    17631768            pReq->Hdr.rc = VINF_SUCCESS;
    17641769            return 0;
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