[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;
PMMPTE PointerPde, PointerPte, LastPte;
MMPTE PteContents;
PUSHORT UsedPageTableEntries;
//PUSHORT UsedPageTableEntries;
PMMPFN Pfn1;
ULONG ProtectionMask;
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
reference to the pagetable. */
UsedPageTableEntries = &MmWorkingSetList->UsedPageTableEntries[MiGetPdeOffset(MiPteToAddress(PointerPte))];
(*UsedPageTableEntries)++;
ASSERT((*UsedPageTableEntries) <= PTE_COUNT);
//UsedPageTableEntries = &MmWorkingSetList->UsedPageTableEntries[MiGetPdeOffset(MiPteToAddress(PointerPte))];
//(*UsedPageTableEntries)++;
//ASSERT((*UsedPageTableEntries) <= PTE_COUNT);
DPRINT1("HACK: Not increasing UsedPageTableEntries count!\n");
}
else if (PteContents.u.Hard.Valid == 1)
{
@ -1913,14 +1914,16 @@ MiProtectVirtualMemory(IN PEPROCESS Process,
/* TODO */
UNIMPLEMENTED;
}
/* Write the protection mask and write it with a TLB flush */
Pfn1->OriginalPte.u.Soft.Protection = ProtectionMask;
MiFlushTbAndCapture(Vad,
PointerPte,
ProtectionMask,
Pfn1,
TRUE);
else
{
/* Write the protection mask and write it with a TLB flush */
Pfn1->OriginalPte.u.Soft.Protection = ProtectionMask;
MiFlushTbAndCapture(Vad,
PointerPte,
ProtectionMask,
Pfn1,
TRUE);
}
}
else
{