mirror of
https://github.com/reactos/reactos.git
synced 2025-04-26 00:20:34 +00:00
[NTOS:MM] Handle PT references for page table faults in MmAccessFault
Idea from Timo Kreuzer
This commit is contained in:
parent
c7e09061ca
commit
afc27ab1aa
2 changed files with 8 additions and 9 deletions
|
@ -2314,7 +2314,14 @@ UserFault:
|
|||
* Check if this is a real user-mode address or actually a kernel-mode
|
||||
* page table for a user mode address
|
||||
*/
|
||||
if (Address <= MM_HIGHEST_USER_ADDRESS)
|
||||
if (Address <= MM_HIGHEST_USER_ADDRESS
|
||||
#if _MI_PAGING_LEVELS >= 3
|
||||
|| MiIsUserPte(Address)
|
||||
#if _MI_PAGING_LEVELS == 4
|
||||
|| MiIsUserPde(Address)
|
||||
#endif
|
||||
#endif
|
||||
)
|
||||
{
|
||||
/* Add an additional page table reference */
|
||||
MiIncrementPageTableReferences(Address);
|
||||
|
|
|
@ -2532,10 +2532,6 @@ MiMakePdeExistAndMakeValid(IN PMMPDE PointerPde,
|
|||
//
|
||||
if (!PointerPpe->u.Hard.Valid)
|
||||
{
|
||||
#if _MI_PAGING_LEVELS == 4
|
||||
if (PointerPpe->u.Long == 0)
|
||||
MiIncrementPageTableReferences(PointerPde);
|
||||
#endif
|
||||
MiMakeSystemAddressValid(PointerPde, TargetProcess);
|
||||
ASSERT(PointerPpe->u.Hard.Valid == 1);
|
||||
}
|
||||
|
@ -2544,10 +2540,6 @@ MiMakePdeExistAndMakeValid(IN PMMPDE PointerPde,
|
|||
//
|
||||
// And finally, make the PDE itself valid.
|
||||
//
|
||||
#if _MI_PAGING_LEVELS >= 3
|
||||
if (PointerPde->u.Long == 0)
|
||||
MiIncrementPageTableReferences(PointerPte);
|
||||
#endif
|
||||
MiMakeSystemAddressValid(PointerPte, TargetProcess);
|
||||
|
||||
/* Do not increment Page table refcount here for the PDE, this must be managed by caller */
|
||||
|
|
Loading…
Reference in a new issue