The giveaway is the fact that in the kernel, you have a kernel address.
There are many potential causes for this, and here's some guesses...
If you use buffered I/O (unlikely) this is the kernel buffer into which it
was copied
If you are using direct I/O, and the controller does not have scatter-gather
capability, this is an internal kernel buffer of contiguous memory into
which the scattered pages have been copied
If you have the Driver Verifier running, and it is in the mood to do so, it
has remapped the buffers to its own internal buffers which it is using to
help check DMA
If you are using programmed I/O, this is the remapped kernel address which
is an alias to the user buffer; this is essential if you ever expect to use
the user buffer in the kernel (MmGetSystemAddressForMdlSafe, for example)
I missed if this was a mirrored file system, but this could be the address
of the pages in the file system cache, which at this point is just now being
actually written to the device(s)
I did not see the messages leading up to this, so I'm working here with
incredibly incomplete information. So these are just my best guesses at
what might be happening (any of the above would account for what you see,
and there may be more explanations)
joe
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@hotmail.com
Sent: Sunday, October 03, 2010 1:31 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Mirror Driver
Hi,
Thanks Tim, that proved a good help.
I seem to have one last (probably obvious thing). The code below worked
until I rewrote the function, so I can get it to work but I would like to
understand something. Below if I send a memory address from the App to the
Driver, it's address is different. Can someone explain to me why.
Driver
ServiceDesktopImage = (PMIRRORMEMORY) pvIn; // Is 0x9C85FD00
DbgPrint("ServiceDesktopImage='0x%08X'.\n", (ULONG) ServiceDesktopImage);
App
ServiceDesktopImage = (PMIRRORMEMORY) malloc(sizeof(MIRRORMEMORY)+1);
memset(ServiceDesktopImage, 0, sizeof(MIRRORMEMORY));
ExtEscape(hdc, 0x2000, 1, (LPCSTR)ServiceDesktopImage, 0, NULL); // Is
0x00A80020
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
To unsubscribe, visit the List Server section of OSR Online at
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.