mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 09:22:58 +00:00
[NTOS/MM] Add Protection parameter to MiResolveDemandZeroFault
This commit is contained in:
parent
699b8bf857
commit
1240ed9e18
1 changed files with 10 additions and 3 deletions
|
@ -564,10 +564,12 @@ MiCopyPfn(
|
||||||
MiReleaseSystemPtes(SysPtes, 2, SystemPteSpace);
|
MiReleaseSystemPtes(SysPtes, 2, SystemPteSpace);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
NTAPI
|
NTAPI
|
||||||
MiResolveDemandZeroFault(IN PVOID Address,
|
MiResolveDemandZeroFault(IN PVOID Address,
|
||||||
IN PMMPTE PointerPte,
|
IN PMMPTE PointerPte,
|
||||||
|
IN ULONG Protection,
|
||||||
IN PEPROCESS Process,
|
IN PEPROCESS Process,
|
||||||
IN KIRQL OldIrql)
|
IN KIRQL OldIrql)
|
||||||
{
|
{
|
||||||
|
@ -689,7 +691,7 @@ MiResolveDemandZeroFault(IN PVOID Address,
|
||||||
/* User fault, build a user PTE */
|
/* User fault, build a user PTE */
|
||||||
MI_MAKE_HARDWARE_PTE_USER(&TempPte,
|
MI_MAKE_HARDWARE_PTE_USER(&TempPte,
|
||||||
PointerPte,
|
PointerPte,
|
||||||
PointerPte->u.Soft.Protection,
|
Protection,
|
||||||
PageFrameNumber);
|
PageFrameNumber);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -697,7 +699,7 @@ MiResolveDemandZeroFault(IN PVOID Address,
|
||||||
/* This is a user-mode PDE, create a kernel PTE for it */
|
/* This is a user-mode PDE, create a kernel PTE for it */
|
||||||
MI_MAKE_HARDWARE_PTE(&TempPte,
|
MI_MAKE_HARDWARE_PTE(&TempPte,
|
||||||
PointerPte,
|
PointerPte,
|
||||||
PointerPte->u.Soft.Protection,
|
Protection,
|
||||||
PageFrameNumber);
|
PageFrameNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1246,6 +1248,7 @@ MiResolveProtoPteFault(IN BOOLEAN StoreInstruction,
|
||||||
/* Resolve the demand zero fault */
|
/* Resolve the demand zero fault */
|
||||||
Status = MiResolveDemandZeroFault(Address,
|
Status = MiResolveDemandZeroFault(Address,
|
||||||
PointerProtoPte,
|
PointerProtoPte,
|
||||||
|
(ULONG)TempPte.u.Soft.Protection,
|
||||||
Process,
|
Process,
|
||||||
OldIrql);
|
OldIrql);
|
||||||
ASSERT(NT_SUCCESS(Status));
|
ASSERT(NT_SUCCESS(Status));
|
||||||
|
@ -1593,6 +1596,7 @@ MiDispatchFault(IN BOOLEAN StoreInstruction,
|
||||||
//
|
//
|
||||||
Status = MiResolveDemandZeroFault(Address,
|
Status = MiResolveDemandZeroFault(Address,
|
||||||
PointerPte,
|
PointerPte,
|
||||||
|
(ULONG)TempPte.u.Soft.Protection,
|
||||||
Process,
|
Process,
|
||||||
MM_NOIRQL);
|
MM_NOIRQL);
|
||||||
ASSERT(KeAreAllApcsDisabled() == TRUE);
|
ASSERT(KeAreAllApcsDisabled() == TRUE);
|
||||||
|
@ -2032,6 +2036,7 @@ UserFault:
|
||||||
#if 0
|
#if 0
|
||||||
/* Resolve a demand zero fault */
|
/* Resolve a demand zero fault */
|
||||||
Status = MiResolveDemandZeroFault(PointerPpe,
|
Status = MiResolveDemandZeroFault(PointerPpe,
|
||||||
|
PointerPxe,
|
||||||
MM_READWRITE,
|
MM_READWRITE,
|
||||||
CurrentProcess,
|
CurrentProcess,
|
||||||
MM_NOIRQL);
|
MM_NOIRQL);
|
||||||
|
@ -2052,6 +2057,7 @@ UserFault:
|
||||||
#if 0
|
#if 0
|
||||||
/* Resolve a demand zero fault */
|
/* Resolve a demand zero fault */
|
||||||
Status = MiResolveDemandZeroFault(PointerPde,
|
Status = MiResolveDemandZeroFault(PointerPde,
|
||||||
|
PointerPpe,
|
||||||
MM_READWRITE,
|
MM_READWRITE,
|
||||||
CurrentProcess,
|
CurrentProcess,
|
||||||
MM_NOIRQL);
|
MM_NOIRQL);
|
||||||
|
@ -2061,7 +2067,7 @@ UserFault:
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Check if the PDE is valid */
|
/* Check if the PDE is invalid */
|
||||||
if (PointerPde->u.Hard.Valid == 0)
|
if (PointerPde->u.Hard.Valid == 0)
|
||||||
{
|
{
|
||||||
/* Right now, we only handle scenarios where the PDE is totally empty */
|
/* Right now, we only handle scenarios where the PDE is totally empty */
|
||||||
|
@ -2180,6 +2186,7 @@ UserFault:
|
||||||
/* Resolve the fault */
|
/* Resolve the fault */
|
||||||
MiResolveDemandZeroFault(Address,
|
MiResolveDemandZeroFault(Address,
|
||||||
PointerPte,
|
PointerPte,
|
||||||
|
MM_READWRITE,
|
||||||
CurrentProcess,
|
CurrentProcess,
|
||||||
MM_NOIRQL);
|
MM_NOIRQL);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue