Author: sir_richard
Date: Sat Oct 16 21:02:48 2010
New Revision: 49177
URL:
http://svn.reactos.org/svn/reactos?rev=49177&view=rev
Log:
[NTOS]: Add MmProtectToValue array to convert MM/PTE protection values to Win32 protection
flags.
Modified:
trunk/reactos/ntoskrnl/mm/ARM3/miarm.h
trunk/reactos/ntoskrnl/mm/i386/page.c
Modified: trunk/reactos/ntoskrnl/mm/ARM3/miarm.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/miarm.h?r…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/miarm.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/miarm.h [iso-8859-1] Sat Oct 16 21:02:48 2010
@@ -152,6 +152,7 @@
#endif
extern const ULONG MmProtectToPteMask[32];
+extern const ULONG MmProtectToValue[32];
//
// Assertions for session images, addresses, and PTEs
Modified: trunk/reactos/ntoskrnl/mm/i386/page.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/i386/page.c?re…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/i386/page.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/i386/page.c [iso-8859-1] Sat Oct 16 21:02:48 2010
@@ -109,6 +109,43 @@
PTE_EXECUTE_WRITECOPY | PTE_WRITECOMBINED_CACHE,
};
+const
+ULONG MmProtectToValue[32] =
+{
+ PAGE_NOACCESS,
+ PAGE_READONLY,
+ PAGE_EXECUTE,
+ PAGE_EXECUTE_READ,
+ PAGE_READWRITE,
+ PAGE_WRITECOPY,
+ PAGE_EXECUTE_READWRITE,
+ PAGE_EXECUTE_WRITECOPY,
+ PAGE_NOACCESS,
+ PAGE_NOCACHE | PAGE_READONLY,
+ PAGE_NOCACHE | PAGE_EXECUTE,
+ PAGE_NOCACHE | PAGE_EXECUTE_READ,
+ PAGE_NOCACHE | PAGE_READWRITE,
+ PAGE_NOCACHE | PAGE_WRITECOPY,
+ PAGE_NOCACHE | PAGE_EXECUTE_READWRITE,
+ PAGE_NOCACHE | PAGE_EXECUTE_WRITECOPY,
+ PAGE_NOACCESS,
+ PAGE_GUARD | PAGE_READONLY,
+ PAGE_GUARD | PAGE_EXECUTE,
+ PAGE_GUARD | PAGE_EXECUTE_READ,
+ PAGE_GUARD | PAGE_READWRITE,
+ PAGE_GUARD | PAGE_WRITECOPY,
+ PAGE_GUARD | PAGE_EXECUTE_READWRITE,
+ PAGE_GUARD | PAGE_EXECUTE_WRITECOPY,
+ PAGE_NOACCESS,
+ PAGE_WRITECOMBINE | PAGE_READONLY,
+ PAGE_WRITECOMBINE | PAGE_EXECUTE,
+ PAGE_WRITECOMBINE | PAGE_EXECUTE_READ,
+ PAGE_WRITECOMBINE | PAGE_READWRITE,
+ PAGE_WRITECOMBINE | PAGE_WRITECOPY,
+ PAGE_WRITECOMBINE | PAGE_EXECUTE_READWRITE,
+ PAGE_WRITECOMBINE | PAGE_EXECUTE_WRITECOPY
+};
+
/* FUNCTIONS ***************************************************************/
BOOLEAN MmUnmapPageTable(PULONG Pt);