mirror of
https://github.com/reactos/reactos.git
synced 2024-11-20 06:15:26 +00:00
[NTOS]: Handle faults on non-demand-zero PTEs (and/or demand-zero PTEs that are not READWRITE (such as EXECUTE_READWRITE)).
svn path=/trunk/; revision=49186
This commit is contained in:
parent
ef0b6ce0bc
commit
3910f94f4a
1 changed files with 28 additions and 2 deletions
|
@ -929,11 +929,37 @@ MmArmAccessFault(IN BOOLEAN StoreInstruction,
|
|||
return STATUS_PAGE_FAULT_DEMAND_ZERO;
|
||||
}
|
||||
|
||||
/* Don't handle prototype PTEs yet -- only kernel demand zero PTEs */
|
||||
/* Get protection and check if it's a prototype PTE */
|
||||
ProtectionCode = TempPte.u.Soft.Protection;
|
||||
ASSERT(TempPte.u.Soft.Prototype == 0);
|
||||
ASSERT(TempPte.u.Long == 0);
|
||||
|
||||
/* Check for non-demand zero PTE */
|
||||
if (TempPte.u.Long != 0)
|
||||
{
|
||||
/* This is a page fault, check for valid protection */
|
||||
ASSERT(ProtectionCode != 0x100);
|
||||
|
||||
/* FIXME: Run MiAccessCheck */
|
||||
|
||||
/* Dispatch the fault */
|
||||
Status = MiDispatchFault(StoreInstruction,
|
||||
Address,
|
||||
PointerPte,
|
||||
NULL,
|
||||
FALSE,
|
||||
PsGetCurrentProcess(),
|
||||
TrapInformation,
|
||||
NULL);
|
||||
|
||||
/* Return the status */
|
||||
ASSERT(NT_SUCCESS(Status));
|
||||
ASSERT(KeGetCurrentIrql() <= APC_LEVEL);
|
||||
MiUnlockProcessWorkingSet(CurrentProcess, CurrentThread);
|
||||
return Status;
|
||||
}
|
||||
|
||||
/* Check if this address range belongs to a valid allocation (VAD) */
|
||||
ASSERT(TempPte.u.Long == 0);
|
||||
ProtoPte = MiCheckVirtualAddress(Address, &ProtectionCode, &Vad);
|
||||
if (ProtectionCode == MM_NOACCESS)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue