Discussion:
MmGetMdlByteCount < DataTransferLength with data corruption
(too old to reply)
Guilherme Moro
2010-06-25 20:02:29 UTC
Permalink
Hello all,

I'm seeing a problem in my disk driver, it receives a
MmGetMdlByteCount that is shorter than DataTransferLength,
MmGetMdlByteCount is not multiple of 512, and DataTransferLength comes
rounded - up to the next 512 boundarie.
This only happen in Vista/7, with a clean installation, and only when
booting from the disk, if I mount it somewhere else this dont occur.
Searching for a clue I found this discussion:

http://www.osronline.com/showthread.cfm?link=129406

But if I complete the request with DataTransferLength like someone
suggest in this thread, I got a data corruption scenario, because it
obviously corrupt the shorter buffer.

Anyone knows exactly what to do with this situation?

Using MmGetMdlByteCount when it is shorter actually works, but when it
come to be less than 1 page (512 bytes) I dont know if I need to pad
or trunk the results. Any idea?

Guilherme Moro
Guilherme Moro
2010-06-29 18:45:09 UTC
Permalink
Let me give some more information, so we see if somebody can help me.
=)

The "wrong" IRP that come rounded is sent by the system only when I
click to shutdown windows.

thanks

Guilherme
Post by Guilherme Moro
Hello all,
I'm seeing a problem in my disk driver, it receives a
MmGetMdlByteCount that is shorter than DataTransferLength,
MmGetMdlByteCount is not multiple of 512, and DataTransferLength comes
rounded - up to the next 512 boundarie.
This only happen in Vista/7, with a clean installation, and only when
booting from the disk, if I mount it somewhere else this dont occur.
http://www.osronline.com/showthread.cfm?link=129406
But if I complete the request with DataTransferLength like someone
suggest in this thread, I got a data corruption scenario, because it
obviously corrupt the shorter buffer.
Anyone knows exactly what to do with this situation?
Using MmGetMdlByteCount when it is shorter actually works, but when it
come to be less than 1 page (512 bytes) I dont know if I need to pad
or trunk the results. Any idea?
Guilherme Moro
Loading...