title | description | ms.date |
---|---|---|
VirtualStorport Rule Set (Storport) |
Use these rules to verify that your driver correctly calls DDIs that are of particular interest to Storport virtual miniport (VMiniport) drivers. |
05/21/2018 |
Use these rules to verify that your driver correctly calls DDIs that are of particular interest to Storport virtual miniport (VMiniport) drivers.
Topic | Description |
---|---|
This rule verifies that the driver does not attempt to free the same block of pool memory twice. |
|
This rule verifies that KeSetEvent is not called twice on the same event object. If the same event object is passed to the routine, the driver fails the rule. |
|
This rule verifies that an IRP that was allocated by IoAllocateIrp either will be freed by IoFreeIrp or its completion routine will get set by IoSetCompletionRoutine. |
|
This rule verifies that upon exit from the HwStorFindAdapter routine, the VirtualDevice field in the PORT_CONFIGURATION_INFORMATION (Storport) structure has been set to FALSE. The rule applies only to physical StorPort miniports. |
|
This rule verifies that upon exit from the HwStorFindAdapter routine, the VirtualDevice field in the PORT_CONFIGURATION_INFORMATION (Storport) structure has been set to TRUE. The rule applies only to virtual StorPort miniports. |
|
This rule verifies that the driver's calls to certain synchronization functions are made only while normal kernel APC delivery is disabled. |
|
This rule verifies that the handle to a registry key created with ZwCreateKey is subsequently used correctly by other ZwXxx routines. The ZwOpenKey routine must not be called on an already open handle. The routines ZwEnumerateKey, ZwEnumerateValueKey, ZwFlushKey, ZwQueryKey, ZwQueryValueKey, ZwSetValueKey, ZwClose, and ZwDeleteKey must not be called on a handle that isn't open. The handle must also be closed before returning. |
|
This rule verifies that the handle to the registry key opened via ZwOpenKey is subsequently used correctly by other ZwXxx routines. The routines ZwEnumerateKey, ZwEnumerateValueKey, ZwFlushKey, ZwQueryKey, ZwQueryValueKey, ZwSetValueKey, ZwClose, and ZwDeleteKey must not be called on a handle that isn't open. The handle must also be closed before returning. |
To select the VirtualStorport rule set
-
Select your driver project (.vcxProj) in Microsoft Visual Studio. From the Driver menu, click Launch Static Driver Verifier….
-
Click the Rules tab. Under Rule Sets, select VirtualStorport.
To select the default rule set from a Visual Studio developer command prompt window, specify VirtualStorport.sdv with the /check option. For example:
msbuild /t:sdv /p:Inputs="/check:VirtualStorport.sdv" mydriver.VcxProj /p:Configuration="Win8 Release" /p:Platform=Win32
For more information, see Using Static Driver Verifier to Find Defects in Drivers and Static Driver Verifier commands (MSBuild).