[NTOS:MM] Since the _MMPTE_SUBSECTION structure for x86 (without PAE) uses the SubsectionAddressLow truncated by the least significant three bits, the _CONTROL_AREA, _LARGE_CONTROL_AREA, _SUBSECTION, _MSUBSECTION structures must be 8-byte aligned.

Corresponding checks in MmArmInitSystem() have been removed.
This commit is contained in:
Vadim Galyant 2020-01-24 09:29:40 +09:00 committed by Thomas Faber
parent 5032a40d33
commit 3c585d0e38
No known key found for this signature in database
GPG key ID: 076E7C3D44720826
2 changed files with 6 additions and 6 deletions

View file

@ -2298,10 +2298,6 @@ MmArmInitSystem(IN ULONG Phase,
MiInitMachineDependent(LoaderBlock);
#if DBG
/* The subection PTE format depends on things being 8-byte aligned */
ASSERT((sizeof(CONTROL_AREA) % 8) == 0);
ASSERT((sizeof(SUBSECTION) % 8) == 0);
/* Prototype PTEs are assumed to be in paged pool, so check if the math works */
PointerPte = (PMMPTE)MmPagedPoolStart;
MI_MAKE_PROTOTYPE_PTE(&TempPte, PointerPte);

View file

@ -505,7 +505,7 @@ typedef struct _MMSUBSECTION_FLAGS2
} MMSUBSECTION_FLAGS2;
//
// Control Area Structures
// Control Area Structures (8-byte aligned)
//
typedef struct _CONTROL_AREA
{
@ -528,6 +528,7 @@ typedef struct _CONTROL_AREA
ULONG WritableUserReferences;
ULONG QuadwordPad;
} CONTROL_AREA, *PCONTROL_AREA;
C_ASSERT((sizeof(CONTROL_AREA) % 8) == 0);
typedef struct _LARGE_CONTROL_AREA
{
@ -553,9 +554,10 @@ typedef struct _LARGE_CONTROL_AREA
LIST_ENTRY UserGlobalList;
ULONG SessionId;
} LARGE_CONTROL_AREA, *PLARGE_CONTROL_AREA;
C_ASSERT((sizeof(LARGE_CONTROL_AREA) % 8) == 0);
//
// Subsection and Mapped Subsection
// Subsection and Mapped Subsection (8-byte aligned)
//
typedef struct _SUBSECTION
{
@ -572,6 +574,7 @@ typedef struct _SUBSECTION
ULONG PtesInSubsection;
struct _SUBSECTION *NextSubsection;
} SUBSECTION, *PSUBSECTION;
C_ASSERT((sizeof(SUBSECTION) % 8) == 0);
typedef struct _MSUBSECTION
{
@ -595,6 +598,7 @@ typedef struct _MSUBSECTION
MMSUBSECTION_FLAGS2 SubsectionFlags2;
} u2;
} MSUBSECTION, *PMSUBSECTION;
C_ASSERT((sizeof(MSUBSECTION) % 8) == 0);
//
// Segment Object