[NTOS/MM]

- Hack away UsedPageTable referencing in MiProtectVirtualMemory for now to help testman.

svn path=/trunk/; revision=57055
This commit is contained in:
Aleksey Bragin 2012-08-09 20:19:52 +00:00
parent 2d7441f3ce
commit 327b7ed096

View file

@ -1763,7 +1763,7 @@ MiProtectVirtualMemory(IN PEPROCESS Process,
ULONG_PTR StartingAddress, EndingAddress; ULONG_PTR StartingAddress, EndingAddress;
PMMPTE PointerPde, PointerPte, LastPte; PMMPTE PointerPde, PointerPte, LastPte;
MMPTE PteContents; MMPTE PteContents;
PUSHORT UsedPageTableEntries; //PUSHORT UsedPageTableEntries;
PMMPFN Pfn1; PMMPFN Pfn1;
ULONG ProtectionMask; ULONG ProtectionMask;
NTSTATUS Status = STATUS_SUCCESS; NTSTATUS Status = STATUS_SUCCESS;
@ -1894,9 +1894,10 @@ MiProtectVirtualMemory(IN PEPROCESS Process,
{ {
/* This used to be a zero PTE and it no longer is, so we must add a /* This used to be a zero PTE and it no longer is, so we must add a
reference to the pagetable. */ reference to the pagetable. */
UsedPageTableEntries = &MmWorkingSetList->UsedPageTableEntries[MiGetPdeOffset(MiPteToAddress(PointerPte))]; //UsedPageTableEntries = &MmWorkingSetList->UsedPageTableEntries[MiGetPdeOffset(MiPteToAddress(PointerPte))];
(*UsedPageTableEntries)++; //(*UsedPageTableEntries)++;
ASSERT((*UsedPageTableEntries) <= PTE_COUNT); //ASSERT((*UsedPageTableEntries) <= PTE_COUNT);
DPRINT1("HACK: Not increasing UsedPageTableEntries count!\n");
} }
else if (PteContents.u.Hard.Valid == 1) else if (PteContents.u.Hard.Valid == 1)
{ {
@ -1913,14 +1914,16 @@ MiProtectVirtualMemory(IN PEPROCESS Process,
/* TODO */ /* TODO */
UNIMPLEMENTED; UNIMPLEMENTED;
} }
else
/* Write the protection mask and write it with a TLB flush */ {
Pfn1->OriginalPte.u.Soft.Protection = ProtectionMask; /* Write the protection mask and write it with a TLB flush */
MiFlushTbAndCapture(Vad, Pfn1->OriginalPte.u.Soft.Protection = ProtectionMask;
PointerPte, MiFlushTbAndCapture(Vad,
ProtectionMask, PointerPte,
Pfn1, ProtectionMask,
TRUE); Pfn1,
TRUE);
}
} }
else else
{ {