VirtualBox

Ignore:
Timestamp:
Jul 26, 2014 11:22:44 AM (10 years ago)
Author:
vboxsync
Message:

SUP,LDR: Changed RTLdrGetBits to allow not resolving imports. Combined the memory and image purification code with the process validation code, adding a validation kind/mode parameter. The process verfication code now checks that code sections are unmodified. Had to add a self purification run before hooking NtCreateSection to undo a weird kernel32 change that avast made (making GetBinaryTypeW specify write thru when opening a file). So, VM startup is now even slower thanks to avast.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/ldr/ldrEx.cpp

    r51794 r52204  
    221221 * @param   BaseAddress     The base address.
    222222 * @param   pfnGetImport    Callback function for resolving imports one by one.
     223 *                          If this is NULL, imports will not be resolved.
    223224 * @param   pvUser          User argument for the callback.
    224225 * @remark  Not supported for RTLdrLoad() images.
     
    233234     */
    234235    AssertMsgReturn(rtldrIsValid(hLdrMod), ("hLdrMod=%p\n", hLdrMod), VERR_INVALID_HANDLE);
    235     AssertMsgReturn(VALID_PTR(pvBits), ("pvBits=%p\n", pvBits), VERR_INVALID_PARAMETER);
    236     AssertMsgReturn(VALID_PTR(pfnGetImport), ("pfnGetImport=%p\n", pfnGetImport), VERR_INVALID_PARAMETER);
     236    AssertPtrReturn(pvBits, VERR_INVALID_POINTER);
     237    AssertPtrNullReturn(pfnGetImport, VERR_INVALID_POINTER);
    237238    PRTLDRMODINTERNAL pMod = (PRTLDRMODINTERNAL)hLdrMod;
    238239    AssertMsgReturn(pMod->eState == LDR_STATE_OPENED, ("eState=%d\n", pMod->eState), VERR_WRONG_ORDER);
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