Changeset 53017 in vbox for trunk/src/VBox/HostDrivers/Support/win/SUPHardenedVerifyProcess-win.cpp
- Timestamp:
- Oct 10, 2014 1:44:08 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/win/SUPHardenedVerifyProcess-win.cpp
r52973 r53017 129 129 /** Type of verification to perform. */ 130 130 SUPHARDNTVPKIND enmKind; 131 /** Combination of SUPHARDNTVP_F_XXX. */ 132 uint32_t fFlags; 131 133 /** The result. */ 132 134 int rcResult; … … 1500 1502 "NtFreeVirtualMemory (%p LB %#zx) failed: %#x", 1501 1503 MemInfo.BaseAddress, MemInfo.RegionSize, rcNt); 1504 /* The Trend Micro sakfile.sys BSOD kludge. */ 1505 if (pThis->fFlags & SUPHARDNTVP_F_EXEC_ALLOC_REPLACE_WITH_ZERO) 1506 { 1507 pvFree = MemInfo.BaseAddress; 1508 cbFree = MemInfo.RegionSize; 1509 rcNt = NtAllocateVirtualMemory(pThis->hProcess, &pvFree, 0, &cbFree, MEM_COMMIT, PAGE_READWRITE); 1510 if (!NT_SUCCESS(rcNt)) 1511 supHardNtVpSetInfo2(pThis, VERR_SUP_VP_REPLACE_VIRTUAL_MEMORY_FAILED, 1512 "NtAllocateVirtualMemory (%p LB %#zx) failed with rcNt=%#x allocating " 1513 "replacement memory for working around buggy protection software. " 1514 "See VBoxStartup.log for more details", 1515 MemInfo.BaseAddress, MemInfo.RegionSize, rcNt); 1516 if (pvFree != MemInfo.BaseAddress) 1517 supHardNtVpSetInfo2(pThis, VERR_SUP_VP_REPLACE_VIRTUAL_MEMORY_FAILED, 1518 "We wanted NtAllocateVirtualMemory to get us %p LB %#zx, but it returned %p LB %#zx.", 1519 MemInfo.BaseAddress, MemInfo.RegionSize, pvFree, cbFree, rcNt); 1520 } 1502 1521 } 1503 1522 /* … … 2124 2143 * @param hThread A thread in the process (the caller). 2125 2144 * @param enmKind The kind of process verification to perform. 2145 * @param fFlags Valid combination of SUPHARDNTVP_F_XXX flags. 2126 2146 * @param pErrInfo Pointer to error info structure. Optional. 2127 2147 * @param pcFixes Where to return the number of fixes made during 2128 2148 * purification. Optional. 2129 2149 */ 2130 DECLHIDDEN(int) supHardenedWinVerifyProcess(HANDLE hProcess, HANDLE hThread, SUPHARDNTVPKIND enmKind, 2150 DECLHIDDEN(int) supHardenedWinVerifyProcess(HANDLE hProcess, HANDLE hThread, SUPHARDNTVPKIND enmKind, uint32_t fFlags, 2131 2151 uint32_t *pcFixes, PRTERRINFO pErrInfo) 2132 2152 { … … 2152 2172 { 2153 2173 pThis->enmKind = enmKind; 2174 pThis->fFlags = fFlags; 2154 2175 pThis->rcResult = VINF_SUCCESS; 2155 2176 pThis->hProcess = hProcess;
Note:
See TracChangeset
for help on using the changeset viewer.