mirror of
https://github.com/reactos/reactos.git
synced 2024-11-18 13:01:40 +00:00
[NTOS:MM] Fix-up call site of traced PFNs when serving a page fault
This commit is contained in:
parent
146337cc50
commit
1c5ce8d11c
1 changed files with 29 additions and 0 deletions
|
@ -1286,6 +1286,14 @@ MiResolveProtoPteFault(IN BOOLEAN StoreInstruction,
|
|||
(ULONG)TempPte.u.Soft.Protection,
|
||||
Process,
|
||||
OldIrql);
|
||||
#if MI_TRACE_PFNS
|
||||
/* Update debug info */
|
||||
if (TrapInformation)
|
||||
MiGetPfnEntry(PointerProtoPte->u.Hard.PageFrameNumber)->CallSite = (PVOID)((PKTRAP_FRAME)TrapInformation)->Eip;
|
||||
else
|
||||
MiGetPfnEntry(PointerProtoPte->u.Hard.PageFrameNumber)->CallSite = _ReturnAddress();
|
||||
#endif
|
||||
|
||||
ASSERT(NT_SUCCESS(Status));
|
||||
}
|
||||
|
||||
|
@ -1637,6 +1645,14 @@ MiDispatchFault(IN ULONG FaultCode,
|
|||
ASSERT(KeAreAllApcsDisabled() == TRUE);
|
||||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
#if MI_TRACE_PFNS
|
||||
/* Update debug info */
|
||||
if (TrapInformation)
|
||||
MiGetPfnEntry(PointerPte->u.Hard.PageFrameNumber)->CallSite = (PVOID)((PKTRAP_FRAME)TrapInformation)->Eip;
|
||||
else
|
||||
MiGetPfnEntry(PointerPte->u.Hard.PageFrameNumber)->CallSite = _ReturnAddress();
|
||||
#endif
|
||||
|
||||
//
|
||||
// Make sure we're returning in a sane state and pass the status down
|
||||
//
|
||||
|
@ -2191,6 +2207,11 @@ UserFault:
|
|||
|
||||
#if MI_TRACE_PFNS
|
||||
UserPdeFault = FALSE;
|
||||
/* Update debug info */
|
||||
if (TrapInformation)
|
||||
MiGetPfnEntry(PointerPde->u.Hard.PageFrameNumber)->CallSite = (PVOID)((PKTRAP_FRAME)TrapInformation)->Eip;
|
||||
else
|
||||
MiGetPfnEntry(PointerPde->u.Hard.PageFrameNumber)->CallSite = _ReturnAddress();
|
||||
#endif
|
||||
/* We should come back with APCs enabled, and with a valid PDE */
|
||||
ASSERT(KeAreAllApcsDisabled() == TRUE);
|
||||
|
@ -2286,6 +2307,14 @@ UserFault:
|
|||
CurrentProcess,
|
||||
MM_NOIRQL);
|
||||
|
||||
#if MI_TRACE_PFNS
|
||||
/* Update debug info */
|
||||
if (TrapInformation)
|
||||
MiGetPfnEntry(PointerPte->u.Hard.PageFrameNumber)->CallSite = (PVOID)((PKTRAP_FRAME)TrapInformation)->Eip;
|
||||
else
|
||||
MiGetPfnEntry(PointerPte->u.Hard.PageFrameNumber)->CallSite = _ReturnAddress();
|
||||
#endif
|
||||
|
||||
/* Return the status */
|
||||
MiUnlockProcessWorkingSet(CurrentProcess, CurrentThread);
|
||||
return STATUS_PAGE_FAULT_DEMAND_ZERO;
|
||||
|
|
Loading…
Reference in a new issue