[NTOS:MM]
authorThomas Faber <thomas.faber@reactos.org>
Fri, 7 Aug 2015 15:52:04 +0000 (15:52 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Fri, 7 Aug 2015 15:52:04 +0000 (15:52 +0000)
- Allow (and then ignore) PAGE_NOCACHE in the protection flags for MmMapViewOfSection
CORE-9808

svn path=/trunk/; revision=68611

reactos/ntoskrnl/include/internal/mm.h
reactos/ntoskrnl/mm/section.c

index 6a77a0c..be245aa 100644 (file)
@@ -115,7 +115,8 @@ typedef ULONG_PTR SWAPENTRY;
      PAGE_EXECUTE_READ | \
      PAGE_EXECUTE_READWRITE | \
      PAGE_EXECUTE_WRITECOPY | \
-     PAGE_NOACCESS)
+     PAGE_NOACCESS | \
+     PAGE_NOCACHE)
 
 #define PAGE_IS_READABLE                    \
     (PAGE_READONLY | \
index b1d018a..cdcebdf 100644 (file)
@@ -4484,6 +4484,8 @@ MmMapViewOfSection(IN PVOID SectionObject,
         return STATUS_INVALID_PAGE_PROTECTION;
     }
 
+    /* FIXME: We should keep this, but it would break code checking equality */
+    Protect &= PAGE_NOCACHE;
 
     Section = (PROS_SECTION_OBJECT)SectionObject;
     AddressSpace = &Process->Vm;