Author: sir_richard
Date: Wed Jul 21 18:09:31 2010
New Revision: 48164
URL:
http://svn.reactos.org/svn/reactos?rev=48164&view=rev
Log:
[NTOS]: Handle faults on user-mode addresses, from user-mode processes, if they are owned
by ARM3, so they can be forwarded to the VAD fault handler.
Modified:
trunk/reactos/ntoskrnl/mm/mmfault.c
Modified: trunk/reactos/ntoskrnl/mm/mmfault.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/mmfault.c?rev=…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/mmfault.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/mmfault.c [iso-8859-1] Wed Jul 21 18:09:31 2010
@@ -284,6 +284,11 @@
* can go away.
*/
MemoryArea = MmLocateMemoryAreaByAddress(MmGetKernelAddressSpace(), Address);
+ if (!(MemoryArea) && (Address <= MM_HIGHEST_VAD_ADDRESS))
+ {
+ /* Could this be a VAD fault from user-mode? */
+ MemoryArea = MmLocateMemoryAreaByAddress(MmGetCurrentAddressSpace(), Address);
+ }
if ((!(MemoryArea) && ((ULONG_PTR)Address >= (ULONG_PTR)MmPagedPoolStart))
||
((MemoryArea) && (MemoryArea->Type == MEMORY_AREA_OWNED_BY_ARM3)))
{
@@ -292,7 +297,7 @@
//
DPRINT("ARM3 fault %p\n", MemoryArea);
return MmArmAccessFault(StoreInstruction, Address, Mode, TrapInformation);
- }
+ }
/* Keep same old ReactOS Behaviour */
if (StoreInstruction)