VirtualBox

Changeset 92705 in vbox


Ignore:
Timestamp:
Dec 2, 2021 12:56:20 PM (3 years ago)
Author:
vboxsync
Message:

SUP: Added SUPR3INIT_F_DRIVERLESS as a forced driverless option and an associated SUPR3IsDriverless(). The SUPR3INIT_F_DRIVERLESS flag requires the host specific init code to allow driverless, only done so on linux thus far. Started adjusting some of the SUPR3 APIs for driverless operation. [missing hardening flag] bugref:10138

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/sup.h

    r92697 r92705  
    12581258 * main Mac OS X application (think Resources/VirtualBoxVM.app).  */
    12591259#define SUPSECMAIN_FLAGS_LOC_OSX_HLP_APP            UINT32_C(0x00000020)
     1260/** Force driverless mode. */
     1261#define SUPSECMAIN_FLAGS_DRIVERLESS                 RT_BIT_32(8)
    12601262/** Driverless IEM-only mode is allowed, so don't fail fatally just because
    12611263 * the VBox support driver is unavailable. */
    1262 #define SUPSECMAIN_FLAGS_DRIVERLESS_IEM_ALLOWED     RT_BIT_32(8)
     1264#define SUPSECMAIN_FLAGS_DRIVERLESS_IEM_ALLOWED     RT_BIT_32(9)
    12631265#ifdef VBOX_WITH_DRIVERLESS_NEM_FALLBACK
    12641266/** Driverless NEM is a fallback posibility, so don't fail fatally just
     
    12661268 * This may imply checking NEM requirements, depending on the host.
    12671269 * @note Not supported on Windows. */
    1268 # define SUPSECMAIN_FLAGS_DRIVERLESS_NEM_FALLBACK   RT_BIT_32(9)
     1270# define SUPSECMAIN_FLAGS_DRIVERLESS_NEM_FALLBACK   RT_BIT_32(10)
    12691271#endif
    12701272
  • trunk/src/VBox/HostDrivers/Support/SUPR3HardenedMain.cpp

    r92613 r92705  
    18651865    SUPINITOP       enmWhat = kSupInitOp_Driver;
    18661866    uint32_t        fFlags  = SUPR3INIT_F_UNRESTRICTED;
     1867    if (g_fSupHardenedMain & SUPSECMAIN_FLAGS_DRIVERLESS)
     1868        fFlags |= SUPR3INIT_F_DRIVERLESS;
    18671869    if (g_fSupHardenedMain & SUPSECMAIN_FLAGS_DRIVERLESS_IEM_ALLOWED)
    18681870        fFlags |= SUPR3INIT_F_DRIVERLESS_IEM_ALLOWED;
     
    23532355    if (!(fFlags & SUPSECMAIN_FLAGS_DONT_OPEN_DEV))
    23542356    {
     2357        if (fFlags & SUPSECMAIN_FLAGS_DRIVERLESS)
     2358            fRtInit |= (SUPR3INIT_F_DRIVERLESS              << RTR3INIT_FLAGS_SUPLIB_SHIFT) | RTR3INIT_FLAGS_TRY_SUPLIB;
    23552359        if (fFlags & SUPSECMAIN_FLAGS_DRIVERLESS_IEM_ALLOWED)
    23562360            fRtInit |= (SUPR3INIT_F_DRIVERLESS_IEM_ALLOWED  << RTR3INIT_FLAGS_SUPLIB_SHIFT) | RTR3INIT_FLAGS_TRY_SUPLIB;
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