diff --git a/reactos/ntoskrnl/mm/virtual.c b/reactos/ntoskrnl/mm/virtual.c index e0fe34b1389..c860fb6ff22 100644 --- a/reactos/ntoskrnl/mm/virtual.c +++ b/reactos/ntoskrnl/mm/virtual.c @@ -175,6 +175,7 @@ MiQueryVirtualMemory (IN HANDLE ProcessHandle, switch(MemoryArea->Type) { case MEMORY_AREA_VIRTUAL_MEMORY: + case MEMORY_AREA_PEB_OR_TEB: Status = MmQueryAnonMem(MemoryArea, Address, Info, ResultLength); break; @@ -230,6 +231,18 @@ MiQueryVirtualMemory (IN HANDLE ProcessHandle, Status = STATUS_SUCCESS; *ResultLength = sizeof(MEMORY_BASIC_INFORMATION); break; + case MEMORY_AREA_PAGED_POOL: + Info->Type = 0; + Info->State = MEM_COMMIT; + Info->Protect = MemoryArea->Attributes; + Info->AllocationProtect = MemoryArea->Attributes; + Info->BaseAddress = MemoryArea->StartingAddress; + Info->AllocationBase = MemoryArea->StartingAddress; + Info->RegionSize = (ULONG_PTR)MemoryArea->EndingAddress - + (ULONG_PTR)MemoryArea->StartingAddress; + Status = STATUS_SUCCESS; + *ResultLength = sizeof(MEMORY_BASIC_INFORMATION); + break; default: DPRINT1("unhandled memory area type: 0x%x\n", MemoryArea->Type); Status = STATUS_UNSUCCESSFUL; @@ -1001,7 +1014,7 @@ ProbeForRead (IN CONST VOID *Address, ExRaiseStatus (STATUS_DATATYPE_MISALIGNMENT); } else if ((ULONG_PTR)Address + Length - 1 < (ULONG_PTR)Address || - (ULONG_PTR)Address + Length - 1 > (ULONG_PTR)MmUserProbeAddress) + (ULONG_PTR)Address + Length - 1 >= (ULONG_PTR)MmUserProbeAddress) { ExRaiseStatus (STATUS_ACCESS_VIOLATION); } @@ -1031,7 +1044,7 @@ ProbeForWrite (IN CONST VOID *Address, Last = (PCHAR)((ULONG_PTR)Address + Length - 1); if ((ULONG_PTR)Last < (ULONG_PTR)Address || - (ULONG_PTR)Last > (ULONG_PTR)MmUserProbeAddress) + (ULONG_PTR)Last >= (ULONG_PTR)MmUserProbeAddress) { ExRaiseStatus (STATUS_ACCESS_VIOLATION); }