Changeset 85093 in vbox for trunk/src/VBox/HostDrivers
- Timestamp:
- Jul 7, 2020 6:23:08 PM (4 years ago)
- Location:
- trunk/src/VBox/HostDrivers/Support
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/SUPLibInternal.h
r83033 r85093 112 112 #if defined(IN_SUP_HARDENED_R3) && defined(RT_OS_WINDOWS) 113 113 # define SUP_HARDENED_NEED_CRT_FUNCTIONS 114 DECL HIDDEN(int) suplibHardenedMemComp(void const *pvDst, const void *pvSrc, size_t cbToComp);115 DECL HIDDEN(void *) suplibHardenedMemCopy(void *pvDst, const void *pvSrc, size_t cbToCopy);116 DECL HIDDEN(void *) suplibHardenedMemSet(void *pvDst, int ch, size_t cbToSet);117 DECL HIDDEN(char *) suplibHardenedStrCopy(char *pszDst, const char *pszSrc);118 DECL HIDDEN(size_t) suplibHardenedStrLen(const char *psz);119 DECL HIDDEN(char *) suplibHardenedStrCat(char *pszDst, const char *pszSrc);120 DECL HIDDEN(int) suplibHardenedStrCmp(const char *psz1, const char *psz2);121 DECL HIDDEN(int) suplibHardenedStrNCmp(const char *psz1, const char *psz2, size_t cchMax);114 DECL_HIDDEN_NOTHROW(int) suplibHardenedMemComp(void const *pvDst, const void *pvSrc, size_t cbToComp); 115 DECL_HIDDEN_NOTHROW(void *) suplibHardenedMemCopy(void *pvDst, const void *pvSrc, size_t cbToCopy); 116 DECL_HIDDEN_NOTHROW(void *) suplibHardenedMemSet(void *pvDst, int ch, size_t cbToSet); 117 DECL_HIDDEN_NOTHROW(char *) suplibHardenedStrCopy(char *pszDst, const char *pszSrc); 118 DECL_HIDDEN_NOTHROW(size_t) suplibHardenedStrLen(const char *psz); 119 DECL_HIDDEN_NOTHROW(char *) suplibHardenedStrCat(char *pszDst, const char *pszSrc); 120 DECL_HIDDEN_NOTHROW(int) suplibHardenedStrCmp(const char *psz1, const char *psz2); 121 DECL_HIDDEN_NOTHROW(int) suplibHardenedStrNCmp(const char *psz1, const char *psz2, size_t cchMax); 122 122 #else 123 123 # undef SUP_HARDENED_NEED_CRT_FUNCTIONS … … 131 131 # define suplibHardenedStrNCmp strncmp 132 132 #endif 133 DECLNORETURN(void) suplibHardenedExit(RTEXITCODE rcExit) ;134 DECL HIDDEN(void) suplibHardenedPrintF(const char *pszFormat, ...);135 DECL HIDDEN(void) suplibHardenedPrintFV(const char *pszFormat, va_list va);133 DECLNORETURN(void) suplibHardenedExit(RTEXITCODE rcExit) RT_NO_THROW_PROTO; 134 DECL_HIDDEN_NOTHROW(void) suplibHardenedPrintF(const char *pszFormat, ...) RT_NO_THROW_PROTO; 135 DECL_HIDDEN_NOTHROW(void) suplibHardenedPrintFV(const char *pszFormat, va_list va) RT_NO_THROW_PROTO; 136 136 137 137 /** @} */ … … 381 381 * @param fFlags The SUPR3HardenedMain flags. 382 382 */ 383 DECL EXPORT(int) supR3PreInit(PSUPPREINITDATA pPreInitData, uint32_t fFlags);383 DECL_NOTHROW(DECLEXPORT(int)) supR3PreInit(PSUPPREINITDATA pPreInitData, uint32_t fFlags); 384 384 385 385 386 386 /** @copydoc RTPathAppPrivateNoArch */ 387 DECL HIDDEN(int) supR3HardenedPathAppPrivateNoArch(char *pszPath, size_t cchPath);387 DECL_HIDDEN_NOTHROW(int) supR3HardenedPathAppPrivateNoArch(char *pszPath, size_t cchPath); 388 388 /** @copydoc RTPathAppPrivateArch */ 389 DECL HIDDEN(int) supR3HardenedPathAppPrivateArch(char *pszPath, size_t cchPath);389 DECL_HIDDEN_NOTHROW(int) supR3HardenedPathAppPrivateArch(char *pszPath, size_t cchPath); 390 390 /** @copydoc RTPathSharedLibs */ 391 DECL HIDDEN(int) supR3HardenedPathAppSharedLibs(char *pszPath, size_t cchPath);391 DECL_HIDDEN_NOTHROW(int) supR3HardenedPathAppSharedLibs(char *pszPath, size_t cchPath); 392 392 /** @copydoc RTPathAppDocs */ 393 DECL HIDDEN(int) supR3HardenedPathAppDocs(char *pszPath, size_t cchPath);393 DECL_HIDDEN_NOTHROW(int) supR3HardenedPathAppDocs(char *pszPath, size_t cchPath); 394 394 /** @copydoc RTPathExecDir */ 395 DECL HIDDEN(int) supR3HardenedPathAppBin(char *pszPath, size_t cchPath);395 DECL_HIDDEN_NOTHROW(int) supR3HardenedPathAppBin(char *pszPath, size_t cchPath); 396 396 /** @copydoc RTPathFilename */ 397 DECL HIDDEN(char *) supR3HardenedPathFilename(const char *pszPath);397 DECL_HIDDEN_NOTHROW(char *) supR3HardenedPathFilename(const char *pszPath); 398 398 399 399 /** 400 400 * Display a fatal error and try call TrustedError or quit. 401 401 */ 402 DECL_NO_RETURN(DECL HIDDEN(void)) supR3HardenedFatalMsgV(const char *pszWhere, SUPINITOP enmWhat, int rc,403 const char *pszMsgFmt, va_list va);402 DECL_NO_RETURN(DECL_HIDDEN_NOTHROW(void)) supR3HardenedFatalMsgV(const char *pszWhere, SUPINITOP enmWhat, int rc, 403 const char *pszMsgFmt, va_list va) RT_NO_THROW_PROTO; 404 404 405 405 /** 406 406 * Display a fatal error and try call TrustedError or quit. 407 407 */ 408 DECL_NO_RETURN(DECL HIDDEN(void)) supR3HardenedFatalMsg(const char *pszWhere, SUPINITOP enmWhat, int rc,409 const char *pszMsgFmt, ...);408 DECL_NO_RETURN(DECL_HIDDEN_NOTHROW(void)) supR3HardenedFatalMsg(const char *pszWhere, SUPINITOP enmWhat, int rc, 409 const char *pszMsgFmt, ...) RT_NO_THROW_PROTO; 410 410 411 411 /** 412 412 * Display a fatal error and quit. 413 413 */ 414 DECL_NO_RETURN(DECL HIDDEN(void)) supR3HardenedFatalV(const char *pszFormat, va_list va);414 DECL_NO_RETURN(DECL_HIDDEN_NOTHROW(void)) supR3HardenedFatalV(const char *pszFormat, va_list va) RT_NO_THROW_PROTO; 415 415 416 416 /** 417 417 * Display a fatal error and quit. 418 418 */ 419 DECL_NO_RETURN(DECL HIDDEN(void)) supR3HardenedFatal(const char *pszFormat, ...);419 DECL_NO_RETURN(DECL_HIDDEN_NOTHROW(void)) supR3HardenedFatal(const char *pszFormat, ...) RT_NO_THROW_PROTO; 420 420 421 421 /** 422 422 * Display an error which may or may not be fatal. 423 423 */ 424 DECL HIDDEN(int) supR3HardenedErrorV(int rc, bool fFatal, const char *pszFormat, va_list va);424 DECL_HIDDEN_NOTHROW(int) supR3HardenedErrorV(int rc, bool fFatal, const char *pszFormat, va_list va) RT_NO_THROW_PROTO; 425 425 426 426 /** 427 427 * Display an error which may or may not be fatal. 428 428 */ 429 DECL HIDDEN(int) supR3HardenedError(int rc, bool fFatal, const char *pszFormat, ...);429 DECL_HIDDEN_NOTHROW(int) supR3HardenedError(int rc, bool fFatal, const char *pszFormat, ...) RT_NO_THROW_PROTO; 430 430 431 431 /** 432 432 * Open any startup log file specified in the argument. 433 433 */ 434 DECL HIDDEN(void) supR3HardenedOpenLog(int *pcArgs, char **papszArgs);434 DECL_HIDDEN_NOTHROW(void) supR3HardenedOpenLog(int *pcArgs, char **papszArgs) RT_NO_THROW_PROTO; 435 435 436 436 /** 437 437 * Write to the startup log file. 438 438 */ 439 DECL HIDDEN(void) supR3HardenedLogV(const char *pszFormat, va_list va);439 DECL_HIDDEN_NOTHROW(void) supR3HardenedLogV(const char *pszFormat, va_list va) RT_NO_THROW_PROTO; 440 440 441 441 /** 442 442 * Write to the startup log file. 443 443 */ 444 DECL HIDDEN(void) supR3HardenedLog(const char *pszFormat, ...);444 DECL_HIDDEN_NOTHROW(void) supR3HardenedLog(const char *pszFormat, ...) RT_NO_THROW_PROTO; 445 445 446 446 /** 447 447 * Flushes the log file. 448 448 */ 449 DECL HIDDEN(void) supR3HardenedLogFlush(void);450 451 452 DECL HIDDEN(int)supR3HardenedVerifyAll(bool fFatal, const char *pszProgName, const char *pszExePath, uint32_t fMainFlags);453 DECL HIDDEN(int)supR3HardenedVerifyFixedDir(SUPINSTDIR enmDir, bool fFatal, PCSUPINSTFILE pFile);454 DECL HIDDEN(int)supR3HardenedVerifyFixedFile(const char *pszFilename, bool fFatal);455 DECL HIDDEN(int)supR3HardenedVerifyDir(const char *pszDirPath, bool fRecursive, bool fCheckFiles, PRTERRINFO pErrInfo);456 DECL HIDDEN(int)supR3HardenedVerifyFile(const char *pszFilename, RTHCUINTPTR hNativeFile, bool fMaybe3rdParty,457 PRTERRINFO pErrInfo);449 DECL_HIDDEN_NOTHROW(void) supR3HardenedLogFlush(void) RT_NO_THROW_PROTO; 450 451 452 DECL_HIDDEN_NOTHROW(int) supR3HardenedVerifyAll(bool fFatal, const char *pszProgName, const char *pszExePath, uint32_t fMainFlags); 453 DECL_HIDDEN_NOTHROW(int) supR3HardenedVerifyFixedDir(SUPINSTDIR enmDir, bool fFatal, PCSUPINSTFILE pFile); 454 DECL_HIDDEN_NOTHROW(int) supR3HardenedVerifyFixedFile(const char *pszFilename, bool fFatal); 455 DECL_HIDDEN_NOTHROW(int) supR3HardenedVerifyDir(const char *pszDirPath, bool fRecursive, bool fCheckFiles, PRTERRINFO pErrInfo); 456 DECL_HIDDEN_NOTHROW(int) supR3HardenedVerifyFile(const char *pszFilename, RTHCUINTPTR hNativeFile, bool fMaybe3rdParty, 457 PRTERRINFO pErrInfo); 458 458 #if defined(RT_OS_DARWIN) || defined(RT_OS_LINUX) 459 DECL HIDDEN(int) supR3HardenedVerifyFileFollowSymlinks(const char *pszFilename, RTHCUINTPTR hNativeFile, bool fMaybe3rdParty,460 PRTERRINFO pErrInfo);461 #endif 462 DECL HIDDEN(void)supR3HardenedGetPreInitData(PSUPPREINITDATA pPreInitData);463 DECL HIDDEN(int)supR3HardenedRecvPreInitData(PCSUPPREINITDATA pPreInitData);459 DECL_HIDDEN_NOTHROW(int) supR3HardenedVerifyFileFollowSymlinks(const char *pszFilename, RTHCUINTPTR hNativeFile, 460 bool fMaybe3rdParty, PRTERRINFO pErrInfo); 461 #endif 462 DECL_HIDDEN_NOTHROW(void) supR3HardenedGetPreInitData(PSUPPREINITDATA pPreInitData); 463 DECL_HIDDEN_NOTHROW(int) supR3HardenedRecvPreInitData(PCSUPPREINITDATA pPreInitData); 464 464 465 465 #ifdef RT_OS_WINDOWS 466 DECL HIDDEN(void)supR3HardenedWinInit(uint32_t fFlags, bool fAvastKludge);467 DECL HIDDEN(void)supR3HardenedWinInitAppBin(uint32_t fFlags);468 DECL HIDDEN(void)supR3HardenedWinInitVersion(bool fEarlyInit);469 DECL HIDDEN(void)supR3HardenedWinInitImports(void);470 DECL HIDDEN(void)supR3HardenedWinModifyDllSearchPath(uint32_t fFlags, const char *pszAppBinPath);466 DECL_HIDDEN_NOTHROW(void) supR3HardenedWinInit(uint32_t fFlags, bool fAvastKludge); 467 DECL_HIDDEN_NOTHROW(void) supR3HardenedWinInitAppBin(uint32_t fFlags); 468 DECL_HIDDEN_NOTHROW(void) supR3HardenedWinInitVersion(bool fEarlyInit); 469 DECL_HIDDEN_NOTHROW(void) supR3HardenedWinInitImports(void); 470 DECL_HIDDEN_NOTHROW(void) supR3HardenedWinModifyDllSearchPath(uint32_t fFlags, const char *pszAppBinPath); 471 471 # ifdef IPRT_INCLUDED_nt_nt_h 472 DECL HIDDEN(void)supR3HardenedWinGetVeryEarlyImports(uintptr_t uNtDllAddr,473 PFNNTWAITFORSINGLEOBJECT *ppfnNtWaitForSingleObject,474 PFNNTSETEVENT *ppfnNtSetEvent);472 DECL_HIDDEN_NOTHROW(void) supR3HardenedWinGetVeryEarlyImports(uintptr_t uNtDllAddr, 473 PFNNTWAITFORSINGLEOBJECT *ppfnNtWaitForSingleObject, 474 PFNNTSETEVENT *ppfnNtSetEvent); 475 475 # endif 476 DECL HIDDEN(void)supR3HardenedWinInitImportsEarly(uintptr_t uNtDllAddr);477 DECL HIDDEN(void)supR3HardenedWinInitSyscalls(bool fReportErrors, PRTERRINFO pErrInfo);478 DECL HIDDEN(PFNRT)supR3HardenedWinGetRealDllSymbol(const char *pszDll, const char *pszProcedure);479 DECL HIDDEN(void)supR3HardenedWinEnableThreadCreation(void);480 DECL HIDDEN(void)supR3HardenedWinResolveVerifyTrustApiAndHookThreadCreation(const char *pszProgName);481 DECL HIDDEN(void)supR3HardenedWinFlushLoaderCache();482 DECL HIDDEN(bool)supR3HardenedWinIsReSpawnNeeded(int iWhich, int cArgs, char **papszArgs);483 DECL HIDDEN(int)supR3HardenedWinReSpawn(int iWhich);476 DECL_HIDDEN_NOTHROW(void) supR3HardenedWinInitImportsEarly(uintptr_t uNtDllAddr); 477 DECL_HIDDEN_NOTHROW(void) supR3HardenedWinInitSyscalls(bool fReportErrors, PRTERRINFO pErrInfo); 478 DECL_HIDDEN_NOTHROW(PFNRT) supR3HardenedWinGetRealDllSymbol(const char *pszDll, const char *pszProcedure); 479 DECL_HIDDEN_NOTHROW(void) supR3HardenedWinEnableThreadCreation(void); 480 DECL_HIDDEN_NOTHROW(void) supR3HardenedWinResolveVerifyTrustApiAndHookThreadCreation(const char *pszProgName); 481 DECL_HIDDEN_NOTHROW(void) supR3HardenedWinFlushLoaderCache(); 482 DECL_HIDDEN_NOTHROW(bool) supR3HardenedWinIsReSpawnNeeded(int iWhich, int cArgs, char **papszArgs); 483 DECL_HIDDEN_NOTHROW(int) supR3HardenedWinReSpawn(int iWhich); 484 484 # ifdef _WINDEF_ 485 DECL HIDDEN(void)supR3HardenedWinCreateParentWatcherThread(HMODULE hVBoxRT);485 DECL_HIDDEN_NOTHROW(void) supR3HardenedWinCreateParentWatcherThread(HMODULE hVBoxRT); 486 486 # endif 487 DECL HIDDEN(void *)supR3HardenedWinLoadLibrary(const char *pszName, bool fSystem32Only, uint32_t fMainFlags);487 DECL_HIDDEN_NOTHROW(void *) supR3HardenedWinLoadLibrary(const char *pszName, bool fSystem32Only, uint32_t fMainFlags); 488 488 extern RTUTF16 g_wszSupLibHardenedExePath[1024]; 489 489 # ifdef RTPATH_MAX 490 490 extern char g_szSupLibHardenedExePath[RTPATH_MAX]; 491 491 # endif 492 DECL HIDDEN(void)supR3HardenedWinCompactHeaps(void);493 DECL HIDDEN(void)supR3HardenedMainOpenDevice(void);494 DECL HIDDEN(char *)supR3HardenedWinReadErrorInfoDevice(char *pszErrorInfo, size_t cbErrorInfo, const char *pszPrefix);495 DECL HIDDEN(void)supR3HardenedWinReportErrorToParent(const char *pszWhere, SUPINITOP enmWhat, int rc,492 DECL_HIDDEN_NOTHROW(void) supR3HardenedWinCompactHeaps(void); 493 DECL_HIDDEN_NOTHROW(void) supR3HardenedMainOpenDevice(void); 494 DECL_HIDDEN_NOTHROW(char *) supR3HardenedWinReadErrorInfoDevice(char *pszErrorInfo, size_t cbErrorInfo, const char *pszPrefix); 495 DECL_HIDDEN_NOTHROW(void) supR3HardenedWinReportErrorToParent(const char *pszWhere, SUPINITOP enmWhat, int rc, 496 496 const char *pszFormat, va_list va); 497 497 #else /* !RT_OS_WINDOWS */ 498 DECL HIDDEN(void)supR3HardenedPosixInit(void);498 DECL_HIDDEN_NOTHROW(void) supR3HardenedPosixInit(void); 499 499 #endif /* !RT_OS_WINDOWS */ 500 500 501 SUPR3DECL(int) supR3PageLock(void *pvStart, size_t cPages, PSUPPAGE paPages);502 SUPR3DECL(int) supR3PageUnlock(void *pvStart);501 SUPR3DECL(int) supR3PageLock(void *pvStart, size_t cPages, PSUPPAGE paPages); 502 SUPR3DECL(int) supR3PageUnlock(void *pvStart); 503 503 504 504 RT_C_DECLS_END -
trunk/src/VBox/HostDrivers/Support/SUPR3HardenedIPRT.cpp
r82968 r85093 45 45 * @copydoc RTPathFilename 46 46 */ 47 DECL HIDDEN(char *) supR3HardenedPathFilename(const char *pszPath)47 DECL_HIDDEN_NOTHROW(char *) supR3HardenedPathFilename(const char *pszPath) 48 48 { 49 49 return RTPathFilename(pszPath); … … 54 54 * @copydoc RTPathAppPrivateNoArch 55 55 */ 56 DECL HIDDEN(int) supR3HardenedPathAppPrivateNoArch(char *pszPath, size_t cchPath)56 DECL_HIDDEN_NOTHROW(int) supR3HardenedPathAppPrivateNoArch(char *pszPath, size_t cchPath) 57 57 { 58 58 return RTPathAppPrivateNoArch(pszPath, cchPath); … … 63 63 * @copydoc RTPathAppPrivateArch 64 64 */ 65 DECL HIDDEN(int) supR3HardenedPathAppPrivateArch(char *pszPath, size_t cchPath)65 DECL_HIDDEN_NOTHROW(int) supR3HardenedPathAppPrivateArch(char *pszPath, size_t cchPath) 66 66 { 67 67 return RTPathAppPrivateArch(pszPath, cchPath); … … 72 72 * @copydoc RTPathSharedLibs 73 73 */ 74 DECL HIDDEN(int) supR3HardenedPathAppSharedLibs(char *pszPath, size_t cchPath)74 DECL_HIDDEN_NOTHROW(int) supR3HardenedPathAppSharedLibs(char *pszPath, size_t cchPath) 75 75 { 76 76 return RTPathSharedLibs(pszPath, cchPath); … … 81 81 * @copydoc RTPathAppDocs 82 82 */ 83 DECL HIDDEN(int) supR3HardenedPathAppDocs(char *pszPath, size_t cchPath)83 DECL_HIDDEN_NOTHROW(int) supR3HardenedPathAppDocs(char *pszPath, size_t cchPath) 84 84 { 85 85 return RTPathAppDocs(pszPath, cchPath); … … 90 90 * @copydoc RTPathExecDir 91 91 */ 92 DECL HIDDEN(int) supR3HardenedPathAppBin(char *pszPath, size_t cchPath)92 DECL_HIDDEN_NOTHROW(int) supR3HardenedPathAppBin(char *pszPath, size_t cchPath) 93 93 { 94 94 return RTPathExecDir(pszPath, cchPath); … … 96 96 97 97 98 DECL_NO_RETURN(DECL HIDDEN(void)) supR3HardenedFatalMsgV(const char *pszWhere, SUPINITOP enmWhat, int rc,99 const char *pszMsgFmt, va_list va)98 DECL_NO_RETURN(DECL_HIDDEN_NOTHROW(void)) supR3HardenedFatalMsgV(const char *pszWhere, SUPINITOP enmWhat, int rc, 99 const char *pszMsgFmt, va_list va) 100 100 { 101 101 va_list vaCopy; … … 107 107 108 108 109 DECL_NO_RETURN(DECL HIDDEN(void)) supR3HardenedFatalMsg(const char *pszWhere, SUPINITOP enmWhat, int rc,110 const char *pszMsgFmt, ...)109 DECL_NO_RETURN(DECL_HIDDEN_NOTHROW(void)) supR3HardenedFatalMsg(const char *pszWhere, SUPINITOP enmWhat, int rc, 110 const char *pszMsgFmt, ...) 111 111 { 112 112 va_list va; … … 117 117 118 118 119 DECL_NO_RETURN(DECL HIDDEN(void)) supR3HardenedFatalV(const char *pszFormat, va_list va)119 DECL_NO_RETURN(DECL_HIDDEN_NOTHROW(void)) supR3HardenedFatalV(const char *pszFormat, va_list va) 120 120 { 121 121 va_list vaCopy; … … 126 126 127 127 128 DECL_NO_RETURN(DECL HIDDEN(void)) supR3HardenedFatal(const char *pszFormat, ...)128 DECL_NO_RETURN(DECL_HIDDEN_NOTHROW(void)) supR3HardenedFatal(const char *pszFormat, ...) 129 129 { 130 130 va_list va; … … 135 135 136 136 137 DECL HIDDEN(int) supR3HardenedErrorV(int rc, bool fFatal, const char *pszFormat, va_list va)137 DECL_HIDDEN_NOTHROW(int) supR3HardenedErrorV(int rc, bool fFatal, const char *pszFormat, va_list va) 138 138 { 139 139 if (fFatal) … … 150 150 151 151 152 DECL HIDDEN(int) supR3HardenedError(int rc, bool fFatal, const char *pszFormat, ...)152 DECL_HIDDEN_NOTHROW(int) supR3HardenedError(int rc, bool fFatal, const char *pszFormat, ...) 153 153 { 154 154 va_list va; -
trunk/src/VBox/HostDrivers/Support/SUPR3HardenedMain.cpp
r83181 r85093 671 671 * @param rcExit The exit code. 672 672 */ 673 DECLNORETURN(void) suplibHardenedExit(RTEXITCODE rcExit) 673 DECLNORETURN(void) suplibHardenedExit(RTEXITCODE rcExit) RT_NO_THROW_DEF 674 674 { 675 675 for (;;) … … 888 888 * @param va Arguments to format. 889 889 */ 890 DECL HIDDEN(void) suplibHardenedPrintFV(const char *pszFormat, va_list va)890 DECL_HIDDEN_NOTHROW(void) suplibHardenedPrintFV(const char *pszFormat, va_list va) RT_NO_THROW_DEF 891 891 { 892 892 #ifdef IPRT_NO_CRT … … 1122 1122 * @param ... Arguments to format. 1123 1123 */ 1124 DECL HIDDEN(void) suplibHardenedPrintF(const char *pszFormat, ...)1124 DECL_HIDDEN_NOTHROW(void) suplibHardenedPrintF(const char *pszFormat, ...) RT_NO_THROW_DEF 1125 1125 { 1126 1126 va_list va; … … 1170 1170 * @copydoc RTPathFilename 1171 1171 */ 1172 DECL HIDDEN(char *) supR3HardenedPathFilename(const char *pszPath)1172 DECL_HIDDEN_NOTHROW(char *) supR3HardenedPathFilename(const char *pszPath) 1173 1173 { 1174 1174 const char *psz = pszPath; … … 1206 1206 * @copydoc RTPathAppPrivateNoArch 1207 1207 */ 1208 DECL HIDDEN(int) supR3HardenedPathAppPrivateNoArch(char *pszPath, size_t cchPath)1208 DECL_HIDDEN_NOTHROW(int) supR3HardenedPathAppPrivateNoArch(char *pszPath, size_t cchPath) 1209 1209 { 1210 1210 #if !defined(RT_OS_WINDOWS) && defined(RTPATH_APP_PRIVATE) … … 1225 1225 * @copydoc RTPathAppPrivateArch 1226 1226 */ 1227 DECL HIDDEN(int) supR3HardenedPathAppPrivateArch(char *pszPath, size_t cchPath)1227 DECL_HIDDEN_NOTHROW(int) supR3HardenedPathAppPrivateArch(char *pszPath, size_t cchPath) 1228 1228 { 1229 1229 #if !defined(RT_OS_WINDOWS) && defined(RTPATH_APP_PRIVATE_ARCH) … … 1244 1244 * @copydoc RTPathSharedLibs 1245 1245 */ 1246 DECL HIDDEN(int) supR3HardenedPathAppSharedLibs(char *pszPath, size_t cchPath)1246 DECL_HIDDEN_NOTHROW(int) supR3HardenedPathAppSharedLibs(char *pszPath, size_t cchPath) 1247 1247 { 1248 1248 #if !defined(RT_OS_WINDOWS) && defined(RTPATH_SHARED_LIBS) … … 1263 1263 * @copydoc RTPathAppDocs 1264 1264 */ 1265 DECL HIDDEN(int) supR3HardenedPathAppDocs(char *pszPath, size_t cchPath)1265 DECL_HIDDEN_NOTHROW(int) supR3HardenedPathAppDocs(char *pszPath, size_t cchPath) 1266 1266 { 1267 1267 #if !defined(RT_OS_WINDOWS) && defined(RTPATH_APP_DOCS) … … 1432 1432 * @remarks not quite like RTPathExecDir actually... 1433 1433 */ 1434 DECL HIDDEN(int) supR3HardenedPathAppBin(char *pszPath, size_t cchPath)1434 DECL_HIDDEN_NOTHROW(int) supR3HardenedPathAppBin(char *pszPath, size_t cchPath) 1435 1435 { 1436 1436 /* … … 1459 1459 #endif 1460 1460 1461 DECL HIDDEN(void) supR3HardenedOpenLog(int *pcArgs, char **papszArgs)1461 DECL_HIDDEN_NOTHROW(void) supR3HardenedOpenLog(int *pcArgs, char **papszArgs) RT_NO_THROW_DEF 1462 1462 { 1463 1463 static const char s_szLogOption[] = "--sup-hardening-log="; … … 1477 1477 * Drop the argument from the vector (has trailing NULL entry). 1478 1478 */ 1479 memmove(&papszArgs[iArg], &papszArgs[iArg + 1], (cArgs - iArg) * sizeof(papszArgs[0]));1479 // memmove(&papszArgs[iArg], &papszArgs[iArg + 1], (cArgs - iArg) * sizeof(papszArgs[0])); 1480 1480 *pcArgs -= 1; 1481 1481 cArgs -= 1; … … 1499 1499 if (RT_SUCCESS(rc)) 1500 1500 { 1501 SUP_DPRINTF(("Log file opened: " VBOX_VERSION_STRING "r%u g_hStartupLog=%p g_uNtVerCombined=%#x\n",1502 VBOX_SVN_REV, g_hStartupLog, g_uNtVerCombined));1501 // SUP_DPRINTF(("Log file opened: " VBOX_VERSION_STRING "r%u g_hStartupLog=%p g_uNtVerCombined=%#x\n", 1502 // VBOX_SVN_REV, g_hStartupLog, g_uNtVerCombined)); 1503 1503 1504 1504 /* … … 1508 1508 if (RT_C_IS_ALPHA(pszLogFile[0]) && pszLogFile[1] == ':') 1509 1509 { 1510 RTUtf16CopyAscii(g_wszStartupLogVol, RT_ELEMENTS(g_wszStartupLogVol), "\\??\\");1510 // RTUtf16CopyAscii(g_wszStartupLogVol, RT_ELEMENTS(g_wszStartupLogVol), "\\??\\"); 1511 1511 g_wszStartupLogVol[sizeof("\\??\\") - 1] = RT_C_TO_UPPER(pszLogFile[0]); 1512 1512 g_wszStartupLogVol[sizeof("\\??\\") + 0] = ':'; … … 1527 1527 1528 1528 1529 DECL HIDDEN(void) supR3HardenedLogV(const char *pszFormat, va_list va)1529 DECL_HIDDEN_NOTHROW(void) supR3HardenedLogV(const char *pszFormat, va_list va) RT_NO_THROW_DEF 1530 1530 { 1531 1531 #ifdef RT_OS_WINDOWS … … 1559 1559 1560 1560 1561 DECL HIDDEN(void) supR3HardenedLog(const char *pszFormat, ...)1561 DECL_HIDDEN_NOTHROW(void) supR3HardenedLog(const char *pszFormat, ...) RT_NO_THROW_DEF 1562 1562 { 1563 1563 va_list va; … … 1568 1568 1569 1569 1570 DECL HIDDEN(void) supR3HardenedLogFlush(void)1570 DECL_HIDDEN_NOTHROW(void) supR3HardenedLogFlush(void) RT_NO_THROW_DEF 1571 1571 { 1572 1572 #ifdef RT_OS_WINDOWS … … 1647 1647 1648 1648 1649 DECL_NO_RETURN(DECL HIDDEN(void)) supR3HardenedFatalMsgV(const char *pszWhere, SUPINITOP enmWhat, int rc,1650 const char *pszMsgFmt, va_list va)1649 DECL_NO_RETURN(DECL_HIDDEN_NOTHROW(void)) supR3HardenedFatalMsgV(const char *pszWhere, SUPINITOP enmWhat, int rc, 1650 const char *pszMsgFmt, va_list va) 1651 1651 { 1652 1652 /* … … 1764 1764 1765 1765 1766 DECL_NO_RETURN(DECL HIDDEN(void)) supR3HardenedFatalMsg(const char *pszWhere, SUPINITOP enmWhat, int rc,1767 const char *pszMsgFmt, ...)1766 DECL_NO_RETURN(DECL_HIDDEN_NOTHROW(void)) supR3HardenedFatalMsg(const char *pszWhere, SUPINITOP enmWhat, int rc, 1767 const char *pszMsgFmt, ...) 1768 1768 { 1769 1769 va_list va; … … 1774 1774 1775 1775 1776 DECL_NO_RETURN(DECL HIDDEN(void)) supR3HardenedFatalV(const char *pszFormat, va_list va)1776 DECL_NO_RETURN(DECL_HIDDEN_NOTHROW(void)) supR3HardenedFatalV(const char *pszFormat, va_list va) 1777 1777 { 1778 1778 supR3HardenedLog("Fatal error:\n"); … … 1809 1809 1810 1810 1811 DECL_NO_RETURN(DECL HIDDEN(void)) supR3HardenedFatal(const char *pszFormat, ...)1811 DECL_NO_RETURN(DECL_HIDDEN_NOTHROW(void)) supR3HardenedFatal(const char *pszFormat, ...) 1812 1812 { 1813 1813 va_list va; … … 1818 1818 1819 1819 1820 DECL HIDDEN(int) supR3HardenedErrorV(int rc, bool fFatal, const char *pszFormat, va_list va)1820 DECL_HIDDEN_NOTHROW(int) supR3HardenedErrorV(int rc, bool fFatal, const char *pszFormat, va_list va) 1821 1821 { 1822 1822 if (fFatal) … … 1845 1845 1846 1846 1847 DECL HIDDEN(int) supR3HardenedError(int rc, bool fFatal, const char *pszFormat, ...)1847 DECL_HIDDEN_NOTHROW(int) supR3HardenedError(int rc, bool fFatal, const char *pszFormat, ...) 1848 1848 { 1849 1849 va_list va; … … 1861 1861 * @remarks This function will not return on failure. 1862 1862 */ 1863 DECL HIDDEN(void) supR3HardenedMainOpenDevice(void)1863 DECL_HIDDEN_NOTHROW(void) supR3HardenedMainOpenDevice(void) 1864 1864 { 1865 1865 RTERRINFOSTATIC ErrInfo; … … 2516 2516 * @param envp The environment vector. 2517 2517 */ 2518 DECL HIDDEN(int) SUPR3HardenedMain(const char *pszProgName, uint32_t fFlags, int argc, char **argv, char **envp)2518 DECL_HIDDEN_NOTHROW(int) SUPR3HardenedMain(const char *pszProgName, uint32_t fFlags, int argc, char **argv, char **envp) 2519 2519 { 2520 2520 SUP_DPRINTF(("SUPR3HardenedMain: pszProgName=%s fFlags=%#x\n", pszProgName, fFlags)); -
trunk/src/VBox/HostDrivers/Support/win/SUPR3HardenedNoCrt-win.cpp
r84052 r85093 119 119 120 120 121 static uint32_t supR3HardenedEarlyFind(void *pv) 121 static uint32_t supR3HardenedEarlyFind(void *pv) RT_NOTHROW_DEF 122 122 { 123 123 uint32_t iHeap = g_cSupR3HardenedEarlyHeaps; … … 129 129 130 130 131 static void supR3HardenedEarlyCompact(void) 131 static void supR3HardenedEarlyCompact(void) RT_NOTHROW_DEF 132 132 { 133 133 uint32_t iHeap = g_cSupR3HardenedEarlyHeaps; … … 148 148 149 149 150 static void *supR3HardenedEarlyAlloc(size_t cb, bool fZero) 150 static void *supR3HardenedEarlyAlloc(size_t cb, bool fZero) RT_NOTHROW_DEF 151 151 { 152 152 /* … … 219 219 * @returns Heap handle. 220 220 */ 221 static HANDLE supR3HardenedHeapInit(void) 221 static HANDLE supR3HardenedHeapInit(void) RT_NOTHROW_DEF 222 222 { 223 223 Assert(g_enmSupR3HardenedMainState >= SUPR3HARDENEDMAINSTATE_WIN_EP_CALLED); … … 238 238 * Compacts the heaps before enter wait for parent/child. 239 239 */ 240 DECL HIDDEN(void) supR3HardenedWinCompactHeaps(void)240 DECL_HIDDEN_NOTHROW(void) supR3HardenedWinCompactHeaps(void) 241 241 { 242 242 if (g_hSupR3HardenedHeap)
Note:
See TracChangeset
for help on using the changeset viewer.