mirror of
https://github.com/reactos/reactos.git
synced 2024-11-02 12:53:33 +00:00
[NTOS:MM] Remove residual hack from commit 864a1bc6a
(r55323).
This commit is contained in:
parent
a0b1a01c59
commit
58983061e9
|
@ -135,24 +135,6 @@ MiIsProtectionCompatible(IN ULONG SectionPageProtection,
|
|||
return ((CompatibleMask | NewSectionPageProtection) == CompatibleMask);
|
||||
}
|
||||
|
||||
ACCESS_MASK
|
||||
NTAPI
|
||||
MiArm3GetCorrectFileAccessMask(IN ACCESS_MASK SectionPageProtection)
|
||||
{
|
||||
ULONG ProtectionMask;
|
||||
|
||||
/* Calculate the protection mask and make sure it's valid */
|
||||
ProtectionMask = MiMakeProtectionMask(SectionPageProtection);
|
||||
if (ProtectionMask == MM_INVALID_PROTECTION)
|
||||
{
|
||||
DPRINT1("Invalid protection mask\n");
|
||||
return STATUS_INVALID_PAGE_PROTECTION;
|
||||
}
|
||||
|
||||
/* Now convert it to the required file access */
|
||||
return MmMakeFileAccess[ProtectionMask & 0x7];
|
||||
}
|
||||
|
||||
ULONG
|
||||
NTAPI
|
||||
MiMakeProtectionMask(IN ULONG Protect)
|
||||
|
@ -2521,11 +2503,16 @@ MmCreateArm3Section(OUT PVOID *SectionObject,
|
|||
(SectionPageProtection & PAGE_NOACCESS)));
|
||||
|
||||
/* Convert section flag to page flag */
|
||||
if (AllocationAttributes & SEC_NOCACHE) SectionPageProtection |= PAGE_NOCACHE;
|
||||
if (AllocationAttributes & SEC_NOCACHE)
|
||||
SectionPageProtection |= PAGE_NOCACHE;
|
||||
|
||||
/* Check to make sure the protection is correct. Nt* does this already */
|
||||
ProtectionMask = MiMakeProtectionMask(SectionPageProtection);
|
||||
if (ProtectionMask == MM_INVALID_PROTECTION) return STATUS_INVALID_PAGE_PROTECTION;
|
||||
if (ProtectionMask == MM_INVALID_PROTECTION)
|
||||
{
|
||||
DPRINT1("Invalid protection mask\n");
|
||||
return STATUS_INVALID_PAGE_PROTECTION;
|
||||
}
|
||||
|
||||
/* Check if this is going to be a data or image backed file section */
|
||||
if ((FileHandle) || (FileObject))
|
||||
|
|
|
@ -220,8 +220,7 @@ static ULONG SectionCharacteristicsToProtect[16] =
|
|||
PAGE_EXECUTE_READWRITE, /* 15 = WRITABLE, READABLE, EXECUTABLE, SHARED */
|
||||
};
|
||||
|
||||
extern ULONG MmMakeFileAccess [];
|
||||
ACCESS_MASK NTAPI MiArm3GetCorrectFileAccessMask(IN ACCESS_MASK SectionPageProtection);
|
||||
extern ACCESS_MASK MmMakeFileAccess[8];
|
||||
static GENERIC_MAPPING MmpSectionMapping =
|
||||
{
|
||||
STANDARD_RIGHTS_READ | SECTION_MAP_READ | SECTION_QUERY,
|
||||
|
|
Loading…
Reference in a new issue