Nonpaged Pool Liberation Day: Allow PagedPool to be used earlier, allow fast mutex to be used earlier on debug builds. Allocate all Se stuff from PagedPool, set the right object types to use paged pool, allocate all strings from paged pool, allocate PE sections from paged pool, and a bunch of other things which should, imo, be in paged pool. If anyone has any contradicting proof, let me know...until then, enjoy ~4-6MB more NonPagedPool Modified: trunk/reactos/lib/rtl/unicode.c Modified: trunk/reactos/ntoskrnl/cm/registry.c Modified: trunk/reactos/ntoskrnl/ex/fmutex.c Modified: trunk/reactos/ntoskrnl/ex/init.c Modified: trunk/reactos/ntoskrnl/include/internal/tag.h Modified: trunk/reactos/ntoskrnl/mm/mm.c Modified: trunk/reactos/ntoskrnl/mm/section.c Modified: trunk/reactos/ntoskrnl/rtl/handle.c Modified: trunk/reactos/ntoskrnl/se/acl.c Modified: trunk/reactos/ntoskrnl/se/sd.c Modified: trunk/reactos/ntoskrnl/se/semgr.c Modified: trunk/reactos/ntoskrnl/se/sid.c Modified: trunk/reactos/ntoskrnl/se/token.c _____
Modified: trunk/reactos/lib/rtl/unicode.c --- trunk/reactos/lib/rtl/unicode.c 2005-05-25 02:20:01 UTC (rev 15491) +++ trunk/reactos/lib/rtl/unicode.c 2005-05-25 04:16:56 UTC (rev 15492) @@ -990,7 +990,7 @@
AnsiDest, UniSource, AllocateDestinationString, - NonPagedPool); + PagedPool); }
@@ -1073,7 +1073,7 @@ UniDest, OemSource, AllocateDestinationString, - NonPagedPool); + PagedPool); }
@@ -1157,7 +1157,7 @@ OemDest, UniSource, AllocateDestinationString, - NonPagedPool); + PagedPool); }
@@ -1304,7 +1304,7 @@ UniDest, OemSource, AllocateDestinationString, - NonPagedPool); + PagedPool); }
@@ -1634,7 +1634,7 @@ OemDest, UniSource, AllocateDestinationString, - NonPagedPool); + PagedPool); }
/* @@ -1766,7 +1766,7 @@ UniDest, UniSource, AllocateDestinationString, - NonPagedPool); + PagedPool); }
@@ -1833,7 +1833,7 @@ AnsiDest, UniSource, AllocateDestinationString, - NonPagedPool); + PagedPool); }
/* @@ -1921,7 +1921,7 @@ OemDest, UniSource, AllocateDestinationString, - NonPagedPool); + PagedPool); }
@@ -2007,7 +2007,7 @@ OemDest, UniSource, AllocateDestinationString, - NonPagedPool); + PagedPool); }
@@ -2287,7 +2287,7 @@ {
DPRINT("RtlCreateUnicodeString\n"); - return RtlpCreateUnicodeString(UniDest, Source, NonPagedPool); + return RtlpCreateUnicodeString(UniDest, Source, PagedPool); }
@@ -2306,7 +2306,7 @@ ULONG Length;
Length = (wcslen (Source) + 1) * sizeof(WCHAR); - + PoolType = PagedPool; UniDest->Buffer = ExAllocatePoolWithTag(PoolType, Length, TAG_USTR); if (UniDest->Buffer == NULL) return FALSE; @@ -2363,7 +2363,7 @@ UniDest, UniSource, AllocateDestinationString, - NonPagedPool); + PagedPool); }
@@ -2473,7 +2473,7 @@ UniDest, AnsiSource, AllocateDestinationString, - NonPagedPool); + PagedPool); }
@@ -2664,7 +2664,7 @@ AddNull, SourceString, DestinationString, - NonPagedPool); + PagedPool); }
_____
Modified: trunk/reactos/ntoskrnl/cm/registry.c --- trunk/reactos/ntoskrnl/cm/registry.c 2005-05-25 02:20:01 UTC (rev 15491) +++ trunk/reactos/ntoskrnl/cm/registry.c 2005-05-25 04:16:56 UTC (rev 15492) @@ -356,9 +356,9 @@
RtlZeroMemory(&ObjectTypeInitializer, sizeof(ObjectTypeInitializer)); RtlInitUnicodeString(&Name, L"Key"); ObjectTypeInitializer.Length = sizeof(ObjectTypeInitializer); - ObjectTypeInitializer.DefaultNonPagedPoolCharge = sizeof(KEY_OBJECT); + ObjectTypeInitializer.DefaultPagedPoolCharge = sizeof(KEY_OBJECT); ObjectTypeInitializer.GenericMapping = CmiKeyMapping; - ObjectTypeInitializer.PoolType = NonPagedPool; + ObjectTypeInitializer.PoolType = PagedPool; ObjectTypeInitializer.ValidAccessMask = KEY_ALL_ACCESS; ObjectTypeInitializer.UseDefaultObject = TRUE; ObjectTypeInitializer.DeleteProcedure = CmiObjectDelete; _____
Modified: trunk/reactos/ntoskrnl/ex/fmutex.c --- trunk/reactos/ntoskrnl/ex/fmutex.c 2005-05-25 02:20:01 UTC (rev 15491) +++ trunk/reactos/ntoskrnl/ex/fmutex.c 2005-05-25 04:16:56 UTC (rev 15492) @@ -21,7 +21,7 @@
VOID FASTCALL ExAcquireFastMutexUnsafe(PFAST_MUTEX FastMutex) { - ASSERT(FastMutex->Owner != KeGetCurrentThread()); + //ASSERT(FastMutex->Owner != KeGetCurrentThread()); InterlockedIncrementUL(&FastMutex->Contention); while (InterlockedExchange(&FastMutex->Count, 0) == 0) { @@ -41,7 +41,7 @@ VOID FASTCALL ExReleaseFastMutexUnsafe(PFAST_MUTEX FastMutex) { - ASSERT(FastMutex->Owner == KeGetCurrentThread()); + //ASSERT(FastMutex->Owner == KeGetCurrentThread()); FastMutex->Owner = NULL; InterlockedExchange(&FastMutex->Count, 1); if (FastMutex->Contention > 0) _____
Modified: trunk/reactos/ntoskrnl/ex/init.c --- trunk/reactos/ntoskrnl/ex/init.c 2005-05-25 02:20:01 UTC (rev 15491) +++ trunk/reactos/ntoskrnl/ex/init.c 2005-05-25 04:16:56 UTC (rev 15492) @@ -481,10 +481,10 @@
/* Set 1 CPU for now, we'll increment this later */ KeNumberProcessors = 1; - + /* Initalize the Process Manager */ PiInitProcessManager(); - + /* Break into the Debugger if requested */ if (KdPollBreakIn()) DbgBreakPointWithStatus (DBG_STATUS_CONTROL_C);
_____
Modified: trunk/reactos/ntoskrnl/include/internal/tag.h --- trunk/reactos/ntoskrnl/include/internal/tag.h 2005-05-25 02:20:01 UTC (rev 15491) +++ trunk/reactos/ntoskrnl/include/internal/tag.h 2005-05-25 04:16:56 UTC (rev 15492) @@ -134,12 +134,12 @@
#define TAG_HDTB TAG('H', 'D', 'T', 'B')
/* formerly located in se/acl.c */ -#define TAG_ACL TAG('A', 'C', 'L', 'T') +#define TAG_ACL TAG('S', 'e', 'A', 'c')
-/* formerly located in se/semgr.c */ -#define TAG_SXPT TAG('S', 'X', 'P', 'T') - /* formerly located in se/sid.c */ -#define TAG_SID TAG('S', 'I', 'D', 'T') +#define TAG_SID TAG('S', 'e', 'S', 'i')
+/* formerly located in se/sd.c */ +#define TAG_SD TAG('S', 'e', 'S', 'd') + #endif /* _NTOSKRNL_TAG_H */ _____
Modified: trunk/reactos/ntoskrnl/mm/mm.c --- trunk/reactos/ntoskrnl/mm/mm.c 2005-05-25 02:20:01 UTC (rev 15491) +++ trunk/reactos/ntoskrnl/mm/mm.c 2005-05-25 04:16:56 UTC (rev 15492) @@ -321,8 +321,11 @@
} if (PsGetCurrentProcess() == NULL) { + /* Allow this! It lets us page alloc much earlier! It won't be needed + * after my init patch anyways + */ DbgPrint("No current process\n"); - return(STATUS_UNSUCCESSFUL); + //return(STATUS_UNSUCCESSFUL); }
/* _____
Modified: trunk/reactos/ntoskrnl/mm/section.c --- trunk/reactos/ntoskrnl/mm/section.c 2005-05-25 02:20:01 UTC (rev 15491) +++ trunk/reactos/ntoskrnl/mm/section.c 2005-05-25 04:16:56 UTC (rev 15492) @@ -2123,8 +2123,8 @@
RtlZeroMemory(&ObjectTypeInitializer, sizeof(ObjectTypeInitializer)); RtlInitUnicodeString(&Name, L"Section"); ObjectTypeInitializer.Length = sizeof(ObjectTypeInitializer); - ObjectTypeInitializer.DefaultNonPagedPoolCharge = sizeof(SECTION_OBJECT); - ObjectTypeInitializer.PoolType = NonPagedPool; + ObjectTypeInitializer.DefaultPagedPoolCharge = sizeof(SECTION_OBJECT); + ObjectTypeInitializer.PoolType = PagedPool; ObjectTypeInitializer.UseDefaultObject = TRUE; ObjectTypeInitializer.GenericMapping = MmpSectionMapping; ObjectTypeInitializer.DeleteProcedure = MmpDeleteSection; @@ -2499,7 +2499,7 @@ /* TODO: check for integer overflow */ SizeOfSegments = sizeof(MM_SECTION_SEGMENT) * NrSegments;
- Segments = ExAllocatePoolWithTag(NonPagedPool, + Segments = ExAllocatePoolWithTag(PagedPool, SizeOfSegments, TAG_MM_SECTION_SEGMENT);
_____
Modified: trunk/reactos/ntoskrnl/rtl/handle.c --- trunk/reactos/ntoskrnl/rtl/handle.c 2005-05-25 02:20:01 UTC (rev 15491) +++ trunk/reactos/ntoskrnl/rtl/handle.c 2005-05-25 04:16:56 UTC (rev 15492) @@ -63,7 +63,7 @@
{ /* allocate handle array */ ArraySize = sizeof(RTL_HANDLE) * HandleTable->TableSize; - ArrayPointer = ExAllocatePoolWithTag(NonPagedPool, + ArrayPointer = ExAllocatePoolWithTag(PagedPool, ArraySize, TAG_HDTB); if (ArrayPointer == NULL) _____
Modified: trunk/reactos/ntoskrnl/se/acl.c --- trunk/reactos/ntoskrnl/se/acl.c 2005-05-25 02:20:01 UTC (rev 15491) +++ trunk/reactos/ntoskrnl/se/acl.c 2005-05-25 04:16:56 UTC (rev 15492) @@ -36,7 +36,7 @@
(sizeof(ACE) + RtlLengthSid(SeWorldSid)) + (sizeof(ACE) + RtlLengthSid(SeLocalSystemSid));
- SePublicDefaultDacl = ExAllocatePoolWithTag(NonPagedPool, + SePublicDefaultDacl = ExAllocatePoolWithTag(PagedPool, AclLength, TAG_ACL); if (SePublicDefaultDacl == NULL) @@ -64,7 +64,7 @@ (sizeof(ACE) + RtlLengthSid(SeAliasAdminsSid)) + (sizeof(ACE) + RtlLengthSid(SeRestrictedCodeSid));
- SePublicDefaultUnrestrictedDacl = ExAllocatePoolWithTag(NonPagedPool, + SePublicDefaultUnrestrictedDacl = ExAllocatePoolWithTag(PagedPool, AclLength, TAG_ACL); if (SePublicDefaultUnrestrictedDacl == NULL) @@ -100,7 +100,7 @@ (sizeof(ACE) + RtlLengthSid(SeLocalSystemSid)) + (sizeof(ACE) + RtlLengthSid(SeAliasAdminsSid));
- SePublicOpenDacl = ExAllocatePoolWithTag(NonPagedPool, + SePublicOpenDacl = ExAllocatePoolWithTag(PagedPool, AclLength, TAG_ACL); if (SePublicOpenDacl == NULL) @@ -132,7 +132,7 @@ (sizeof(ACE) + RtlLengthSid(SeAliasAdminsSid)) + (sizeof(ACE) + RtlLengthSid(SeRestrictedCodeSid));
- SePublicOpenUnrestrictedDacl = ExAllocatePoolWithTag(NonPagedPool, + SePublicOpenUnrestrictedDacl = ExAllocatePoolWithTag(PagedPool, AclLength, TAG_ACL); if (SePublicOpenUnrestrictedDacl == NULL) @@ -167,7 +167,7 @@ (sizeof(ACE) + RtlLengthSid(SeLocalSystemSid)) + (sizeof(ACE) + RtlLengthSid(SeAliasAdminsSid));
- SeSystemDefaultDacl = ExAllocatePoolWithTag(NonPagedPool, + SeSystemDefaultDacl = ExAllocatePoolWithTag(PagedPool, AclLength, TAG_ACL); if (SeSystemDefaultDacl == NULL) @@ -192,7 +192,7 @@ (sizeof(ACE) + RtlLengthSid(SeWorldSid)) + (sizeof(ACE) + RtlLengthSid(SeRestrictedCodeSid));
- SeUnrestrictedDacl = ExAllocatePoolWithTag(NonPagedPool, + SeUnrestrictedDacl = ExAllocatePoolWithTag(PagedPool, AclLength, TAG_ACL); if (SeUnrestrictedDacl == NULL) _____
Modified: trunk/reactos/ntoskrnl/se/sd.c --- trunk/reactos/ntoskrnl/se/sd.c 2005-05-25 02:20:01 UTC (rev 15491) +++ trunk/reactos/ntoskrnl/se/sd.c 2005-05-25 04:16:56 UTC (rev 15492) @@ -28,8 +28,8 @@
SepInitSDs(VOID) { /* Create PublicDefaultSd */ - SePublicDefaultSd = ExAllocatePool(NonPagedPool, - sizeof(SECURITY_DESCRIPTOR)); + SePublicDefaultSd = ExAllocatePoolWithTag(PagedPool, + sizeof(SECURITY_DESCRIPTOR), TAG_SD); if (SePublicDefaultSd == NULL) return FALSE;
@@ -41,8 +41,8 @@ FALSE);
/* Create PublicDefaultUnrestrictedSd */ - SePublicDefaultUnrestrictedSd = ExAllocatePool(NonPagedPool, - sizeof(SECURITY_DESCRIPTOR)); + SePublicDefaultUnrestrictedSd = ExAllocatePoolWithTag(PagedPool, + sizeof(SECURITY_DESCRIPTOR), TAG_SD); if (SePublicDefaultUnrestrictedSd == NULL) return FALSE;
@@ -54,8 +54,8 @@ FALSE);
/* Create PublicOpenSd */ - SePublicOpenSd = ExAllocatePool(NonPagedPool, - sizeof(SECURITY_DESCRIPTOR)); + SePublicOpenSd = ExAllocatePoolWithTag(PagedPool, + sizeof(SECURITY_DESCRIPTOR), TAG_SD); if (SePublicOpenSd == NULL) return FALSE;
@@ -67,8 +67,8 @@ FALSE);
/* Create PublicOpenUnrestrictedSd */ - SePublicOpenUnrestrictedSd = ExAllocatePool(NonPagedPool, - sizeof(SECURITY_DESCRIPTOR)); + SePublicOpenUnrestrictedSd = ExAllocatePoolWithTag(PagedPool, + sizeof(SECURITY_DESCRIPTOR), TAG_SD); if (SePublicOpenUnrestrictedSd == NULL) return FALSE;
@@ -80,8 +80,8 @@ FALSE);
/* Create SystemDefaultSd */ - SeSystemDefaultSd = ExAllocatePool(NonPagedPool, - sizeof(SECURITY_DESCRIPTOR)); + SeSystemDefaultSd = ExAllocatePoolWithTag(PagedPool, + sizeof(SECURITY_DESCRIPTOR), TAG_SD); if (SeSystemDefaultSd == NULL) return FALSE;
@@ -93,8 +93,8 @@ FALSE);
/* Create UnrestrictedSd */ - SeUnrestrictedSd = ExAllocatePool(NonPagedPool, - sizeof(SECURITY_DESCRIPTOR)); + SeUnrestrictedSd = ExAllocatePoolWithTag(PagedPool, + sizeof(SECURITY_DESCRIPTOR), TAG_SD); if (SeUnrestrictedSd == NULL) return FALSE;
_____
Modified: trunk/reactos/ntoskrnl/se/semgr.c --- trunk/reactos/ntoskrnl/se/semgr.c 2005-05-25 02:20:01 UTC (rev 15491) +++ trunk/reactos/ntoskrnl/se/semgr.c 2005-05-25 04:16:56 UTC (rev 15492) @@ -17,6 +17,7 @@
/* GLOBALS ******************************************************************/
PSE_EXPORTS EXPORTED SeExports = NULL; +SE_EXPORTS SepExports;
static ERESOURCE SepSubjectContextLock;
@@ -121,56 +122,51 @@ static BOOLEAN INIT_FUNCTION SepInitExports(VOID) { - SeExports = ExAllocatePoolWithTag(NonPagedPool, - sizeof(SE_EXPORTS), - TAG_SXPT); - if (SeExports == NULL) - return FALSE; + SepExports.SeCreateTokenPrivilege = SeCreateTokenPrivilege; + SepExports.SeAssignPrimaryTokenPrivilege = SeAssignPrimaryTokenPrivilege; + SepExports.SeLockMemoryPrivilege = SeLockMemoryPrivilege; + SepExports.SeIncreaseQuotaPrivilege = SeIncreaseQuotaPrivilege; + SepExports.SeUnsolicitedInputPrivilege = SeUnsolicitedInputPrivilege; + SepExports.SeTcbPrivilege = SeTcbPrivilege; + SepExports.SeSecurityPrivilege = SeSecurityPrivilege; + SepExports.SeTakeOwnershipPrivilege = SeTakeOwnershipPrivilege; + SepExports.SeLoadDriverPrivilege = SeLoadDriverPrivilege; + SepExports.SeCreatePagefilePrivilege = SeCreatePagefilePrivilege; + SepExports.SeIncreaseBasePriorityPrivilege = SeIncreaseBasePriorityPrivilege; + SepExports.SeSystemProfilePrivilege = SeSystemProfilePrivilege; + SepExports.SeSystemtimePrivilege = SeSystemtimePrivilege; + SepExports.SeProfileSingleProcessPrivilege = SeProfileSingleProcessPrivilege; + SepExports.SeCreatePermanentPrivilege = SeCreatePermanentPrivilege; + SepExports.SeBackupPrivilege = SeBackupPrivilege; + SepExports.SeRestorePrivilege = SeRestorePrivilege; + SepExports.SeShutdownPrivilege = SeShutdownPrivilege; + SepExports.SeDebugPrivilege = SeDebugPrivilege; + SepExports.SeAuditPrivilege = SeAuditPrivilege; + SepExports.SeSystemEnvironmentPrivilege = SeSystemEnvironmentPrivilege; + SepExports.SeChangeNotifyPrivilege = SeChangeNotifyPrivilege; + SepExports.SeRemoteShutdownPrivilege = SeRemoteShutdownPrivilege;
- SeExports->SeCreateTokenPrivilege = SeCreateTokenPrivilege; - SeExports->SeAssignPrimaryTokenPrivilege = SeAssignPrimaryTokenPrivilege; - SeExports->SeLockMemoryPrivilege = SeLockMemoryPrivilege; - SeExports->SeIncreaseQuotaPrivilege = SeIncreaseQuotaPrivilege; - SeExports->SeUnsolicitedInputPrivilege = SeUnsolicitedInputPrivilege; - SeExports->SeTcbPrivilege = SeTcbPrivilege; - SeExports->SeSecurityPrivilege = SeSecurityPrivilege; - SeExports->SeTakeOwnershipPrivilege = SeTakeOwnershipPrivilege; - SeExports->SeLoadDriverPrivilege = SeLoadDriverPrivilege; - SeExports->SeCreatePagefilePrivilege = SeCreatePagefilePrivilege; - SeExports->SeIncreaseBasePriorityPrivilege = SeIncreaseBasePriorityPrivilege; - SeExports->SeSystemProfilePrivilege = SeSystemProfilePrivilege; - SeExports->SeSystemtimePrivilege = SeSystemtimePrivilege; - SeExports->SeProfileSingleProcessPrivilege = SeProfileSingleProcessPrivilege; - SeExports->SeCreatePermanentPrivilege = SeCreatePermanentPrivilege; - SeExports->SeBackupPrivilege = SeBackupPrivilege; - SeExports->SeRestorePrivilege = SeRestorePrivilege; - SeExports->SeShutdownPrivilege = SeShutdownPrivilege; - SeExports->SeDebugPrivilege = SeDebugPrivilege; - SeExports->SeAuditPrivilege = SeAuditPrivilege; - SeExports->SeSystemEnvironmentPrivilege = SeSystemEnvironmentPrivilege; - SeExports->SeChangeNotifyPrivilege = SeChangeNotifyPrivilege; - SeExports->SeRemoteShutdownPrivilege = SeRemoteShutdownPrivilege; + SepExports.SeNullSid = SeNullSid; + SepExports.SeWorldSid = SeWorldSid; + SepExports.SeLocalSid = SeLocalSid; + SepExports.SeCreatorOwnerSid = SeCreatorOwnerSid; + SepExports.SeCreatorGroupSid = SeCreatorGroupSid; + SepExports.SeNtAuthoritySid = SeNtAuthoritySid; + SepExports.SeDialupSid = SeDialupSid; + SepExports.SeNetworkSid = SeNetworkSid; + SepExports.SeBatchSid = SeBatchSid; + SepExports.SeInteractiveSid = SeInteractiveSid; + SepExports.SeLocalSystemSid = SeLocalSystemSid; + SepExports.SeAliasAdminsSid = SeAliasAdminsSid; + SepExports.SeAliasUsersSid = SeAliasUsersSid; + SepExports.SeAliasGuestsSid = SeAliasGuestsSid; + SepExports.SeAliasPowerUsersSid = SeAliasPowerUsersSid; + SepExports.SeAliasAccountOpsSid = SeAliasAccountOpsSid; + SepExports.SeAliasSystemOpsSid = SeAliasSystemOpsSid; + SepExports.SeAliasPrintOpsSid = SeAliasPrintOpsSid; + SepExports.SeAliasBackupOpsSid = SeAliasBackupOpsSid;
- SeExports->SeNullSid = SeNullSid; - SeExports->SeWorldSid = SeWorldSid; - SeExports->SeLocalSid = SeLocalSid; - SeExports->SeCreatorOwnerSid = SeCreatorOwnerSid; - SeExports->SeCreatorGroupSid = SeCreatorGroupSid; - SeExports->SeNtAuthoritySid = SeNtAuthoritySid; - SeExports->SeDialupSid = SeDialupSid; - SeExports->SeNetworkSid = SeNetworkSid; - SeExports->SeBatchSid = SeBatchSid; - SeExports->SeInteractiveSid = SeInteractiveSid; - SeExports->SeLocalSystemSid = SeLocalSystemSid; - SeExports->SeAliasAdminsSid = SeAliasAdminsSid; - SeExports->SeAliasUsersSid = SeAliasUsersSid; - SeExports->SeAliasGuestsSid = SeAliasGuestsSid; - SeExports->SeAliasPowerUsersSid = SeAliasPowerUsersSid; - SeExports->SeAliasAccountOpsSid = SeAliasAccountOpsSid; - SeExports->SeAliasSystemOpsSid = SeAliasSystemOpsSid; - SeExports->SeAliasPrintOpsSid = SeAliasPrintOpsSid; - SeExports->SeAliasBackupOpsSid = SeAliasBackupOpsSid; - + SeExports = &SepExports; return TRUE; }
@@ -498,7 +494,7 @@ DaclLength, SaclLength);
- Descriptor = ExAllocatePool(NonPagedPool, + Descriptor = ExAllocatePool(PagedPool, Length); RtlZeroMemory( Descriptor, Length );
_____
Modified: trunk/reactos/ntoskrnl/se/sid.c --- trunk/reactos/ntoskrnl/se/sid.c 2005-05-25 02:20:01 UTC (rev 15491) +++ trunk/reactos/ntoskrnl/se/sid.c 2005-05-25 04:16:56 UTC (rev 15492) @@ -67,7 +67,7 @@
SidLength2 = RtlLengthRequiredSid(2);
/* create NullSid */ - SeNullSid = ExAllocatePoolWithTag(NonPagedPool, + SeNullSid = ExAllocatePoolWithTag(PagedPool, SidLength1, TAG_SID); if (SeNullSid == NULL) @@ -81,7 +81,7 @@ *SubAuthority = SECURITY_NULL_RID;
/* create WorldSid */ - SeWorldSid = ExAllocatePoolWithTag(NonPagedPool, + SeWorldSid = ExAllocatePoolWithTag(PagedPool, SidLength1, TAG_SID); if (SeWorldSid == NULL) @@ -95,7 +95,7 @@ *SubAuthority = SECURITY_WORLD_RID;
/* create LocalSid */ - SeLocalSid = ExAllocatePoolWithTag(NonPagedPool, + SeLocalSid = ExAllocatePoolWithTag(PagedPool, SidLength1, TAG_SID); if (SeLocalSid == NULL) @@ -109,7 +109,7 @@ *SubAuthority = SECURITY_LOCAL_RID;
/* create CreatorOwnerSid */ - SeCreatorOwnerSid = ExAllocatePoolWithTag(NonPagedPool, + SeCreatorOwnerSid = ExAllocatePoolWithTag(PagedPool, SidLength1, TAG_SID); if (SeCreatorOwnerSid == NULL) @@ -123,7 +123,7 @@ *SubAuthority = SECURITY_CREATOR_OWNER_RID;
/* create CreatorGroupSid */ - SeCreatorGroupSid = ExAllocatePoolWithTag(NonPagedPool, + SeCreatorGroupSid = ExAllocatePoolWithTag(PagedPool, SidLength1, TAG_SID); if (SeCreatorGroupSid == NULL) @@ -137,7 +137,7 @@ *SubAuthority = SECURITY_CREATOR_GROUP_RID;
/* create CreatorOwnerServerSid */ - SeCreatorOwnerServerSid = ExAllocatePoolWithTag(NonPagedPool, + SeCreatorOwnerServerSid = ExAllocatePoolWithTag(PagedPool, SidLength1, TAG_SID); if (SeCreatorOwnerServerSid == NULL) @@ -151,7 +151,7 @@ *SubAuthority = SECURITY_CREATOR_OWNER_SERVER_RID;
/* create CreatorGroupServerSid */ - SeCreatorGroupServerSid = ExAllocatePoolWithTag(NonPagedPool, + SeCreatorGroupServerSid = ExAllocatePoolWithTag(PagedPool, SidLength1, TAG_SID); if (SeCreatorGroupServerSid == NULL) @@ -166,7 +166,7 @@
/* create NtAuthoritySid */ - SeNtAuthoritySid = ExAllocatePoolWithTag(NonPagedPool, + SeNtAuthoritySid = ExAllocatePoolWithTag(PagedPool, SidLength0, TAG_SID); if (SeNtAuthoritySid == NULL) @@ -177,7 +177,7 @@ 0);
/* create DialupSid */ - SeDialupSid = ExAllocatePoolWithTag(NonPagedPool, + SeDialupSid = ExAllocatePoolWithTag(PagedPool, SidLength1, TAG_SID); if (SeDialupSid == NULL) @@ -191,7 +191,7 @@ *SubAuthority = SECURITY_DIALUP_RID;
/* create NetworkSid */ - SeNetworkSid = ExAllocatePoolWithTag(NonPagedPool, + SeNetworkSid = ExAllocatePoolWithTag(PagedPool, SidLength1, TAG_SID); if (SeNetworkSid == NULL) @@ -205,7 +205,7 @@ *SubAuthority = SECURITY_NETWORK_RID;
/* create BatchSid */ - SeBatchSid = ExAllocatePoolWithTag(NonPagedPool, + SeBatchSid = ExAllocatePoolWithTag(PagedPool, SidLength1, TAG_SID); if (SeBatchSid == NULL) @@ -219,7 +219,7 @@ *SubAuthority = SECURITY_BATCH_RID;
/* create InteractiveSid */ - SeInteractiveSid = ExAllocatePoolWithTag(NonPagedPool, + SeInteractiveSid = ExAllocatePoolWithTag(PagedPool, SidLength1, TAG_SID); if (SeInteractiveSid == NULL) @@ -233,7 +233,7 @@ *SubAuthority = SECURITY_INTERACTIVE_RID;
/* create ServiceSid */ - SeServiceSid = ExAllocatePoolWithTag(NonPagedPool, + SeServiceSid = ExAllocatePoolWithTag(PagedPool, SidLength1, TAG_SID); if (SeServiceSid == NULL) @@ -247,7 +247,7 @@ *SubAuthority = SECURITY_SERVICE_RID;
/* create AnonymousLogonSid */ - SeAnonymousLogonSid = ExAllocatePoolWithTag(NonPagedPool, + SeAnonymousLogonSid = ExAllocatePoolWithTag(PagedPool, SidLength1, TAG_SID); if (SeAnonymousLogonSid == NULL) @@ -261,7 +261,7 @@ *SubAuthority = SECURITY_ANONYMOUS_LOGON_RID;
/* create PrincipalSelfSid */ - SePrincipalSelfSid = ExAllocatePoolWithTag(NonPagedPool, + SePrincipalSelfSid = ExAllocatePoolWithTag(PagedPool, SidLength1, TAG_SID); if (SePrincipalSelfSid == NULL) @@ -275,7 +275,7 @@ *SubAuthority = SECURITY_PRINCIPAL_SELF_RID;
/* create LocalSystemSid */ - SeLocalSystemSid = ExAllocatePoolWithTag(NonPagedPool, + SeLocalSystemSid = ExAllocatePoolWithTag(PagedPool, SidLength1, TAG_SID); if (SeLocalSystemSid == NULL) @@ -289,7 +289,7 @@ *SubAuthority = SECURITY_LOCAL_SYSTEM_RID;
/* create AuthenticatedUserSid */ - SeAuthenticatedUserSid = ExAllocatePoolWithTag(NonPagedPool, + SeAuthenticatedUserSid = ExAllocatePoolWithTag(PagedPool, SidLength1, TAG_SID); if (SeAuthenticatedUserSid == NULL) @@ -303,7 +303,7 @@ *SubAuthority = SECURITY_AUTHENTICATED_USER_RID;
/* create RestrictedCodeSid */ - SeRestrictedCodeSid = ExAllocatePoolWithTag(NonPagedPool, + SeRestrictedCodeSid = ExAllocatePoolWithTag(PagedPool, SidLength1, TAG_SID); if (SeRestrictedCodeSid == NULL) @@ -317,7 +317,7 @@ *SubAuthority = SECURITY_RESTRICTED_CODE_RID;
/* create AliasAdminsSid */ - SeAliasAdminsSid = ExAllocatePoolWithTag(NonPagedPool, + SeAliasAdminsSid = ExAllocatePoolWithTag(PagedPool, SidLength2, TAG_SID); if (SeAliasAdminsSid == NULL) @@ -335,7 +335,7 @@ *SubAuthority = DOMAIN_ALIAS_RID_ADMINS;
/* create AliasUsersSid */ - SeAliasUsersSid = ExAllocatePoolWithTag(NonPagedPool, + SeAliasUsersSid = ExAllocatePoolWithTag(PagedPool, SidLength2, TAG_SID); if (SeAliasUsersSid == NULL) @@ -353,7 +353,7 @@ *SubAuthority = DOMAIN_ALIAS_RID_USERS;
/* create AliasGuestsSid */ - SeAliasGuestsSid = ExAllocatePoolWithTag(NonPagedPool, + SeAliasGuestsSid = ExAllocatePoolWithTag(PagedPool, SidLength2, TAG_SID); if (SeAliasGuestsSid == NULL) @@ -371,7 +371,7 @@ *SubAuthority = DOMAIN_ALIAS_RID_GUESTS;
/* create AliasPowerUsersSid */ - SeAliasPowerUsersSid = ExAllocatePoolWithTag(NonPagedPool, + SeAliasPowerUsersSid = ExAllocatePoolWithTag(PagedPool, SidLength2, TAG_SID); if (SeAliasPowerUsersSid == NULL) @@ -389,7 +389,7 @@ *SubAuthority = DOMAIN_ALIAS_RID_POWER_USERS;
/* create AliasAccountOpsSid */ - SeAliasAccountOpsSid = ExAllocatePoolWithTag(NonPagedPool, + SeAliasAccountOpsSid = ExAllocatePoolWithTag(PagedPool, SidLength2, TAG_SID); if (SeAliasAccountOpsSid == NULL) @@ -407,7 +407,7 @@ *SubAuthority = DOMAIN_ALIAS_RID_ACCOUNT_OPS;
/* create AliasSystemOpsSid */ - SeAliasSystemOpsSid = ExAllocatePoolWithTag(NonPagedPool, + SeAliasSystemOpsSid = ExAllocatePoolWithTag(PagedPool, SidLength2, TAG_SID); if (SeAliasSystemOpsSid == NULL) @@ -425,7 +425,7 @@ *SubAuthority = DOMAIN_ALIAS_RID_SYSTEM_OPS;
/* create AliasPrintOpsSid */ - SeAliasPrintOpsSid = ExAllocatePoolWithTag(NonPagedPool, + SeAliasPrintOpsSid = ExAllocatePoolWithTag(PagedPool, SidLength2, TAG_SID); if (SeAliasPrintOpsSid == NULL) @@ -443,7 +443,7 @@ *SubAuthority = DOMAIN_ALIAS_RID_PRINT_OPS;
/* create AliasBackupOpsSid */ - SeAliasBackupOpsSid = ExAllocatePoolWithTag(NonPagedPool, + SeAliasBackupOpsSid = ExAllocatePoolWithTag(PagedPool, SidLength2, TAG_SID); if (SeAliasBackupOpsSid == NULL) _____
Modified: trunk/reactos/ntoskrnl/se/token.c --- trunk/reactos/ntoskrnl/se/token.c 2005-05-25 02:20:01 UTC (rev 15491) +++ trunk/reactos/ntoskrnl/se/token.c 2005-05-25 04:16:56 UTC (rev 15492) @@ -571,9 +571,9 @@
RtlZeroMemory(&ObjectTypeInitializer, sizeof(ObjectTypeInitializer)); RtlInitUnicodeString(&Name, L"Token"); ObjectTypeInitializer.Length = sizeof(ObjectTypeInitializer); - ObjectTypeInitializer.DefaultNonPagedPoolCharge = sizeof(TOKEN); + ObjectTypeInitializer.DefaultPagedPoolCharge = sizeof(TOKEN); ObjectTypeInitializer.GenericMapping = SepTokenMapping; - ObjectTypeInitializer.PoolType = NonPagedPool; + ObjectTypeInitializer.PoolType = PagedPool; ObjectTypeInitializer.ValidAccessMask = TOKEN_ALL_ACCESS; ObjectTypeInitializer.UseDefaultObject = TRUE; ObjectTypeInitializer.DeleteProcedure = SepDeleteToken; @@ -1853,7 +1853,7 @@ uSize += uAdminsLength;
AccessToken->UserAndGroups = - (PSID_AND_ATTRIBUTES)ExAllocatePoolWithTag(NonPagedPool, + (PSID_AND_ATTRIBUTES)ExAllocatePoolWithTag(PagedPool, uSize, TAG('T', 'O', 'K', 'u')); SidArea = &AccessToken->UserAndGroups[AccessToken->UserAndGroupCount]; @@ -1885,7 +1885,7 @@
uSize = AccessToken->PrivilegeCount * sizeof(LUID_AND_ATTRIBUTES); AccessToken->Privileges = - (PLUID_AND_ATTRIBUTES)ExAllocatePoolWithTag(NonPagedPool, + (PLUID_AND_ATTRIBUTES)ExAllocatePoolWithTag(PagedPool, uSize, TAG('T', 'O', 'K', 'p'));
@@ -1964,7 +1964,7 @@ uSize += sizeof(ACE) + uAdminsLength; uSize = (uSize & (~3)) + 8; AccessToken->DefaultDacl = - (PACL) ExAllocatePoolWithTag(NonPagedPool, + (PACL) ExAllocatePoolWithTag(PagedPool, uSize, TAG('T', 'O', 'K', 'd')); Status = RtlCreateAcl(AccessToken->DefaultDacl, uSize, ACL_REVISION);