From 789d7a7741aeb95a2000fa4e5c5631503b1e29cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Gardou?= Date: Mon, 2 Aug 2021 18:48:07 +0200 Subject: [PATCH] [NTOS:MM] When mapping pages for zeroing them, disable cache, enable write through Idea from Thomas Faber --- ntoskrnl/mm/ARM3/hypermap.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ntoskrnl/mm/ARM3/hypermap.c b/ntoskrnl/mm/ARM3/hypermap.c index 4113814e6a6..e72a6878cc7 100644 --- a/ntoskrnl/mm/ARM3/hypermap.c +++ b/ntoskrnl/mm/ARM3/hypermap.c @@ -150,6 +150,10 @@ MiMapPagesInZeroSpace(IN PMMPFN Pfn1, PointerPte += (Offset + 1); TempPte = ValidKernelPte; + /* Disable cache. Write through */ + MI_PAGE_DISABLE_CACHE(&TempPte); + MI_PAGE_WRITE_THROUGH(&TempPte); + /* Make sure the list isn't empty and loop it */ ASSERT(Pfn1 != (PVOID)LIST_HEAD); while (Pfn1 != (PVOID)LIST_HEAD)