https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4b4bff0642fd06fde2945…
commit 4b4bff0642fd06fde2945e711e70b366abbaa4a2
Author: Timo Kreuzer <timo.kreuzer(a)reactos.org>
AuthorDate: Sun Nov 1 15:13:36 2020 +0100
Commit: Jérôme Gardou <zefklop(a)users.noreply.github.com>
CommitDate: Tue Feb 16 18:02:57 2021 +0100
[NTOS:MM] Handle demand zero PTEs with MM_EXECUTE_READWRITE and MM_READWRITE
---
ntoskrnl/mm/ARM3/pagfault.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/ntoskrnl/mm/ARM3/pagfault.c b/ntoskrnl/mm/ARM3/pagfault.c
index eefee2b340b..6d60645debd 100644
--- a/ntoskrnl/mm/ARM3/pagfault.c
+++ b/ntoskrnl/mm/ARM3/pagfault.c
@@ -2262,12 +2262,13 @@ UserFault:
}
/* Quick check for demand-zero */
- if (TempPte.u.Long == (MM_READWRITE << MM_PTE_SOFTWARE_PROTECTION_BITS))
+ if ((TempPte.u.Long == (MM_READWRITE << MM_PTE_SOFTWARE_PROTECTION_BITS)) ||
+ (TempPte.u.Long == (MM_EXECUTE_READWRITE <<
MM_PTE_SOFTWARE_PROTECTION_BITS)))
{
/* Resolve the fault */
MiResolveDemandZeroFault(Address,
PointerPte,
- MM_READWRITE,
+ TempPte.u.Soft.Protection,
CurrentProcess,
MM_NOIRQL);