Well, this one took us by surprise… MmBuildMdlForNonPagedPool is the standard shortcut function drivers use to build MDLs describing non-pageable memory. Despite the name, the buffer described by the MDL does not necessarily need to come from non-paged pool. For example, the documentation says it’s legal to call MmBuildMdlForNonPagedPool on the buffer returned by MmAllocateContiguousMemorySpecifyCache, […]
Beware of IoBuildDeviceIoControlRequest
Diagnosed yet another crash today that is likely due to the usage of IoBuildDeviceIoControlRequest. Long ago I was burned by this API and vowed to never use it again, but somehow I neglected to share this with everyone else. Sorry about that! The trouble with this API is that it’s an attractive nuisance. You need […]
Meltdown and Spectre: What about drivers?
The week the Meltdown and Spectre vulnerabilities was one of the most fun weeks I’ve had in a while. Not only were the vulnerabilities mind-bendingly clever, that week had just about everything you could possibly want in a story: mystery, intrigue, heroes, villains, and probably the greatest patch ever submitted. After consuming as much information […]
Binary Literals in VS2015 — I Can’t Wait!
There are a couple of feature of C/C++ in Visual Studio 2015 that are easy to overlook, but that I’m really looking forward to using. Two of those features that I’m most eagerly anticipating are support for binary literals and digit separators. Together, these promise to make life easier for Windows driver developers.
Windows Source Code on GitHub!
[WDF Source Available: https://github.com/Microsoft/Windows-Driver-Frameworks] OK, well, maybe that title was a bit misleading. But, it’s not entirely untrue: portions of the Kernel and User Mode Driver Frameworks are going to be available on GitHub for the benefit of the driver development community. The magnitude of this announcement cannot be understated as it represents a major paradigm shift […]
Is DMA Cache Coherent on ARM?
On NTDEV we had an interesting discussion about interlocked operations, which, being an NTDEV discussion, took many twists and turns along the way. Out of all the various tangents that occurred, one stuck out to me as it’s something that was worth highlighting: who is responsible for guaranteeing cache coherency of DMA operations on Windows? For example, imagine a […]