VirtualBox

Changeset 52941 in vbox for trunk


Ignore:
Timestamp:
Oct 3, 2014 7:58:01 PM (10 years ago)
Author:
vboxsync
Message:

Use our own heap in the hope that we can use it before ntdll is really initialized. Fixed RtlExitProcess issue. More early import work.

Location:
trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/nt/nt.h

    r52940 r52941  
    19261926NTSYSAPI VOID NTAPI     LdrInitializeThunk(PVOID, PVOID, PVOID);
    19271927NTSYSAPI NTSTATUS NTAPI RtlExpandEnvironmentStrings_U(PVOID, PUNICODE_STRING, PUNICODE_STRING, PULONG);
    1928 NTSYSAPI VOID NTAPI     RtlExitProcess(NTSTATUS rcExitCode);
    1929 NTSYSAPI VOID NTAPI     RtlExitThread(NTSTATUS rcExitCode);
     1928NTSYSAPI VOID NTAPI     RtlExitUserProcess(NTSTATUS rcExitCode); /**< Vista and later. */
     1929NTSYSAPI VOID NTAPI     RtlExitUserThread(NTSTATUS rcExitCode);
    19301930NTSYSAPI NTSTATUS NTAPI RtlDosApplyFileIsolationRedirection_Ustr(IN ULONG fFlags,
    19311931                                                                 IN PCUNICODE_STRING pOrgName,
     
    19371937                                                                 IN PSIZE_T pcbFilename OPTIONAL,
    19381938                                                                 IN PSIZE_T pcbNeeded OPTIONAL);
     1939
    19391940# ifdef IPRT_NT_USE_WINTERNL
     1941typedef NTSTATUS NTAPI RTL_HEAP_COMMIT_ROUTINE(PVOID, PVOID *, PSIZE_T);
     1942typedef RTL_HEAP_COMMIT_ROUTINE *PRTL_HEAP_COMMIT_ROUTINE;
     1943typedef struct _RTL_HEAP_PARAMETERS
     1944{
     1945    ULONG   Length;
     1946    SIZE_T  SegmentReserve;
     1947    SIZE_T  SegmentCommit;
     1948    SIZE_T  DeCommitFreeBlockThreshold;
     1949    SIZE_T  DeCommitTotalFreeThreshold;
     1950    SIZE_T  MaximumAllocationSize;
     1951    SIZE_T  VirtualMemoryThreshold;
     1952    SIZE_T  InitialCommit;
     1953    SIZE_T  InitialReserve;
     1954    PRTL_HEAP_COMMIT_ROUTINE  CommitRoutine;
     1955    SIZE_T  Reserved[2];
     1956} RTL_HEAP_PARAMETERS;
     1957typedef RTL_HEAP_PARAMETERS *PRTL_HEAP_PARAMETERS;
     1958NTSYSAPI PVOID NTAPI RtlCreateHeap(ULONG fFlags, PVOID pvHeapBase, SIZE_T cbReserve, SIZE_T cbCommit, PVOID pvLock,
     1959                                   PRTL_HEAP_PARAMETERS pParameters);
     1960/** @name Heap flags (for RtlCreateHeap).
     1961 * @{ */
     1962/*#  define HEAP_NO_SERIALIZE             UINT32_C(0x00000001)
     1963#  define HEAP_GROWABLE                 UINT32_C(0x00000002)
     1964#  define HEAP_GENERATE_EXCEPTIONS      UINT32_C(0x00000004)
     1965#  define HEAP_ZERO_MEMORY              UINT32_C(0x00000008)
     1966#  define HEAP_REALLOC_IN_PLACE_ONLY    UINT32_C(0x00000010)
     1967#  define HEAP_TAIL_CHECKING_ENABLED    UINT32_C(0x00000020)
     1968#  define HEAP_FREE_CHECKING_ENABLED    UINT32_C(0x00000040)
     1969#  define HEAP_DISABLE_COALESCE_ON_FREE UINT32_C(0x00000080)*/
     1970#  define HEAP_SETTABLE_USER_VALUE      UINT32_C(0x00000100)
     1971#  define HEAP_SETTABLE_USER_FLAG1      UINT32_C(0x00000200)
     1972#  define HEAP_SETTABLE_USER_FLAG2      UINT32_C(0x00000400)
     1973#  define HEAP_SETTABLE_USER_FLAG3      UINT32_C(0x00000800)
     1974#  define HEAP_SETTABLE_USER_FLAGS      UINT32_C(0x00000e00)
     1975#  define HEAP_CLASS_0                  UINT32_C(0x00000000)
     1976#  define HEAP_CLASS_1                  UINT32_C(0x00001000)
     1977#  define HEAP_CLASS_2                  UINT32_C(0x00002000)
     1978#  define HEAP_CLASS_3                  UINT32_C(0x00003000)
     1979#  define HEAP_CLASS_4                  UINT32_C(0x00004000)
     1980#  define HEAP_CLASS_5                  UINT32_C(0x00005000)
     1981#  define HEAP_CLASS_6                  UINT32_C(0x00006000)
     1982#  define HEAP_CLASS_7                  UINT32_C(0x00007000)
     1983#  define HEAP_CLASS_8                  UINT32_C(0x00008000)
     1984#  define HEAP_CLASS_MASK               UINT32_C(0x0000f000)
     1985# endif
     1986# define HEAP_CLASS_PROCESS             HEAP_CLASS_0
     1987# define HEAP_CLASS_PRIVATE             HEAP_CLASS_1
     1988# define HEAP_CLASS_KERNEL              HEAP_CLASS_2
     1989# define HEAP_CLASS_GDI                 HEAP_CLASS_3
     1990# define HEAP_CLASS_USER                HEAP_CLASS_4
     1991# define HEAP_CLASS_CONSOLE             HEAP_CLASS_5
     1992# define HEAP_CLASS_USER_DESKTOP        HEAP_CLASS_6
     1993# define HEAP_CLASS_CSRSS_SHARED        HEAP_CLASS_7
     1994# define HEAP_CLASS_CSRSS_PORT          HEAP_CLASS_8
     1995# ifdef IPRT_NT_USE_WINTERNL
     1996/*#  define HEAP_CREATE_ALIGN_16          UINT32_C(0x00010000)
     1997#  define HEAP_CREATE_ENABLE_TRACING    UINT32_C(0x00020000)
     1998#  define HEAP_CREATE_ENABLE_EXECUTE    UINT32_C(0x00040000)*/
     1999#  define HEAP_CREATE_VALID_MASK        UINT32_C(0x0007f0ff)
     2000# endif /* IPRT_NT_USE_WINTERNL */
     2001/** @} */
     2002# ifdef IPRT_NT_USE_WINTERNL
     2003/** @name Heap tagging constants
     2004 * @{ */
     2005#  define HEAP_GLOBAL_TAG               UINT32_C(0x00000800)
     2006/*#  define HEAP_MAXIMUM_TAG              UINT32_C(0x00000fff)
     2007#  define HEAP_PSEUDO_TAG_FLAG          UINT32_C(0x00008000)
     2008#  define HEAP_TAG_SHIFT                18 */
     2009#  define HEAP_TAG_MASK                 (HEAP_MAXIMUM_TAG << HEAP_TAG_SHIFT)
     2010/** @}  */
    19402011NTSYSAPI PVOID NTAPI    RtlAllocateHeap(HANDLE hHeap, ULONG fFlags, SIZE_T cb);
    19412012NTSYSAPI PVOID NTAPI    RtlReAllocateHeap(HANDLE hHeap, ULONG fFlags, PVOID pvOld, SIZE_T cbNew);
  • trunk/src/VBox/HostDrivers/Support/SUPLibInternal.h

    r52795 r52941  
    313313{
    314314    SUPR3HARDENEDMAINSTATE_NOT_YET_CALLED = 0,
     315    SUPR3HARDENEDMAINSTATE_WIN_EP_CALLED,
     316    SUPR3HARDENEDMAINSTATE_WIN_IMPORTS_RESOLVED,
     317    SUPR3HARDENEDMAINSTATE_WIN_VERSION_INITIALIZED,
    315318    SUPR3HARDENEDMAINSTATE_VERIFY_TRUST_READY,
    316319    SUPR3HARDENEDMAINSTATE_INIT_RUNTIME,
     
    452455extern char         g_szSupLibHardenedExePath[RTPATH_MAX];
    453456# endif
     457DECLHIDDEN(void)    supR3HardenedWinCompactHeaps(void);
    454458#endif
    455459
  • trunk/src/VBox/HostDrivers/Support/SUPR3HardenedMain.cpp

    r52940 r52941  
    227227{
    228228    for (;;)
     229    {
    229230#ifdef RT_OS_WINDOWS
    230         RtlExitProcess(rcExit);
     231        if (g_enmSupR3HardenedMainState >= SUPR3HARDENEDMAINSTATE_WIN_IMPORTS_RESOLVED)
     232            ExitProcess(rcExit);
     233        if (RtlExitUserProcess != NULL)
     234            RtlExitUserProcess(rcExit);
     235        NtTerminateProcess(NtCurrentProcess(), rcExit);
    231236#else
    232237        _Exit(rcExit);
    233238#endif
     239    }
    234240}
    235241
  • trunk/src/VBox/HostDrivers/Support/win/SUPR3HardenedMain-win.cpp

    r52940 r52941  
    39163916     */
    39173917    supR3HardenedWinFlushLoaderCache();
    3918     RtlCompactHeap(GetProcessHeap(), 0 /*dwFlags*/);
     3918    supR3HardenedWinCompactHeaps();
    39193919
    39203920    /*
     
    50515051
    50525052    g_cSuplibHardenedWindowsMainCalls++;
     5053    g_enmSupR3HardenedMainState = SUPR3HARDENEDMAINSTATE_WIN_EP_CALLED;
    50535054
    50545055    /*
     
    50575058     */
    50585059    supR3HardenedWinInitImports();
     5060    g_enmSupR3HardenedMainState = SUPR3HARDENEDMAINSTATE_WIN_IMPORTS_RESOLVED;
    50595061
    50605062    /*
     
    50705072     */
    50715073    supR3HardenedWinInitVersion();
     5074    g_enmSupR3HardenedMainState = SUPR3HARDENEDMAINSTATE_WIN_VERSION_INITIALIZED;
    50725075
    50735076    /*
  • trunk/src/VBox/HostDrivers/Support/win/SUPR3HardenedMainA-win.asm

    r52940 r52941  
    162162%define SUPHARNT_COMMENT(a_Comment)
    163163%define SUPHARNT_IMPORT_SYSCALL(a_Name, a_cbParamsX86)       SupHardNtImport a_Name, a_cbParamsX86, SUPHNTIMP_SYSCALL, 1
    164 %define SUPHARNT_IMPORT_STDCALL(a_Name, a_cbParamsX86)       SupHardNtImport a_Name, a_cbParamsX86, 0,                 0
    165 %define SUPHARNT_IMPORT_STDCALL_EARLY(a_Name, a_cbParamsX86) SupHardNtImport a_Name, a_cbParamsX86, 0,                 1
     164%define SUPHARNT_IMPORT_STDCALL(a_Name, a_cbParamsX86)       SupHardNtImport a_Name, a_cbParamsX86, 0, 0
     165%define SUPHARNT_IMPORT_STDCALL_EARLY(a_Name, a_cbParamsX86) SupHardNtImport a_Name, a_cbParamsX86, 0, 1
     166%define SUPHARNT_IMPORT_STDCALL_EARLY_OPTIONAL(a_Name, a_cbParamsX86) SUPHARNT_IMPORT_STDCALL_EARLY(a_Name, a_cbParamsX86)
    166167%include "import-template-ntdll.h"
    167168%include "import-template-kernel32.h"
  • trunk/src/VBox/HostDrivers/Support/win/SUPR3HardenedMainImports-win.cpp

    r52940 r52941  
    7272     * during early process initialization. */
    7373    PFNRT               pfnEarlyDummy;
     74    /** Indicates whether this is an optional import and failure to locate it
     75     * should set it to NULL instead of freaking out. */
     76    bool                fOptional;
    7477} SUPHNTIMPFUNC;
    7578/** Pointer to an import table entry.  */
     
    156159#define SUPHARNT_IMPORT_STDCALL_EARLY(a_Name, a_cbParamsX86) \
    157160    extern PFNRT    RT_CONCAT(g_pfn, a_Name);
     161#define SUPHARNT_IMPORT_STDCALL_EARLY_OPTIONAL(a_Name, a_cbParamsX86)  SUPHARNT_IMPORT_STDCALL_EARLY(a_Name, a_cbParamsX86)
    158162#define SUPHARNT_IMPORT_SYSCALL(a_Name, a_cbParamsX86) \
    159163    SUPHARNT_IMPORT_STDCALL_EARLY(a_Name, a_cbParamsX86) \
     
    175179#undef SUPHARNT_IMPORT_SYSCALL
    176180#undef SUPHARNT_IMPORT_STDCALL_EARLY
     181#undef SUPHARNT_IMPORT_STDCALL_EARLY_OPTIONAL
    177182#undef SUPHARNT_IMPORT_STDCALL
    178 #define SUPHARNT_IMPORT_SYSCALL(a_Name, a_cbParamsX86)          { #a_Name, &RT_CONCAT(g_pfn, a_Name), NULL },
    179 #define SUPHARNT_IMPORT_STDCALL_EARLY(a_Name, a_cbParamsX86)    { #a_Name, &RT_CONCAT(g_pfn, a_Name), NULL },
    180 #define SUPHARNT_IMPORT_STDCALL(a_Name, a_cbParamsX86)          { #a_Name, &RT_CONCAT(g_pfn, a_Name), RT_CONCAT(a_Name,_Early) },
     183#define SUPHARNT_IMPORT_SYSCALL(a_Name, a_cbParamsX86) \
     184    { #a_Name, &RT_CONCAT(g_pfn, a_Name), NULL, false },
     185#define SUPHARNT_IMPORT_STDCALL_EARLY(a_Name, a_cbParamsX86) \
     186    { #a_Name, &RT_CONCAT(g_pfn, a_Name), NULL, false },
     187#define SUPHARNT_IMPORT_STDCALL_EARLY_OPTIONAL(a_Name, a_cbParamsX86) \
     188    { #a_Name, &RT_CONCAT(g_pfn, a_Name), NULL, true },
     189#define SUPHARNT_IMPORT_STDCALL(a_Name, a_cbParamsX86) \
     190    { #a_Name, &RT_CONCAT(g_pfn, a_Name), RT_CONCAT(a_Name,_Early), false },
    181191static const SUPHNTIMPFUNC g_aSupNtImpNtDllFunctions[] =
    182192{
     
    197207#undef SUPHARNT_IMPORT_STDCALL
    198208#undef SUPHARNT_IMPORT_STDCALL_EARLY
     209#undef SUPHARNT_IMPORT_STDCALL_EARLY_OPTIONAL
    199210#ifdef RT_ARCH_AMD64
    200211# define SUPHARNT_IMPORT_STDCALL(a_Name, a_cbParamsX86) \
     
    208219    { &RT_CONCAT(g_uApiNo, a_Name), &RT_CONCAT(a_Name,_SyscallType1), &RT_CONCAT(a_Name, _SyscallType2), a_cbParamsX86 },
    209220#endif
    210 #define SUPHARNT_IMPORT_STDCALL_EARLY(a_Name, a_cbParamsX86) SUPHARNT_IMPORT_STDCALL(a_Name, a_cbParamsX86)
     221#define SUPHARNT_IMPORT_STDCALL_EARLY(a_Name, a_cbParamsX86)          SUPHARNT_IMPORT_STDCALL(a_Name, a_cbParamsX86)
     222#define SUPHARNT_IMPORT_STDCALL_EARLY_OPTIONAL(a_Name, a_cbParamsX86) SUPHARNT_IMPORT_STDCALL(a_Name, a_cbParamsX86)
    211223static const SUPHNTIMPSYSCALL g_aSupNtImpNtDllSyscalls[] =
    212224{
     
    399411    }
    400412
    401     SUPHNTIMP_ERROR(15, "supR3HardenedResolveImport", kSupInitOp_Misc, VERR_SYMBOL_NOT_FOUND,
    402                     "%ls: Failed to resolve '%s'.", pDll->pwszName, pImport->pszName);
     413    if (!pImport->fOptional)
     414        SUPHNTIMP_ERROR(15, "supR3HardenedResolveImport", kSupInitOp_Misc, VERR_SYMBOL_NOT_FOUND,
     415                        "%ls: Failed to resolve '%s'.", pDll->pwszName, pImport->pszName);
     416    *pImport->ppfnImport = NULL;
    403417    return NULL;
    404418}
  • trunk/src/VBox/HostDrivers/Support/win/SUPR3HardenedNoCrt-win.cpp

    r52940 r52941  
    9797 */
    9898
     99/** The heap we're using. */
     100static HANDLE g_hSupR3HardenedHeap = NULL;
     101
     102
     103/**
     104 * Lazy heap initialization function.
     105 *
     106 * @returns Heap handle.
     107 */
     108static HANDLE supR3HardenedHeapInit(void)
     109{
     110    HANDLE hHeap = RtlCreateHeap(HEAP_GROWABLE | HEAP_CLASS_PRIVATE, NULL /*HeapBase*/,
     111                                 0 /*ReserveSize*/, 0 /*CommitSize*/,  NULL /*Lock*/, NULL /*Parameters*/);
     112    if (hHeap)
     113    {
     114        g_hSupR3HardenedHeap = hHeap;
     115        return hHeap;
     116    }
     117
     118    supR3HardenedFatal("RtlCreateHeap failed.\n");
     119    return NULL;
     120}
     121
     122
     123/**
     124 * Compacts the heaps before enter wait for parent/child.
     125 */
     126DECLHIDDEN(void) supR3HardenedWinCompactHeaps(void)
     127{
     128    if (g_hSupR3HardenedHeap)
     129        RtlCompactHeap(g_hSupR3HardenedHeap, 0 /*dwFlags*/);
     130    RtlCompactHeap(GetProcessHeap(), 0 /*dwFlags*/);
     131}
     132
     133
     134
    99135RTDECL(void *) RTMemTmpAllocTag(size_t cb, const char *pszTag) RT_NO_THROW
    100136{
     
    117153RTDECL(void *) RTMemAllocTag(size_t cb, const char *pszTag) RT_NO_THROW
    118154{
    119     void *pv = RtlAllocateHeap(GetProcessHeap(), 0 /*fFlags*/, cb);
     155    HANDLE hHeap = g_hSupR3HardenedHeap;
     156    if (!hHeap)
     157        hHeap = supR3HardenedHeapInit();
     158    void *pv = RtlAllocateHeap(hHeap, 0 /*fFlags*/, cb);
    120159    if (!pv)
    121160        supR3HardenedFatal("RtlAllocateHeap failed to allocate %zu bytes.\n", cb);
     
    126165RTDECL(void *) RTMemAllocZTag(size_t cb, const char *pszTag) RT_NO_THROW
    127166{
    128     void *pv = RtlAllocateHeap(GetProcessHeap(), HEAP_ZERO_MEMORY, cb);
     167    HANDLE hHeap = g_hSupR3HardenedHeap;
     168    if (!hHeap)
     169        hHeap = supR3HardenedHeapInit();
     170    void *pv = RtlAllocateHeap(hHeap, HEAP_ZERO_MEMORY, cb);
    129171    if (!pv)
    130172        supR3HardenedFatal("RtlAllocateHeap failed to allocate %zu bytes.\n", cb);
     
    160202        return RTMemAllocZTag(cbNew, pszTag);
    161203
    162     void *pv = RtlReAllocateHeap(GetProcessHeap(), 0 /*dwFlags*/, pvOld, cbNew);
     204    HANDLE hHeap = g_hSupR3HardenedHeap;
     205    Assert(hHeap != NULL);
     206    void *pv = RtlReAllocateHeap(hHeap, 0 /*dwFlags*/, pvOld, cbNew);
    163207    if (!pv)
    164208        supR3HardenedFatal("RtlReAllocateHeap failed to allocate %zu bytes.\n", cbNew);
     
    170214{
    171215    if (pv)
    172         RtlFreeHeap(GetProcessHeap(), 0 /* dwFlags*/, pv);
     216    {
     217        HANDLE hHeap = g_hSupR3HardenedHeap;
     218        Assert(hHeap != NULL);
     219        RtlFreeHeap(hHeap, 0 /* dwFlags*/, pv);
     220    }
    173221}
    174222
  • trunk/src/VBox/HostDrivers/Support/win/import-template-kernel32.h

    r52940 r52941  
    11SUPHARNT_IMPORT_STDCALL(CreateFileW, 28)
    22SUPHARNT_IMPORT_STDCALL(CreateProcessW, 40)
     3SUPHARNT_IMPORT_STDCALL(ExitProcess, 4)
    34SUPHARNT_IMPORT_STDCALL(GetFullPathNameA, 16)
    45SUPHARNT_IMPORT_STDCALL(GetModuleFileNameW, 12)
  • trunk/src/VBox/HostDrivers/Support/win/import-template-ntdll.h

    r52940 r52941  
    4949
    5050
    51 SUPHARNT_IMPORT_STDCALL(NtCreateSection, 28)
    52 SUPHARNT_IMPORT_STDCALL(NtQueryVolumeInformationFile, 20)
    53 SUPHARNT_IMPORT_STDCALL(LdrInitializeThunk, 12)
     51SUPHARNT_IMPORT_STDCALL_EARLY(NtCreateSection, 28)
     52SUPHARNT_IMPORT_STDCALL_EARLY(NtQueryVolumeInformationFile, 20)
     53SUPHARNT_IMPORT_STDCALL_EARLY(LdrInitializeThunk, 12)
    5454SUPHARNT_IMPORT_STDCALL(RtlAddAccessAllowedAce, 16)
    5555SUPHARNT_IMPORT_STDCALL(RtlAddAccessDeniedAce, 16)
    56 SUPHARNT_IMPORT_STDCALL(RtlAllocateHeap, 12)
     56SUPHARNT_IMPORT_STDCALL_EARLY(RtlAllocateHeap, 12)
    5757SUPHARNT_IMPORT_STDCALL(RtlCompactHeap, 8)
    5858SUPHARNT_IMPORT_STDCALL(RtlCopySid, 12)
    5959SUPHARNT_IMPORT_STDCALL(RtlCreateAcl, 12)
     60SUPHARNT_IMPORT_STDCALL_EARLY(RtlCreateHeap, 24)
    6061SUPHARNT_IMPORT_STDCALL(RtlCreateProcessParameters, 40)
    6162SUPHARNT_IMPORT_STDCALL(RtlCreateSecurityDescriptor, 8)
     
    6364SUPHARNT_IMPORT_STDCALL(RtlCreateUserThread, 40)
    6465SUPHARNT_IMPORT_STDCALL(RtlDestroyProcessParameters, 4)
    65 SUPHARNT_IMPORT_STDCALL(RtlDosApplyFileIsolationRedirection_Ustr, 36)
    66 SUPHARNT_IMPORT_STDCALL(RtlEqualSid, 8)
    67 SUPHARNT_IMPORT_STDCALL(RtlExitProcess, 4)
    68 SUPHARNT_IMPORT_STDCALL(RtlExitThread, 4)
     66SUPHARNT_IMPORT_STDCALL_EARLY(RtlDosApplyFileIsolationRedirection_Ustr, 36)
     67SUPHARNT_IMPORT_STDCALL_EARLY(RtlEqualSid, 8)
     68SUPHARNT_IMPORT_STDCALL_EARLY_OPTIONAL(RtlExitUserProcess, 4)
     69SUPHARNT_IMPORT_STDCALL_EARLY(RtlExitUserThread, 4)
    6970SUPHARNT_IMPORT_STDCALL(RtlExpandEnvironmentStrings_U, 16)
    70 SUPHARNT_IMPORT_STDCALL(RtlFreeHeap, 12)
    71 SUPHARNT_IMPORT_STDCALL(RtlFreeUnicodeString, 4)
    72 SUPHARNT_IMPORT_STDCALL(RtlGetLastNtStatus, 0)
    73 SUPHARNT_IMPORT_STDCALL(RtlGetLastWin32Error, 0)
    74 SUPHARNT_IMPORT_STDCALL(RtlGetVersion, 4)
     71SUPHARNT_IMPORT_STDCALL_EARLY(RtlFreeHeap, 12)
     72SUPHARNT_IMPORT_STDCALL_EARLY(RtlFreeUnicodeString, 4)
     73SUPHARNT_IMPORT_STDCALL_EARLY(RtlGetLastNtStatus, 0)
     74SUPHARNT_IMPORT_STDCALL_EARLY(RtlGetLastWin32Error, 0)
     75SUPHARNT_IMPORT_STDCALL_EARLY(RtlGetVersion, 4)
    7576SUPHARNT_IMPORT_STDCALL(RtlInitializeSid, 12)
    76 SUPHARNT_IMPORT_STDCALL(RtlNtStatusToDosError, 4)
    77 SUPHARNT_IMPORT_STDCALL(RtlReAllocateHeap, 16)
    78 SUPHARNT_IMPORT_STDCALL(RtlRestoreLastWin32Error, 4)
     77SUPHARNT_IMPORT_STDCALL_EARLY(RtlNtStatusToDosError, 4)
     78SUPHARNT_IMPORT_STDCALL_EARLY(RtlReAllocateHeap, 16)
     79SUPHARNT_IMPORT_STDCALL_EARLY(RtlRestoreLastWin32Error, 4)
    7980SUPHARNT_IMPORT_STDCALL(RtlSetDaclSecurityDescriptor, 16)
    80 SUPHARNT_IMPORT_STDCALL(RtlSetLastWin32Error, 4)
    81 SUPHARNT_IMPORT_STDCALL(RtlSetLastWin32ErrorAndNtStatusFromNtStatus, 4)
    82 SUPHARNT_IMPORT_STDCALL(RtlSizeHeap, 12)
     81SUPHARNT_IMPORT_STDCALL_EARLY(RtlSetLastWin32Error, 4)
     82SUPHARNT_IMPORT_STDCALL_EARLY(RtlSetLastWin32ErrorAndNtStatusFromNtStatus, 4)
     83SUPHARNT_IMPORT_STDCALL_EARLY(RtlSizeHeap, 12)
    8384SUPHARNT_IMPORT_STDCALL(RtlSubAuthoritySid, 8)
    8485
  • trunk/src/VBox/Runtime/r3/win/ntdll-mini-implib.def

    r52940 r52941  
    9191    RtlCopySid                            ;;= _RtlCopySid@12
    9292    RtlCreateAcl                          ;;= _RtlCreateAcl@12
     93    RtlCreateHeap                         ;;= _RtlCreateHeap@24
    9394    RtlCreateProcessParameters            ;;= _RtlCreateProcessParameters@40
    9495    RtlCreateSecurityDescriptor           ;;= _RtlCreateSecurityDescriptor@8
     
    9899    RtlDosApplyFileIsolationRedirection_Ustr ;;= _RtlDosApplyFileIsolationRedirection_Ustr@36
    99100    RtlEqualSid                           ;;= _RtlEqualSid@8
    100     RtlExitProcess                        ;;= _RtlExitProcess@4
    101     RtlExitThread                         ;;= _RtlExitThread@4
     101    RtlExitUserProcess                    ;;= _RtlExitProcess@4
     102    RtlExitUserThread                     ;;= _RtlExitThread@4
    102103    RtlExpandEnvironmentStrings_U         ;;= _RtlExpandEnvironmentStrings_U@16
    103104    RtlFreeHeap                           ;;= _RtlFreeHeap@12
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