mirror of
https://github.com/reactos/reactos.git
synced 2024-07-07 05:05:09 +00:00
[NTOS:MM]
- Generate PAGE_FAULT_IN_NONPAGED_AREA bugcheck for PTEs that have their protection set to zero. This gives a more useful error description than the infamous 'TempPte.u.Long != 0' assertion*. CORE-8679 #resolve * and is also What Windows Does(TM) svn path=/trunk/; revision=64885
This commit is contained in:
parent
a48fe43631
commit
f67ab25a16
|
@ -935,15 +935,15 @@ MiResolveTransitionFault(IN PVOID FaultingAddress,
|
|||
/* See if we should wait before terminating the fault */
|
||||
if (Pfn1->u3.e1.ReadInProgress == 1)
|
||||
{
|
||||
DPRINT1("The page is currently being read!\n");
|
||||
ASSERT(Pfn1->u1.Event != NULL);
|
||||
*InPageBlock = Pfn1->u1.Event;
|
||||
if (PointerPte == Pfn1->PteAddress)
|
||||
{
|
||||
DPRINT1("And this if for this particular PTE.\n");
|
||||
/* The PTE will be made valid by the thread serving the fault */
|
||||
return STATUS_SUCCESS; // FIXME: Maybe something more descriptive
|
||||
}
|
||||
DPRINT1("The page is currently being read!\n");
|
||||
ASSERT(Pfn1->u1.Event != NULL);
|
||||
*InPageBlock = Pfn1->u1.Event;
|
||||
if (PointerPte == Pfn1->PteAddress)
|
||||
{
|
||||
DPRINT1("And this if for this particular PTE.\n");
|
||||
/* The PTE will be made valid by the thread serving the fault */
|
||||
return STATUS_SUCCESS; // FIXME: Maybe something more descriptive
|
||||
}
|
||||
}
|
||||
|
||||
/* Windows checks there's some free pages and this isn't an in-page error */
|
||||
|
@ -1424,8 +1424,8 @@ MiDispatchFault(IN BOOLEAN StoreInstruction,
|
|||
|
||||
if (InPageBlock != NULL)
|
||||
{
|
||||
/* The page is being paged in by another process */
|
||||
KeWaitForSingleObject(InPageBlock, WrPageIn, KernelMode, FALSE, NULL);
|
||||
/* The page is being paged in by another process */
|
||||
KeWaitForSingleObject(InPageBlock, WrPageIn, KernelMode, FALSE, NULL);
|
||||
}
|
||||
|
||||
ASSERT(OldIrql == KeGetCurrentIrql());
|
||||
|
@ -1833,6 +1833,17 @@ _WARN("Session space stuff is not implemented yet!")
|
|||
(ULONG_PTR)TrapInformation,
|
||||
1);
|
||||
}
|
||||
|
||||
/* Check for no protecton at all */
|
||||
if (TempPte.u.Soft.Protection == MM_ZERO_ACCESS)
|
||||
{
|
||||
/* Bugcheck the system! */
|
||||
KeBugCheckEx(PAGE_FAULT_IN_NONPAGED_AREA,
|
||||
(ULONG_PTR)Address,
|
||||
StoreInstruction,
|
||||
(ULONG_PTR)TrapInformation,
|
||||
0);
|
||||
}
|
||||
}
|
||||
|
||||
/* Check for demand page */
|
||||
|
|
Loading…
Reference in a new issue