VirtualBox

Changeset 93653 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Feb 8, 2022 11:45:44 AM (3 years ago)
Author:
vboxsync
Message:

VMM/PDMDriver,DrvIntNet,DrvNetShaper: Properly disable all ring-0 driver stuff. [fixes] bugref:10094

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/PDMDriver.cpp

    r93652 r93653  
    17671767        {
    17681768            AssertLogRelMsgFailed(("ring-0 drivers are not supported in this VBox version!\n"));
     1769            RT_NOREF(pvInterface, cbInterface, pszSymList);
    17691770            rc = VERR_NOT_SUPPORTED;
    17701771        }
     
    18121813        {
    18131814            AssertLogRelMsgFailed(("ring-0 drivers are not supported in this VBox version!\n"));
     1815            RT_NOREF(pvInterface, cbInterface, pszSymList);
    18141816            rc = VERR_NOT_SUPPORTED;
    18151817        }
     
    19581960{
    19591961    PDMDRV_ASSERT_DRVINS(pDrvIns);
     1962#ifdef PDM_WITH_RING0_DRIVERS
    19601963    PVM pVM = pDrvIns->Internal.s.pVMR3;
     1964#endif
    19611965    LogFlow(("pdmR3DrvHlp_CallR0: caller='%s'/%d: uOperation=%#x u64Arg=%#RX64\n",
    19621966             pDrvIns->pReg->szName, pDrvIns->iInstance, uOperation, u64Arg));
     
    19711975        if (pDrvIns->pReg->fFlags & PDM_DRVREG_FLAGS_R0)
    19721976        {
     1977#ifdef PDM_WITH_RING0_DRIVERS
    19731978            char szSymbol[          sizeof("drvR0") + sizeof(pDrvIns->pReg->szName) + sizeof("ReqHandler")];
    19741979            strcat(strcat(strcpy(szSymbol, "drvR0"),         pDrvIns->pReg->szName),         "ReqHandler");
     
    19811986            else
    19821987                pfnReqHandlerR0 = NIL_RTR0PTR;
     1988#else
     1989            RT_NOREF(uOperation, u64Arg);
     1990            rc = VERR_NOT_SUPPORTED;
     1991#endif
    19831992        }
    19841993        else
    19851994            rc = VERR_ACCESS_DENIED;
    19861995    }
    1987     if (RT_LIKELY(pfnReqHandlerR0 != NIL_RTR0PTR))
    1988     {
     1996    if (RT_LIKELY(pfnReqHandlerR0 != NIL_RTR0PTR && RT_SUCCESS(rc)))
     1997    {
     1998#ifdef PDM_WITH_RING0_DRIVERS
    19891999        /*
    19902000         * Make the ring-0 call.
     
    19982008        Req.u64Arg          = u64Arg;
    19992009        rc = SUPR3CallVMMR0Ex(VMCC_GET_VMR0_FOR_CALL(pVM), NIL_VMCPUID, VMMR0_DO_PDM_DRIVER_CALL_REQ_HANDLER, 0, &Req.Hdr);
    2000     }
    2001 
    2002     LogFlow(("pdmR3DrvHlp_CallR0: caller='%s'/%d: returns %Rrc\n", pDrvIns->pReg->szName,
    2003              pDrvIns->iInstance, rc));
     2010#else
     2011        rc = VERR_NOT_SUPPORTED;
     2012#endif
     2013    }
     2014
     2015    LogFlow(("pdmR3DrvHlp_CallR0: caller='%s'/%d: returns %Rrc\n", pDrvIns->pReg->szName, pDrvIns->iInstance, rc));
    20042016    return rc;
    20052017}
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