https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8110a66b08605795e8df4e43da9c42314304f2b1

commit 8110a66b08605795e8df4e43da9c42314304f2b1
Author:     Serge Gautherie <[email protected]>
AuthorDate: Wed Sep 9 03:46:56 2020 +0200
Commit:     Victor Perevertkin <[email protected]>
CommitDate: Thu Nov 4 23:20:21 2021 +0300

    [NTOS:MM] MI_IS_*(): Improve documentation
    
    Intel 64 and IA-32 Architectures Software Developer’s Manual
    version 075 (June 2021)
---
 ntoskrnl/include/internal/amd64/mm.h | 13 ++++++++++---
 ntoskrnl/include/internal/i386/mm.h  | 13 ++++++++++---
 2 files changed, 20 insertions(+), 6 deletions(-)

diff --git a/ntoskrnl/include/internal/amd64/mm.h 
b/ntoskrnl/include/internal/amd64/mm.h
index 3d45788222e..a335728b3b9 100644
--- a/ntoskrnl/include/internal/amd64/mm.h
+++ b/ntoskrnl/include/internal/amd64/mm.h
@@ -118,9 +118,16 @@
 #endif
 
 /* Macros to identify the page fault reason from the error code */
-#define MI_IS_NOT_PRESENT_FAULT(FaultCode) !BooleanFlagOn(FaultCode, 0x1)
-#define MI_IS_WRITE_ACCESS(FaultCode) BooleanFlagOn(FaultCode, 0x2)
-#define MI_IS_INSTRUCTION_FETCH(FaultCode) BooleanFlagOn(FaultCode, 0x10)
+#define MI_IS_NOT_PRESENT_FAULT(FaultCode)  !BooleanFlagOn(FaultCode, 
0x00000001)
+#define MI_IS_WRITE_ACCESS(FaultCode)        BooleanFlagOn(FaultCode, 
0x00000002)
+// 0x00000004: user-mode access.
+// 0x00000008: reserved bit violation.
+#define MI_IS_INSTRUCTION_FETCH(FaultCode)   BooleanFlagOn(FaultCode, 
0x00000010)
+// 0x00000020: protection-key violation.
+// 0x00000040: shadow-stack access.
+// Bits 7-14: reserved.
+// 0x00008000: violation of SGX-specific access-control requirements.
+// Bits 16-31: reserved.
 
 /* On x64, these are the same */
 #define MI_WRITE_VALID_PPE MI_WRITE_VALID_PTE
diff --git a/ntoskrnl/include/internal/i386/mm.h 
b/ntoskrnl/include/internal/i386/mm.h
index f0622f685de..57b24e46d78 100644
--- a/ntoskrnl/include/internal/i386/mm.h
+++ b/ntoskrnl/include/internal/i386/mm.h
@@ -110,9 +110,16 @@
 
 
 /* Macros to identify the page fault reason from the error code */
-#define MI_IS_NOT_PRESENT_FAULT(FaultCode) !BooleanFlagOn(FaultCode, 0x1)
-#define MI_IS_WRITE_ACCESS(FaultCode) BooleanFlagOn(FaultCode, 0x2)
-#define MI_IS_INSTRUCTION_FETCH(FaultCode) BooleanFlagOn(FaultCode, 0x10)
+#define MI_IS_NOT_PRESENT_FAULT(FaultCode)  !BooleanFlagOn(FaultCode, 
0x00000001)
+#define MI_IS_WRITE_ACCESS(FaultCode)        BooleanFlagOn(FaultCode, 
0x00000002)
+// 0x00000004: user-mode access.
+// 0x00000008: reserved bit violation.
+#define MI_IS_INSTRUCTION_FETCH(FaultCode)   BooleanFlagOn(FaultCode, 
0x00000010)
+// 0x00000020: protection-key violation.
+// 0x00000040: shadow-stack access.
+// Bits 7-14: reserved.
+// 0x00008000: violation of SGX-specific access-control requirements.
+// Bits 16-31: reserved.
 
 /* On x86, these two are the same */
 #define MI_WRITE_VALID_PPE MI_WRITE_VALID_PTE

Reply via email to