How to share HW resources with another driver not in the same PnP hierarchy

First, I have to say that I don’t agree with this design pattern at all.  I think it leads to too many problems and complications that are not worth the pain.  The only reason I am writing this entry is that I have seen so many people get this wrong or not account for some…

1

WdfDeviceRetrieveDeviceInterfaceString and PDOs

When you initially create a PDO, it takes a few steps for PnP to recognize it.  I wrote this problem of determining when a PDO becomes a PDO last year.  At the end of the post I mentioned that KMDF handles all of this state management for you underneath the covers.  This works for 99%…

1

Setting a security descriptor on a legacy device object

Setting the security descriptor allows you to control who can open a handle to the device object.  Typically you can call IoCreateDeviceSecure to create the device object and have the correct DACL from the start.  One issue with IoCreateDeviceSecure is that the SDDL string is limited to what it can describe, primarily you can only…

1

Fast Resume and how if affects your driver

Fast resume, which was introduced in Windows XP,  is often mentioned when implementing power support in your WDM driver.  But what does “fast resume” mean and when implementing fast resume, what side effects occur in your driver?  I’ll to answer both of these questions as well as the reasoning behind this feature.  When I started to write this…

2

Vista IO manager changes in handling FILE_DEVICE_SECURE_OPEN

After having the IO manager developer review my last 2 posts, he pointed out to me that the IO manager handling of FILE_DEVICE_SECURE_OPEN (FDSO) has changed slightly in Vista.  News to me and probably news to all of you as well.   The change involves the case where there is a file system mounted on a…

1

Making sure the IO manager evaluates the security of your device

Last time I wrote about how the IO manager handles the creation of file handles and pointed out a potential security hole.  If there is a namespace (or path) after your device’s name in the path passed to CreateFile, the IO managed does not evaluate the security settings set on your device and relies on your driver…

1

Devices and namespaces (or how the IO manager handles file creation)

Ever wonder how the creation of a handle works?  It doesn’t matter type of resource the handle you are opening is backed by (a COM port, a file, a network share, a custom piece of hardware, etc), it all goes through CreateFile (which should be a little obvious since the only way to open an type of handle…

4

I am back

First off, man have I been lame.  I fell off the blogging horse and it has taken me nearly 3 months to get back on.  Posts should be more regular going forward.  Typically I use the gaps during the work day to write an entry, but these past few months (going back to April) I…

1