Muokkaa

Jaa


Supported Drivers

For SDV to verify a driver, it must be able to interpret the driver code, specifically, the driver's entry points and the code in functions and routines that support required driver functionality.

The following sections describe the basic requirements for drivers and the specific syntax that SDV expects of the drivers that it verifies. SDV does not verify that drivers comply with these requirements, but if the driver does not comply, SDV may fail to run and, in rare situations, it reports false positive or false negative results because of misinterpretation.

Important

SDV is no longer supported and SDV is not available in Windows 24H2 WDK or EWDK releases. It is not available in WDKs newer than build 26017, and is not included in the Windows 24H2 RTM WDK. SDV can still be used by downloading the Windows 11, version 22H2 EWDK (released October 24, 2023) with Visual Studio build tools 17.1.5 from Download the Windows Driver Kit (WDK). Only the use of the Enterprise WDK to run SDV is recommended. Using older versions of the standard WDK in conjunction with recent releases of Visual Studio is not recommended, as this will likely result in analysis failures.
Going forward, CodeQL will be the primary static analysis tool for drivers. CodeQL provides a powerful query language that treats code as a database to be queried, making it simple to write queries for specific behaviors, patterns, and more. For more information about using CodeQL, see CodeQL and the Static Tools Logo Test.

Basic Driver Characteristics

SDV is able to verify only drivers with the following characteristics:

Basic Driver Requirements

For SDV to verify a WDM driver, the driver must:

For SDV to verify a KMDF driver, the driver must:

For SDV to verify an NDIS driver, the driver must:

In addition, SDV can verify drivers that support:

Reserved Function Names

The SDV verification engine does not operate properly when the driver or library code uses the same function name patterns that SDV uses internally.

Specifically, SDV does not correctly interpret code if:

  • The code includes function names that begin with __init and are followed by one or more integers, such as __init123.

  • The code includes function names that begin with sdv_, such as sdv_Func, or include the string _sdv_, such as Func_sdv_ or Func_sdv_foo.

  • The library uses a .def file to rename an exported function and the external name is the same as the name of another static function in the library.

If the driver code or library code includes these elements, SDV attempts to verify the driver or process the library, but the result is Not Supported Feature (NSF). For more information about SDV results, see Interpreting Static Driver Verifier Results.