diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2019-09-18 21:39:23 +0200 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2019-09-18 21:39:23 +0200 |
commit | 34c4ec281e24068f192ee56efe45ebd83ecb323f (patch) | |
tree | 90f52c441126cda392869ef38085a140018a0b17 /KMemDriver | |
parent | ecc2960c0848a41534759d693896031bc21ffc60 (diff) |
added debug message in KMemDriver if the system decides to change the alloc'd address and size
Diffstat (limited to 'KMemDriver')
-rw-r--r-- | KMemDriver/KMemDriver.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/KMemDriver/KMemDriver.c b/KMemDriver/KMemDriver.c index b49aa65..23916ef 100644 --- a/KMemDriver/KMemDriver.c +++ b/KMemDriver/KMemDriver.c @@ -598,6 +598,11 @@ NTSTATUS KRThread(IN PVOID pArg) vr->SizeRes = vr->SizeReq; vr->AddressRes = vr->AddressReq; vr->StatusRes = AllocMemoryToProcess(lastPEP, &vr->AddressRes, &vr->SizeRes, vr->Protection); + if (NT_SUCCESS(vr->StatusRes) && + (vr->AddressReq != vr->AddressRes || vr->SizeReq != vr->StatusRes)) + { + KDBG("System changed VALLOC address to 0x%p and size 0x%lX\n", vr->AddressRes, vr->SizeRes); + } siz = sizeof *vr; KeWriteVirtualMemory(ctrlPEP, vr, (PVOID)SHMEM_ADDR, &siz); |