From aa52dc7498dafc07c51919e5210fd0505b4c1930 Mon Sep 17 00:00:00 2001 From: Thomas Faber Date: Fri, 7 Aug 2015 15:52:04 +0000 Subject: [PATCH] [NTOS:MM] - 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 | 3 ++- reactos/ntoskrnl/mm/section.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/reactos/ntoskrnl/include/internal/mm.h b/reactos/ntoskrnl/include/internal/mm.h index 6a77a0cdb70..be245aac72a 100644 --- a/reactos/ntoskrnl/include/internal/mm.h +++ b/reactos/ntoskrnl/include/internal/mm.h @@ -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 | \ diff --git a/reactos/ntoskrnl/mm/section.c b/reactos/ntoskrnl/mm/section.c index b1d018a09c5..cdcebdf5fc0 100644 --- a/reactos/ntoskrnl/mm/section.c +++ b/reactos/ntoskrnl/mm/section.c @@ -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;