Changeset 86224 in vbox for trunk/src/VBox/HostDrivers/Support/posix
- Timestamp:
- Sep 22, 2020 2:23:25 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/posix/SUPR3HardenedMain-posix.cpp
r85124 r86224 96 96 PFNRT pfnHook; 97 97 /** Where to store the pointer to the code into patch memory 98 * which resumes the original call. */ 99 PFNRT *ppfnRealResume; 98 * which resumes the original call. 99 * @note uintptr_t instead of PFNRT is for Clang 11. */ 100 uintptr_t *ppfnRealResume; 100 101 /** Pointer to the resolver method used on Solaris. */ 101 102 PFNSUPHARDENEDSYMRESOLVE pfnResolve; … … 156 157 static SUPHARDENEDPOSIXHOOK const g_aHooks[] = 157 158 { 158 /* pszSymbol, pfnHook, ppfnRealResume, pfnResolve */159 { "dlopen", (PFNRT)supR3HardenedPosixMonitor_Dlopen, ( PFNRT*)&g_pfnDlopenReal, supR3HardenedPosixMonitorDlopenResolve },159 /* pszSymbol, pfnHook, ppfnRealResume, pfnResolve */ 160 { "dlopen", (PFNRT)supR3HardenedPosixMonitor_Dlopen, (uintptr_t *)&g_pfnDlopenReal, supR3HardenedPosixMonitorDlopenResolve }, 160 161 #ifdef SUP_HARDENED_WITH_DLMOPEN 161 { "dlmopen", (PFNRT)supR3HardenedPosixMonitor_Dlmopen, ( PFNRT*)&g_pfnDlmopenReal, supR3HardenedPosixMonitorDlmopenResolve }162 { "dlmopen", (PFNRT)supR3HardenedPosixMonitor_Dlmopen, (uintptr_t *)&g_pfnDlmopenReal, supR3HardenedPosixMonitorDlmopenResolve } 162 163 #endif 163 164 }; … … 315 316 * @param pfnResolve The resolver to call before trying to query the start address. 316 317 */ 317 static int supR3HardenedMainPosixHookOne(const char *pszSymbol, PFNRT pfnHook, PFNRT*ppfnReal,318 static int supR3HardenedMainPosixHookOne(const char *pszSymbol, PFNRT pfnHook, uintptr_t /*PFNRT*/ *ppfnReal, 318 319 PFNSUPHARDENEDSYMRESOLVE pfnResolve) 319 320 { … … 399 400 400 401 /* Assemble the code for resuming the call.*/ 401 *ppfnReal = ( PFNRT)(uintptr_t)pbPatchMem;402 *ppfnReal = (uintptr_t)pbPatchMem; 402 403 403 404 /* Go through the instructions to patch and fixup any rip relative mov instructions. */ … … 532 533 533 534 /* Assemble the code for resuming the call.*/ 534 *ppfnReal = ( PFNRT)(uintptr_t)pbPatchMem;535 *ppfnReal = (uintptr_t)pbPatchMem; 535 536 536 537 /* Go through the instructions to patch and fixup any relative call instructions. */
Note:
See TracChangeset
for help on using the changeset viewer.