mirror of
https://github.com/reactos/reactos.git
synced 2025-01-03 21:09:19 +00:00
[NTOS]: Add MmProtectToValue array to convert MM/PTE protection values to Win32 protection flags.
svn path=/trunk/; revision=49177
This commit is contained in:
parent
8cf3c262f2
commit
55e59a3673
2 changed files with 38 additions and 0 deletions
|
@ -152,6 +152,7 @@ C_ASSERT(SYSTEM_PD_SIZE == PAGE_SIZE);
|
|||
#endif
|
||||
|
||||
extern const ULONG MmProtectToPteMask[32];
|
||||
extern const ULONG MmProtectToValue[32];
|
||||
|
||||
//
|
||||
// Assertions for session images, addresses, and PTEs
|
||||
|
|
|
@ -109,6 +109,43 @@ MmProtectToPteMask[32] =
|
|||
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);
|
||||
|
|
Loading…
Reference in a new issue