Okay, I understand that a driver can bypass your filter by calling an underlying filesystem directly. And I’d agree with Doron/Anton, that this is a “violation of a contract.”
In kernel space, there is little to no enforcement for violating a contract, but contracts must be followed to get anywhere. A contract may be as simple as a calling convention, a structure layout, which locks protect which parts of which structures, and ultimately, how to call a requested service. If you violate these contracts, your driver may still run, but the result will be a myriad of bugs.
I’m afraid I cannot prevent drivers bypassing your driver. I’m also afraid that you can’t either. Another driver could have read the old dispatch table and cached its contents, calling behind your driver. Or it could grovel through the target driver’s export table looking for a particular function, and call it directly. Or, it could “know” that it wants to call TargetDriver+0x1000, manually push something onto the stack, and jmp. Your driver and their driver exist in the same security domain. You can try to make a war of escalation, but you can never be sure that you’ve won it. Whether you patch the dispatch table or not, you can be bypassed by code hell-bent on bypassing you.
In terms of the support question, we have a model which enables you to perform this task in the filesystem space (called the filter stack.) Yes, you can be bypassed, just as you could be bypassed by patching a dispatch table. But, when drivers behave themselves, we can load multiple drivers patching the same routines with predictable behavior; synchronize load and unload; attach on a per device rather than per driver basis, etc, etc, etc.
So again, I return to my previous post: I’m looking for a compelling reason. I understand your frustration about being bypassed, but this (IMO) does not amount to a compelling reason, since patching the dispatch table cannot reliably prevent this bypass vector. It only closes the hole for drivers which are “well behaved”, and “well behaved” drivers should be calling through the filter stack. The main result is a myriad of other bugs (most of the ones I debugged involved load/unload being completely unsychronized, and what happens to in-flight requests at this time.) These are solved by using the filter stack.