[NTOS:MM] Pass page fault code to MmAccessFault
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Mon, 1 Jan 2018 14:25:45 +0000 (15:25 +0100)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Sat, 6 Jan 2018 17:20:24 +0000 (18:20 +0100)
commit3021c2d571ad04c60840f2dcdf46af67b13f4c4d
tree57c2e5b0cddbb28eee13d3555ebcc4a68b40a187
parentfe50c655aa43ec7f58ea6ef130da349cf30c6ec2
[NTOS:MM] Pass page fault code to MmAccessFault
Note: before we had a BOOLEAN parameter called StoreInstruction, but in reality it was not specifying whether the fault was from a store store instruction, but whether it was an access violation rather than a page-not-present fault. On x86 without PAE there are only 2 kinds of access violations: (1) Access of a kernel mode page from user mode, which is handled early and (2) access of a read-only (or COW) page with a writing instruction. Therefore we could get away with this, even though it relied on the wrong assumption that a fault, which was not a page-not-present-fault, was automatically a write access. This commit only changes one thing: we pass the full fault-code to MmAccessFault and handle the rest from there in exactly the same way as before. More changes are coming to make things clear.
ntoskrnl/include/internal/amd64/mm.h
ntoskrnl/include/internal/arm/mm.h
ntoskrnl/include/internal/i386/mm.h
ntoskrnl/include/internal/mm.h
ntoskrnl/ke/amd64/trap.S
ntoskrnl/ke/arm/trapc.c
ntoskrnl/ke/i386/traphdlr.c
ntoskrnl/mm/mmfault.c