Changeset 85121 in vbox for trunk/src/VBox/HostDrivers/Support
- Timestamp:
- Jul 8, 2020 7:33:26 PM (4 years ago)
- Location:
- trunk/src/VBox/HostDrivers/Support
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/SUPDrvIDC.h
r82968 r85121 268 268 */ 269 269 /** @todo move this and change to function proto */ 270 typedef DECLCALLBACK (int) FNSUPDRVIDCENTRY(PSUPDRVSESSION pSession, uint32_t uReq, void *pvReq, uint32_t cbReq);270 typedef DECLCALLBACKTYPE(int, FNSUPDRVIDCENTRY,(PSUPDRVSESSION pSession, uint32_t uReq, void *pvReq, uint32_t cbReq)); 271 271 272 272 /** @} */ -
trunk/src/VBox/HostDrivers/Support/SUPDrvIOC.h
r82968 r85121 358 358 * @param hMod Image handle for use in APIs. 359 359 */ 360 typedef DECLCALLBACK (int) FNR0MODULEINIT(void *hMod);360 typedef DECLCALLBACKTYPE(int, FNR0MODULEINIT,(void *hMod)); 361 361 /** Pointer to a FNR0MODULEINIT(). */ 362 362 typedef R0PTRTYPE(FNR0MODULEINIT *) PFNR0MODULEINIT; … … 368 368 * @param hMod Image handle for use in APIs. 369 369 */ 370 typedef DECLCALLBACK (void) FNR0MODULETERM(void *hMod);370 typedef DECLCALLBACKTYPE(void, FNR0MODULETERM,(void *hMod)); 371 371 /** Pointer to a FNR0MODULETERM(). */ 372 372 typedef R0PTRTYPE(FNR0MODULETERM *) PFNR0MODULETERM; -
trunk/src/VBox/HostDrivers/Support/SUPLib.cpp
r82968 r85121 83 83 * Structures and Typedefs * 84 84 *********************************************************************************************************************************/ 85 typedef DECLCALLBACK (int) FNCALLVMMR0(PVMR0 pVMR0, unsigned uOperation, void *pvArg);85 typedef DECLCALLBACKTYPE(int, FNCALLVMMR0,(PVMR0 pVMR0, unsigned uOperation, void *pvArg)); 86 86 typedef FNCALLVMMR0 *PFNCALLVMMR0; 87 87 -
trunk/src/VBox/HostDrivers/Support/SUPLibInternal.h
r85095 r85121 311 311 312 312 /** @copydoc supR3PreInit */ 313 typedef DECLCALLBACK (int) FNSUPR3PREINIT(PSUPPREINITDATA pPreInitData, uint32_t fFlags);313 typedef DECLCALLBACKTYPE(int, FNSUPR3PREINIT,(PSUPPREINITDATA pPreInitData, uint32_t fFlags)); 314 314 /** Pointer to supR3PreInit. */ 315 315 typedef FNSUPR3PREINIT *PFNSUPR3PREINIT; -
trunk/src/VBox/HostDrivers/Support/SUPLibLdr.cpp
r82968 r85121 65 65 * Structures and Typedefs * 66 66 *********************************************************************************************************************************/ 67 typedef DECLCALLBACK (int) FNCALLVMMR0(PVMR0 pVMR0, unsigned uOperation, void *pvArg);67 typedef DECLCALLBACKTYPE(int, FNCALLVMMR0,(PVMR0 pVMR0, unsigned uOperation, void *pvArg)); 68 68 typedef FNCALLVMMR0 *PFNCALLVMMR0; 69 69 -
trunk/src/VBox/HostDrivers/Support/SUPR0IdcClientStubs.c
r82968 r85121 81 81 SUPR0DECL(void *) SUPR0ObjRegister(PSUPDRVSESSION pSession, SUPDRVOBJTYPE enmType, PFNSUPDRVDESTRUCTOR pfnDestructor, void *pvUser1, void *pvUser2) 82 82 { 83 static DECLCALLBACKPTR(void *, s_pfn )(PSUPDRVSESSION /* pSession */, SUPDRVOBJTYPE /* enmType */, PFNSUPDRVDESTRUCTOR /* pfnDestructor */, void * /* pvUser1 */, void * /* pvUser2 */);84 DECLCALLBACKPTR(void *, pfn )(PSUPDRVSESSION /* pSession */, SUPDRVOBJTYPE /* enmType */, PFNSUPDRVDESTRUCTOR /* pfnDestructor */, void * /* pvUser1 */, void * /* pvUser2 */);83 static DECLCALLBACKPTR(void *, s_pfn,(PSUPDRVSESSION /* pSession */, SUPDRVOBJTYPE /* enmType */, PFNSUPDRVDESTRUCTOR /* pfnDestructor */, void * /* pvUser1 */, void * /* pvUser2 */)); 84 DECLCALLBACKPTR(void *, pfn,(PSUPDRVSESSION /* pSession */, SUPDRVOBJTYPE /* enmType */, PFNSUPDRVDESTRUCTOR /* pfnDestructor */, void * /* pvUser1 */, void * /* pvUser2 */)); 85 85 pfn = s_pfn; 86 86 if (!pfn) … … 98 98 SUPR0DECL(int) SUPR0ObjAddRef(void *pvObj, PSUPDRVSESSION pSession) 99 99 { 100 static DECLCALLBACKPTR(int, s_pfn )(void * /* pvObj */, PSUPDRVSESSION /* pSession */);101 DECLCALLBACKPTR(int, pfn )(void * /* pvObj */, PSUPDRVSESSION /* pSession */);100 static DECLCALLBACKPTR(int, s_pfn,(void * /* pvObj */, PSUPDRVSESSION /* pSession */)); 101 DECLCALLBACKPTR(int, pfn,(void * /* pvObj */, PSUPDRVSESSION /* pSession */)); 102 102 pfn = s_pfn; 103 103 if (!pfn) … … 115 115 SUPR0DECL(int) SUPR0ObjRelease(void *pvObj, PSUPDRVSESSION pSession) 116 116 { 117 static DECLCALLBACKPTR(int, s_pfn )(void * /* pvObj */, PSUPDRVSESSION /* pSession */);118 DECLCALLBACKPTR(int, pfn )(void * /* pvObj */, PSUPDRVSESSION /* pSession */);117 static DECLCALLBACKPTR(int, s_pfn,(void * /* pvObj */, PSUPDRVSESSION /* pSession */)); 118 DECLCALLBACKPTR(int, pfn,(void * /* pvObj */, PSUPDRVSESSION /* pSession */)); 119 119 pfn = s_pfn; 120 120 if (!pfn) … … 132 132 SUPR0DECL(int) SUPR0ObjVerifyAccess(void *pvObj, PSUPDRVSESSION pSession, const char *pszObjName) 133 133 { 134 static DECLCALLBACKPTR(int, s_pfn )(void * /* pvObj */, PSUPDRVSESSION /* pSession */, const char * /* pszObjName */);135 DECLCALLBACKPTR(int, pfn )(void * /* pvObj */, PSUPDRVSESSION /* pSession */, const char * /* pszObjName */);134 static DECLCALLBACKPTR(int, s_pfn,(void * /* pvObj */, PSUPDRVSESSION /* pSession */, const char * /* pszObjName */)); 135 DECLCALLBACKPTR(int, pfn,(void * /* pvObj */, PSUPDRVSESSION /* pSession */, const char * /* pszObjName */)); 136 136 pfn = s_pfn; 137 137 if (!pfn) -
trunk/src/VBox/HostDrivers/Support/SUPR3HardenedMain.cpp
r85095 r85121 485 485 *********************************************************************************************************************************/ 486 486 /** @see RTR3InitEx */ 487 typedef DECLCALLBACK (int) FNRTR3INITEX(uint32_t iVersion, uint32_t fFlags, int cArgs,488 char **papszArgs, const char *pszProgramPath);487 typedef DECLCALLBACKTYPE(int, FNRTR3INITEX,(uint32_t iVersion, uint32_t fFlags, int cArgs, 488 char **papszArgs, const char *pszProgramPath)); 489 489 typedef FNRTR3INITEX *PFNRTR3INITEX; 490 490 491 491 /** @see RTLogRelPrintf */ 492 typedef DECLCALLBACK (void) FNRTLOGRELPRINTF(const char *pszFormat, ...);492 typedef DECLCALLBACKTYPE(void, FNRTLOGRELPRINTF,(const char *pszFormat, ...)); 493 493 typedef FNRTLOGRELPRINTF *PFNRTLOGRELPRINTF; 494 494 -
trunk/src/VBox/HostDrivers/Support/SUPSvc.cpp
r82968 r85121 73 73 * @param ppvInstance Where to store the instance handle. 74 74 */ 75 DECLCALLBACKMEMBER(int, pfnCreate)(void **ppvInstance);75 DECLCALLBACKMEMBER(int, pfnCreate,(void **ppvInstance)); 76 76 77 77 /** … … 81 81 * @param pvInstance The instance handle. 82 82 */ 83 DECLCALLBACKMEMBER(void, pfnStart )(void *pvInstance);83 DECLCALLBACKMEMBER(void, pfnStart,(void *pvInstance)); 84 84 85 85 /** … … 92 92 * @param pvInstance The instance handle. 93 93 */ 94 DECLCALLBACKMEMBER(int, pfnTryStop)(void *pvInstance);94 DECLCALLBACKMEMBER(int, pfnTryStop,(void *pvInstance)); 95 95 96 96 /** … … 100 100 * @param fRunning Whether the service is running or not. 101 101 */ 102 DECLCALLBACKMEMBER(void, pfnStopAndDestroy )(void *pvInstance, bool fRunning);102 DECLCALLBACKMEMBER(void, pfnStopAndDestroy,(void *pvInstance, bool fRunning)); 103 103 } SUPSVCSERVICE; 104 104 /** Pointer to a service descriptor. */ -
trunk/src/VBox/HostDrivers/Support/posix/SUPR3HardenedMain-posix.cpp
r82968 r85121 82 82 * to patch the lazy loader trampoline function, but rather the real function! 83 83 */ 84 typedef DECLCALLBACK (void) FNSUPHARDENEDSYMRESOLVE(void);84 typedef DECLCALLBACKTYPE(void, FNSUPHARDENEDSYMRESOLVE,(void)); 85 85 /** Pointer to FNSUPHARDENEDSYMRESOLVE. */ 86 86 typedef FNSUPHARDENEDSYMRESOLVE *PFNSUPHARDENEDSYMRESOLVE; -
trunk/src/VBox/HostDrivers/Support/win/SUPHardenedVerify-win.h
r82968 r85121 44 44 #ifndef SUP_CERTIFICATES_ONLY 45 45 # ifdef RT_OS_WINDOWS 46 DECL HIDDEN(int) supHardenedWinInitImageVerifier(PRTERRINFO pErrInfo);47 DECL HIDDEN(void) supHardenedWinTermImageVerifier(void);48 DECL HIDDEN(void) supR3HardenedWinVerifyCacheScheduleImports(RTLDRMOD hLdrMod, PCRTUTF16 pwszName);49 DECL HIDDEN(void) supR3HardenedWinVerifyCachePreload(PCRTUTF16 pwszName);46 DECL_HIDDEN_NOTHROW(int) supHardenedWinInitImageVerifier(PRTERRINFO pErrInfo); 47 DECL_HIDDEN_NOTHROW(void) supHardenedWinTermImageVerifier(void); 48 DECL_HIDDEN_NOTHROW(void) supR3HardenedWinVerifyCacheScheduleImports(RTLDRMOD hLdrMod, PCRTUTF16 pwszName); 49 DECL_HIDDEN_NOTHROW(void) supR3HardenedWinVerifyCachePreload(PCRTUTF16 pwszName); 50 50 51 51 … … 76 76 #define SUPHARDNTVP_F_EXEC_ALLOC_REPLACE_WITH_RW RT_BIT_32(0) 77 77 /** @} */ 78 DECL HIDDEN(int) supHardenedWinVerifyProcess(HANDLE hProcess, HANDLE hThread, SUPHARDNTVPKIND enmKind, uint32_t fFlags,79 uint32_t *pcFixes, PRTERRINFO pErrInfo);80 DECL HIDDEN(int) supHardNtVpThread(HANDLE hProcess, HANDLE hThread, PRTERRINFO pErrInfo);81 DECL HIDDEN(int) supHardNtVpDebugger(HANDLE hProcess, PRTERRINFO pErrInfo);82 83 DECL HIDDEN(bool) supHardViUtf16PathIsEqualEx(PCRTUTF16 pawcLeft, size_t cwcLeft, const char *pszRight);84 DECL HIDDEN(bool) supHardViUniStrPathStartsWithUniStr(UNICODE_STRING const *pUniStrLeft,85 UNICODE_STRING const *pUniStrRight, bool fCheckSlash);86 DECL HIDDEN(bool) supHardViUtf16PathStartsWithEx(PCRTUTF16 pwszLeft, uint32_t cwcLeft,87 PCRTUTF16 pwszRight, uint32_t cwcRight, bool fCheckSlash);88 DECL HIDDEN(bool) supHardViIsAppPatchDir(PCRTUTF16 pwszPath, uint32_t cwcName);78 DECL_HIDDEN_NOTHROW(int) supHardenedWinVerifyProcess(HANDLE hProcess, HANDLE hThread, SUPHARDNTVPKIND enmKind, 79 uint32_t fFlags, uint32_t *pcFixes, PRTERRINFO pErrInfo); 80 DECL_HIDDEN_NOTHROW(int) supHardNtVpThread(HANDLE hProcess, HANDLE hThread, PRTERRINFO pErrInfo); 81 DECL_HIDDEN_NOTHROW(int) supHardNtVpDebugger(HANDLE hProcess, PRTERRINFO pErrInfo); 82 83 DECL_HIDDEN_NOTHROW(bool) supHardViUtf16PathIsEqualEx(PCRTUTF16 pawcLeft, size_t cwcLeft, const char *pszRight); 84 DECL_HIDDEN_NOTHROW(bool) supHardViUniStrPathStartsWithUniStr(UNICODE_STRING const *pUniStrLeft, 85 UNICODE_STRING const *pUniStrRight, bool fCheckSlash); 86 DECL_HIDDEN_NOTHROW(bool) supHardViUtf16PathStartsWithEx(PCRTUTF16 pwszLeft, uint32_t cwcLeft, 87 PCRTUTF16 pwszRight, uint32_t cwcRight, bool fCheckSlash); 88 DECL_HIDDEN_NOTHROW(bool) supHardViIsAppPatchDir(PCRTUTF16 pwszPath, uint32_t cwcName); 89 89 90 90 … … 114 114 /** Pointer to an SUP image verifier loader reader instance. */ 115 115 typedef SUPHNTVIRDR *PSUPHNTVIRDR; 116 DECL HIDDEN(int) supHardNtViRdrCreate(HANDLE hFile, PCRTUTF16 pwszName, uint32_t fFlags, PSUPHNTVIRDR *ppNtViRdr);117 DECL HIDDEN(bool) supHardenedWinIsWinVerifyTrustCallable(void);118 DECL HIDDEN(int) supHardenedWinVerifyImageTrust(HANDLE hFile, PCRTUTF16 pwszName, uint32_t fFlags, int rc,119 bool *pfWinVerifyTrust, PRTERRINFO pErrInfo);120 DECL HIDDEN(int) supHardenedWinVerifyImageByHandle(HANDLE hFile, PCRTUTF16 pwszName, uint32_t fFlags, bool fAvoidWinVerifyTrust,121 bool *pfWinVerifyTrust, PRTERRINFO pErrInfo);122 DECL HIDDEN(int) supHardenedWinVerifyImageByHandleNoName(HANDLE hFile, uint32_t fFlags, PRTERRINFO pErrInfo);123 DECL HIDDEN(int) supHardenedWinVerifyImageByLdrMod(RTLDRMOD hLdrMod, PCRTUTF16 pwszName, PSUPHNTVIRDR pNtViRdr,124 bool fAvoidWinVerifyTrust, bool *pfWinVerifyTrust, PRTERRINFO pErrInfo);116 DECL_HIDDEN_NOTHROW(int) supHardNtViRdrCreate(HANDLE hFile, PCRTUTF16 pwszName, uint32_t fFlags, PSUPHNTVIRDR *ppNtViRdr); 117 DECL_HIDDEN_NOTHROW(bool) supHardenedWinIsWinVerifyTrustCallable(void); 118 DECL_HIDDEN_NOTHROW(int) supHardenedWinVerifyImageTrust(HANDLE hFile, PCRTUTF16 pwszName, uint32_t fFlags, int rc, 119 bool *pfWinVerifyTrust, PRTERRINFO pErrInfo); 120 DECL_HIDDEN_NOTHROW(int) supHardenedWinVerifyImageByHandle(HANDLE hFile, PCRTUTF16 pwszName, uint32_t fFlags, 121 bool fAvoidWinVerifyTrust, bool *pfWinVerifyTrust, PRTERRINFO pErrInfo); 122 DECL_HIDDEN_NOTHROW(int) supHardenedWinVerifyImageByHandleNoName(HANDLE hFile, uint32_t fFlags, PRTERRINFO pErrInfo); 123 DECL_HIDDEN_NOTHROW(int) supHardenedWinVerifyImageByLdrMod(RTLDRMOD hLdrMod, PCRTUTF16 pwszName, PSUPHNTVIRDR pNtViRdr, 124 bool fAvoidWinVerifyTrust, bool *pfWinVerifyTrust, PRTERRINFO pErrInfo); 125 125 /** @name SUPHNTVI_F_XXX - Flags for supHardenedWinVerifyImageByHandle. 126 126 * @{ */ … … 176 176 /** Pointer to a loader cache entry. */ 177 177 typedef SUPHNTLDRCACHEENTRY *PSUPHNTLDRCACHEENTRY; 178 DECL HIDDEN(int) supHardNtLdrCacheOpen(const char *pszName, PSUPHNTLDRCACHEENTRY *ppEntry, PRTERRINFO pErrInfo);179 DECL HIDDEN(int) supHardNtLdrCacheEntryVerify(PSUPHNTLDRCACHEENTRY pEntry, PCRTUTF16 pwszName, PRTERRINFO pErrInfo);180 DECL HIDDEN(int) supHardNtLdrCacheEntryGetBits(PSUPHNTLDRCACHEENTRY pEntry, uint8_t **ppbBits, RTLDRADDR uBaseAddress,181 PFNRTLDRIMPORT pfnGetImport, void *pvUser, PRTERRINFO pErrInfo);178 DECL_HIDDEN_NOTHROW(int) supHardNtLdrCacheOpen(const char *pszName, PSUPHNTLDRCACHEENTRY *ppEntry, PRTERRINFO pErrInfo); 179 DECL_HIDDEN_NOTHROW(int) supHardNtLdrCacheEntryVerify(PSUPHNTLDRCACHEENTRY pEntry, PCRTUTF16 pwszName, PRTERRINFO pErrInfo); 180 DECL_HIDDEN_NOTHROW(int) supHardNtLdrCacheEntryGetBits(PSUPHNTLDRCACHEENTRY pEntry, uint8_t **ppbBits, RTLDRADDR uBaseAddress, 181 PFNRTLDRIMPORT pfnGetImport, void *pvUser, PRTERRINFO pErrInfo); 182 182 183 183 … … 189 189 } SUPHARDNTSYSROOTDIR; 190 190 191 DECL HIDDEN(int) supHardNtGetSystemRootDir(void *pvBuf, uint32_t cbBuf, SUPHARDNTSYSROOTDIR enmDir, PRTERRINFO pErrInfo);191 DECL_HIDDEN_NOTHROW(int) supHardNtGetSystemRootDir(void *pvBuf, uint32_t cbBuf, SUPHARDNTSYSROOTDIR enmDir, PRTERRINFO pErrInfo); 192 192 193 193 # ifndef SUPHNTVI_NO_NT_STUFF … … 214 214 # ifdef IN_RING0 215 215 /** Pointer to NtQueryVirtualMemory. */ 216 typedef NTSTATUS (NTAPI *PFNNTQUERYVIRTUALMEMORY)(HANDLE, void const *, MEMORY_INFORMATION_CLASS, PVOID, SIZE_T, PSIZE_T); 216 typedef DECLCALLBACKPTR_EX(NTSTATUS, NTAPI, PFNNTQUERYVIRTUALMEMORY,(HANDLE, void const *, MEMORY_INFORMATION_CLASS, 217 PVOID, SIZE_T, PSIZE_T)); 217 218 extern PFNNTQUERYVIRTUALMEMORY g_pfnNtQueryVirtualMemory; 218 219 # endif -
trunk/src/VBox/HostDrivers/Support/win/SUPHardenedVerifyImage-win.cpp
r84398 r85121 85 85 86 86 #ifdef IN_RING3 87 typedef LONG (WINAPI * PFNWINVERIFYTRUST)(HWND hwnd, GUID const *pgActionID, PVOID pWVTData); 88 typedef BOOL (WINAPI * PFNCRYPTCATADMINACQUIRECONTEXT)(HCATADMIN *phCatAdmin, const GUID *pGuidSubsystem, DWORD dwFlags); 89 typedef BOOL (WINAPI * PFNCRYPTCATADMINACQUIRECONTEXT2)(HCATADMIN *phCatAdmin, const GUID *pGuidSubsystem, PCWSTR pwszHashAlgorithm, 90 struct _CERT_STRONG_SIGN_PARA const *pStrongHashPolicy, DWORD dwFlags); 91 typedef BOOL (WINAPI * PFNCRYPTCATADMINCALCHASHFROMFILEHANDLE)(HANDLE hFile, DWORD *pcbHash, BYTE *pbHash, DWORD dwFlags); 92 typedef BOOL (WINAPI * PFNCRYPTCATADMINCALCHASHFROMFILEHANDLE2)(HCATADMIN hCatAdmin, HANDLE hFile, DWORD *pcbHash, 93 BYTE *pbHash, DWORD dwFlags); 94 typedef HCATINFO (WINAPI *PFNCRYPTCATADMINENUMCATALOGFROMHASH)(HCATADMIN hCatAdmin, BYTE *pbHash, DWORD cbHash, 95 DWORD dwFlags, HCATINFO *phPrevCatInfo); 96 typedef BOOL (WINAPI * PFNCRYPTCATADMINRELEASECATALOGCONTEXT)(HCATADMIN hCatAdmin, HCATINFO hCatInfo, DWORD dwFlags); 97 typedef BOOL (WINAPI * PFNCRYPTCATDADMINRELEASECONTEXT)(HCATADMIN hCatAdmin, DWORD dwFlags); 98 typedef BOOL (WINAPI * PFNCRYPTCATCATALOGINFOFROMCONTEXT)(HCATINFO hCatInfo, CATALOG_INFO *psCatInfo, DWORD dwFlags); 99 100 typedef HCERTSTORE (WINAPI *PFNCERTOPENSTORE)(PCSTR pszStoreProvider, DWORD dwEncodingType, HCRYPTPROV_LEGACY hCryptProv, 101 DWORD dwFlags, const void *pvParam); 102 typedef BOOL (WINAPI *PFNCERTCLOSESTORE)(HCERTSTORE hCertStore, DWORD dwFlags); 103 typedef PCCERT_CONTEXT (WINAPI *PFNCERTENUMCERTIFICATESINSTORE)(HCERTSTORE hCertStore, PCCERT_CONTEXT pPrevCertContext); 104 105 typedef NTSTATUS (WINAPI *PFNBCRYPTOPENALGORTIHMPROVIDER)(BCRYPT_ALG_HANDLE *phAlgo, PCWSTR pwszAlgoId, 106 PCWSTR pwszImpl, DWORD dwFlags); 87 typedef DECLCALLBACKPTR_EX(LONG, WINAPI, PFNWINVERIFYTRUST,(HWND hwnd, GUID const *pgActionID, PVOID pWVTData)); 88 typedef DECLCALLBACKPTR_EX(BOOL, WINAPI, PFNCRYPTCATADMINACQUIRECONTEXT,(HCATADMIN *phCatAdmin, const GUID *pGuidSubsystem, 89 DWORD dwFlags)); 90 typedef DECLCALLBACKPTR_EX(BOOL, WINAPI, PFNCRYPTCATADMINACQUIRECONTEXT2,(HCATADMIN *phCatAdmin, const GUID *pGuidSubsystem, 91 PCWSTR pwszHashAlgorithm, 92 struct _CERT_STRONG_SIGN_PARA const *pStrongHashPolicy, 93 DWORD dwFlags)); 94 typedef DECLCALLBACKPTR_EX(BOOL, WINAPI, PFNCRYPTCATADMINCALCHASHFROMFILEHANDLE,(HANDLE hFile, DWORD *pcbHash, BYTE *pbHash, 95 DWORD dwFlags)); 96 typedef DECLCALLBACKPTR_EX(BOOL, WINAPI, PFNCRYPTCATADMINCALCHASHFROMFILEHANDLE2,(HCATADMIN hCatAdmin, HANDLE hFile, 97 DWORD *pcbHash, BYTE *pbHash, DWORD dwFlags)); 98 typedef DECLCALLBACKPTR_EX(HCATINFO, WINAPI, PFNCRYPTCATADMINENUMCATALOGFROMHASH,(HCATADMIN hCatAdmin, BYTE *pbHash, DWORD cbHash, 99 DWORD dwFlags, HCATINFO *phPrevCatInfo)); 100 typedef DECLCALLBACKPTR_EX(BOOL, WINAPI, PFNCRYPTCATADMINRELEASECATALOGCONTEXT,(HCATADMIN hCatAdmin, HCATINFO hCatInfo, 101 DWORD dwFlags)); 102 typedef DECLCALLBACKPTR_EX(BOOL, WINAPI, PFNCRYPTCATDADMINRELEASECONTEXT,(HCATADMIN hCatAdmin, DWORD dwFlags)); 103 typedef DECLCALLBACKPTR_EX(BOOL, WINAPI, PFNCRYPTCATCATALOGINFOFROMCONTEXT,(HCATINFO hCatInfo, CATALOG_INFO *psCatInfo, 104 DWORD dwFlags)); 105 106 typedef DECLCALLBACKPTR_EX(HCERTSTORE, WINAPI, PFNCERTOPENSTORE,(PCSTR pszStoreProvider, DWORD dwEncodingType, 107 HCRYPTPROV_LEGACY hCryptProv, DWORD dwFlags, const void *pvParam)); 108 typedef DECLCALLBACKPTR_EX(BOOL, WINAPI, PFNCERTCLOSESTORE,(HCERTSTORE hCertStore, DWORD dwFlags)); 109 typedef DECLCALLBACKPTR_EX(PCCERT_CONTEXT, WINAPI, PFNCERTENUMCERTIFICATESINSTORE,(HCERTSTORE hCertStore, 110 PCCERT_CONTEXT pPrevCertContext)); 111 112 typedef DECLCALLBACKPTR_EX(NTSTATUS, WINAPI, PFNBCRYPTOPENALGORTIHMPROVIDER,(BCRYPT_ALG_HANDLE *phAlgo, PCWSTR pwszAlgoId, 113 PCWSTR pwszImpl, DWORD dwFlags)); 107 114 #endif 108 115 … … 363 370 * @param ppNtViRdr Where to store the reader instance on success. 364 371 */ 365 DECL HIDDEN(int) supHardNtViRdrCreate(HANDLE hFile, PCRTUTF16 pwszName, uint32_t fFlags, PSUPHNTVIRDR *ppNtViRdr)372 DECL_HIDDEN_NOTHROW(int) supHardNtViRdrCreate(HANDLE hFile, PCRTUTF16 pwszName, uint32_t fFlags, PSUPHNTVIRDR *ppNtViRdr) 366 373 { 367 374 /* … … 526 533 * @param pszRight The ascii string. 527 534 */ 528 DECL HIDDEN(bool) supHardViUtf16PathIsEqualEx(PCRTUTF16 pawcLeft, size_t cwcLeft, const char *pszRight)535 DECL_HIDDEN_NOTHROW(bool) supHardViUtf16PathIsEqualEx(PCRTUTF16 pawcLeft, size_t cwcLeft, const char *pszRight) 529 536 { 530 537 for (;;) … … 641 648 * @param fCheckSlash Check for a slash following the prefix. 642 649 */ 643 DECL HIDDEN(bool) supHardViUtf16PathStartsWithEx(PCRTUTF16 pwszLeft, uint32_t cwcLeft,644 PCRTUTF16 pwszRight, uint32_t cwcRight, bool fCheckSlash)650 DECL_HIDDEN_NOTHROW(bool) supHardViUtf16PathStartsWithEx(PCRTUTF16 pwszLeft, uint32_t cwcLeft, 651 PCRTUTF16 pwszRight, uint32_t cwcRight, bool fCheckSlash) RT_NOTHROW_DEF 645 652 { 646 653 if (cwcLeft < cwcRight || !cwcRight || !pwszRight) … … 685 692 * @param fCheckSlash Check for a slash following the prefix. 686 693 */ 687 DECL HIDDEN(bool) supHardViUniStrPathStartsWithUniStr(UNICODE_STRING const *pUniStrLeft, UNICODE_STRING const *pUniStrRight,688 bool fCheckSlash)694 DECL_HIDDEN_NOTHROW(bool) supHardViUniStrPathStartsWithUniStr(UNICODE_STRING const *pUniStrLeft, 695 UNICODE_STRING const *pUniStrRight, bool fCheckSlash) RT_NOTHROW_DEF 689 696 { 690 697 return supHardViUtf16PathStartsWithEx(pUniStrLeft->Buffer, pUniStrLeft->Length / sizeof(WCHAR), … … 719 726 * @param pwszPath The path to examine. 720 727 */ 721 DECL HIDDEN(bool) supHardViIsAppPatchDir(PCRTUTF16 pwszPath, uint32_t cwcName)728 DECL_HIDDEN_NOTHROW(bool) supHardViIsAppPatchDir(PCRTUTF16 pwszPath, uint32_t cwcName) 722 729 { 723 730 uint32_t cwcWinDir = (g_System32NtPath.UniStr.Length - sizeof(L"System32")) / sizeof(WCHAR); … … 1159 1166 * @param pErrInfo Pointer to error info structure. Optional. 1160 1167 */ 1161 DECL HIDDEN(int) supHardenedWinVerifyImageByLdrMod(RTLDRMOD hLdrMod, PCRTUTF16 pwszName, PSUPHNTVIRDR pNtViRdr,1162 bool fAvoidWinVerifyTrust, bool *pfWinVerifyTrust, PRTERRINFO pErrInfo)1168 DECL_HIDDEN_NOTHROW(int) supHardenedWinVerifyImageByLdrMod(RTLDRMOD hLdrMod, PCRTUTF16 pwszName, PSUPHNTVIRDR pNtViRdr, 1169 bool fAvoidWinVerifyTrust, bool *pfWinVerifyTrust, PRTERRINFO pErrInfo) 1163 1170 { 1164 1171 if (pfWinVerifyTrust) … … 1358 1365 * @param pErrInfo Pointer to error info structure. Optional. 1359 1366 */ 1360 DECL HIDDEN(int) supHardenedWinVerifyImageByHandle(HANDLE hFile, PCRTUTF16 pwszName, uint32_t fFlags, bool fAvoidWinVerifyTrust,1361 bool *pfWinVerifyTrust, PRTERRINFO pErrInfo)1367 DECL_HIDDEN_NOTHROW(int) supHardenedWinVerifyImageByHandle(HANDLE hFile, PCRTUTF16 pwszName, uint32_t fFlags, 1368 bool fAvoidWinVerifyTrust, bool *pfWinVerifyTrust, PRTERRINFO pErrInfo) 1362 1369 { 1363 1370 /* … … 1405 1412 * @param pErrInfo Pointer to error info structure. Optional. 1406 1413 */ 1407 DECL HIDDEN(int) supHardenedWinVerifyImageByHandleNoName(HANDLE hFile, uint32_t fFlags, PRTERRINFO pErrInfo)1414 DECL_HIDDEN_NOTHROW(int) supHardenedWinVerifyImageByHandleNoName(HANDLE hFile, uint32_t fFlags, PRTERRINFO pErrInfo) 1408 1415 { 1409 1416 /* … … 1448 1455 * @param pErrInfo Pointer to error info structure. Optional. 1449 1456 */ 1450 DECL HIDDEN(int) supHardNtGetSystemRootDir(void *pvBuf, uint32_t cbBuf, SUPHARDNTSYSROOTDIR enmDir, PRTERRINFO pErrInfo)1457 DECL_HIDDEN_NOTHROW(int) supHardNtGetSystemRootDir(void *pvBuf, uint32_t cbBuf, SUPHARDNTSYSROOTDIR enmDir, PRTERRINFO pErrInfo) 1451 1458 { 1452 1459 HANDLE hFile = RTNT_INVALID_HANDLE_VALUE; … … 1793 1800 * @param pErrInfo Where to return extended error info. Optional. 1794 1801 */ 1795 DECL HIDDEN(int) supHardenedWinInitImageVerifier(PRTERRINFO pErrInfo)1802 DECL_HIDDEN_NOTHROW(int) supHardenedWinInitImageVerifier(PRTERRINFO pErrInfo) 1796 1803 { 1797 1804 AssertReturn(!RTCrX509Certificate_IsPresent(&g_BuildX509Cert), VERR_WRONG_ORDER); … … 1884 1891 * Releases resources allocated by supHardenedWinInitImageVerifier. 1885 1892 */ 1886 DECL HIDDEN(void) supHardenedWinTermImageVerifier(void)1893 DECL_HIDDEN_NOTHROW(void) supHardenedWinTermImageVerifier(void) 1887 1894 { 1888 1895 if (RTCrX509Certificate_IsPresent(&g_BuildX509Cert)) … … 2049 2056 * @param fMandatory Whether the library is mandatory. 2050 2057 */ 2051 DECL HIDDEN(HMODULE) supR3HardenedWinLoadSystem32Dll(const char *pszName, bool fMandatory)2058 DECL_HIDDEN_NOTHROW(HMODULE) supR3HardenedWinLoadSystem32Dll(const char *pszName, bool fMandatory) 2052 2059 { 2053 2060 WCHAR wszName[200+60]; … … 2163 2170 * @param pszProgName The program name. 2164 2171 */ 2165 DECL HIDDEN(void) supR3HardenedWinResolveVerifyTrustApiAndHookThreadCreation(const char *pszProgName)2172 DECL_HIDDEN_NOTHROW(void) supR3HardenedWinResolveVerifyTrustApiAndHookThreadCreation(const char *pszProgName) 2166 2173 { 2167 2174 # ifdef IN_SUP_HARDENED_R3 … … 2769 2776 * @param pErrInfo Pointer to error info structure. Optional. 2770 2777 */ 2771 DECL HIDDEN(int) supHardenedWinVerifyImageTrust(HANDLE hFile, PCRTUTF16 pwszName, uint32_t fFlags, int rc,2772 bool *pfWinVerifyTrust, PRTERRINFO pErrInfo)2778 DECL_HIDDEN_NOTHROW(int) supHardenedWinVerifyImageTrust(HANDLE hFile, PCRTUTF16 pwszName, uint32_t fFlags, int rc, 2779 bool *pfWinVerifyTrust, PRTERRINFO pErrInfo) 2773 2780 { 2774 2781 if (pfWinVerifyTrust) … … 2880 2887 * @returns true if callable on current thread, false if not. 2881 2888 */ 2882 DECL HIDDEN(bool) supHardenedWinIsWinVerifyTrustCallable(void)2889 DECL_HIDDEN_NOTHROW(bool) supHardenedWinIsWinVerifyTrustCallable(void) 2883 2890 { 2884 2891 return g_pfnWinVerifyTrust != NULL … … 2894 2901 * Called from suplibHardenedWindowsMain and suplibOsInit. 2895 2902 */ 2896 DECL HIDDEN(void) supR3HardenedWinInitVersion(bool fEarly)2903 DECL_HIDDEN_NOTHROW(void) supR3HardenedWinInitVersion(bool fEarly) 2897 2904 { 2898 2905 /* -
trunk/src/VBox/HostDrivers/Support/win/SUPR3HardenedMain-win.cpp
r84394 r85121 413 413 static NTSTATUS supR3HardenedScreenImage(HANDLE hFile, bool fImage, bool fIgnoreArch, PULONG pfAccess, PULONG pfProtect, 414 414 bool *pfCallRealApi, const char *pszCaller, bool fAvoidWinVerifyTrust, 415 bool *pfQuiet) ;415 bool *pfQuiet) RT_NOTHROW_PROTO; 416 416 static void supR3HardenedWinRegisterDllNotificationCallback(void); 417 static void supR3HardenedWinReInstallHooks(bool fFirst) ;417 static void supR3HardenedWinReInstallHooks(bool fFirst) RT_NOTHROW_PROTO; 418 418 DECLASM(void) supR3HardenedEarlyProcessInitThunk(void); 419 419 DECLASM(void) supR3HardenedMonitor_KiUserApcDispatcher(void); … … 556 556 * @param pIndexNumber where to return the index number. 557 557 */ 558 static bool supR3HardenedWinVerifyCacheGetIndexNumber(HANDLE hFile, PLARGE_INTEGER pIndexNumber) 558 static bool supR3HardenedWinVerifyCacheGetIndexNumber(HANDLE hFile, PLARGE_INTEGER pIndexNumber) RT_NOTHROW_DEF 559 559 { 560 560 IO_STATUS_BLOCK Ios = RTNT_IO_STATUS_BLOCK_INITIALIZER; … … 576 576 * @param pUniStr String to hash. 577 577 */ 578 static uint32_t supR3HardenedWinVerifyCacheHashPath(PCUNICODE_STRING pUniStr) 578 static uint32_t supR3HardenedWinVerifyCacheHashPath(PCUNICODE_STRING pUniStr) RT_NOTHROW_DEF 579 579 { 580 580 uint32_t uHash = 0; … … 603 603 * @param pszName The import name (UTF-8). 604 604 */ 605 static uint32_t supR3HardenedWinVerifyCacheHashDirAndFile(PCRTUTF16 pawcDir, uint32_t cwcDir, const char *pszName) 605 static uint32_t supR3HardenedWinVerifyCacheHashDirAndFile(PCRTUTF16 pawcDir, uint32_t cwcDir, const char *pszName) RT_NOTHROW_DEF 606 606 { 607 607 uint32_t uHash = 0; … … 635 635 * @param cwcToCompare The number of chars to compare. 636 636 */ 637 static bool supR3HardenedWinVerifyCacheIsMatch(PCRTUTF16 pawcLeft, PCRTUTF16 pawcRight, uint32_t cwcToCompare) 637 static bool supR3HardenedWinVerifyCacheIsMatch(PCRTUTF16 pawcLeft, PCRTUTF16 pawcRight, uint32_t cwcToCompare) RT_NOTHROW_DEF 638 638 { 639 639 /* Try a quick memory compare first. */ … … 671 671 */ 672 672 static void supR3HardenedWinVerifyCacheInsert(PCUNICODE_STRING pUniStr, HANDLE hFile, int rc, 673 bool fWinVerifyTrust, uint32_t fFlags) 673 bool fWinVerifyTrust, uint32_t fFlags) RT_NOTHROW_DEF 674 674 { 675 675 /* … … 734 734 * @param hFile The file handle. 735 735 */ 736 static PVERIFIERCACHEENTRY supR3HardenedWinVerifyCacheLookup(PCUNICODE_STRING pUniStr, HANDLE hFile) 736 static PVERIFIERCACHEENTRY supR3HardenedWinVerifyCacheLookup(PCUNICODE_STRING pUniStr, HANDLE hFile) RT_NOTHROW_DEF 737 737 { 738 738 PRTUTF16 const pwszPath = pUniStr->Buffer; … … 1203 1203 * @param rc VBox status code. 1204 1204 */ 1205 static NTSTATUS supR3HardenedScreenImageCalcStatus(int rc) 1205 static NTSTATUS supR3HardenedScreenImageCalcStatus(int rc) RT_NOTHROW_DEF 1206 1206 { 1207 1207 /* This seems to be what LdrLoadDll returns when loading a 32-bit DLL into … … 1240 1240 * lots of times already). Optional. 1241 1241 */ 1242 static NTSTATUS supR3HardenedScreenImage(HANDLE hFile, bool fImage, bool fIgnoreArch, PULONG pfAccess, PULONG pfProtect, 1243 bool *pfCallRealApi, const char *pszCaller, bool fAvoidWinVerifyTrust, bool *pfQuiet) 1242 static NTSTATUS 1243 supR3HardenedScreenImage(HANDLE hFile, bool fImage, bool fIgnoreArch, PULONG pfAccess, PULONG pfProtect, 1244 bool *pfCallRealApi, const char *pszCaller, bool fAvoidWinVerifyTrust, bool *pfQuiet) RT_NOTHROW_DEF 1244 1245 { 1245 1246 *pfCallRealApi = false; … … 2358 2359 * @remarks The loader lock is held when we're called, at least on Windows 7. 2359 2360 */ 2360 static VOID CALLBACK supR3HardenedDllNotificationCallback(ULONG ulReason, PCLDR_DLL_NOTIFICATION_DATA pData, PVOID pvUser) 2361 static VOID CALLBACK 2362 supR3HardenedDllNotificationCallback(ULONG ulReason, PCLDR_DLL_NOTIFICATION_DATA pData, PVOID pvUser) RT_NOTHROW_DEF 2361 2363 { 2362 2364 NOREF(pvUser); … … 2766 2768 * @returns true if we're positive we're alone, false if not. 2767 2769 */ 2768 static bool supR3HardenedWinAmIAlone(void) 2770 static bool supR3HardenedWinAmIAlone(void) RT_NOTHROW_DEF 2769 2771 { 2770 2772 ULONG fAmIAlone = 0; … … 2787 2789 * @param fNewProt The new protection. 2788 2790 */ 2789 static NTSTATUS supR3HardenedWinProtectMemory(PVOID pvMem, SIZE_T cbMem, ULONG fNewProt) 2791 static NTSTATUS supR3HardenedWinProtectMemory(PVOID pvMem, SIZE_T cbMem, ULONG fNewProt) RT_NOTHROW_DEF 2790 2792 { 2791 2793 ULONG fOldProt = 0; … … 2797 2799 * Installs or reinstalls the NTDLL patches. 2798 2800 */ 2799 static void supR3HardenedWinReInstallHooks(bool fFirstCall) 2801 static void supR3HardenedWinReInstallHooks(bool fFirstCall) RT_NOTHROW_DEF 2800 2802 { 2801 2803 struct
Note:
See TracChangeset
for help on using the changeset viewer.