summaryrefslogtreecommitdiff
path: root/tools/sdv/samples/SDV-FailDriver-WDM
diff options
context:
space:
mode:
authorBarry Golden <[email protected]>2019-03-12 14:02:43 -0700
committerAdonais Romero González <[email protected]>2019-03-12 14:02:43 -0700
commitef7ec4ec9ff7ce3c53d60e1c8906915966e17e01 (patch)
tree3017523a73c6552c27947d402afa6062f4df2706 /tools/sdv/samples/SDV-FailDriver-WDM
parent35bff356ac249057f4d673d39c7f28ed348cbf0f (diff)
Update README.md for samples portal (#358)
* Update README.md for samples portal * Update README.md for samples portal * Removed installwdf * Update fork (#2) * Fix typo ture -> true * Remove InstallWdf sample * Fix typo (#340) ture -> true * Readme typo fix (#349) * Update langid
Diffstat (limited to 'tools/sdv/samples/SDV-FailDriver-WDM')
-rw-r--r--tools/sdv/samples/SDV-FailDriver-WDM/README.md37
-rw-r--r--tools/sdv/samples/SDV-FailDriver-WDM/tools-sdv-samples-sdv-faildriver-wdm.yml12
2 files changed, 21 insertions, 28 deletions
diff --git a/tools/sdv/samples/SDV-FailDriver-WDM/README.md b/tools/sdv/samples/SDV-FailDriver-WDM/README.md
index a32fbcf5..00bf64ee 100644
--- a/tools/sdv/samples/SDV-FailDriver-WDM/README.md
+++ b/tools/sdv/samples/SDV-FailDriver-WDM/README.md
@@ -1,3 +1,13 @@
+---
+topic: sample
+name: SDV-FailDriver-WDM
+description: Demonstrates how Static Driver Verifier (SDV) can find errors in a WDM driver.
+languages:
+ - cpp
+products:
+ - windows
+---
+
<!---
name: SDV-FailDriver-WDM
platform: WDM
@@ -7,43 +17,38 @@
samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617999
--->
-
-SDV-FailDriver-WDM
-==================
+# SDV-FailDriver-WDM
The SDV-FailDriver-WDM sample driver contains intentional code errors that are designed to show the capabilities and features of [Static Driver Verifier](http://msdn.microsoft.com/en-us/library/windows/hardware/ff552808) (SDV). SDV is a static verification tool that systematically analyzes the source code of Windows kernel-mode drivers. SDV is included in the Windows Driver Kit (WDK) and can be run from Microsoft Visual Studio. The sample demonstrates how SDV can find errors in a WDM driver.
**Caution** These sample drivers contain intentional code errors that are designed to show the capabilities and features of SDV. These sample drivers are not functional and are not intended as examples for real driver development projects.
-Run the sample
---------------
+## Run the sample
-1. In the **Solutions Explorer** window, select the driver project (fail\_driver1).
+1. In the **Solutions Explorer** window, select the driver project (fail\_driver1).
From the **Driver** menu, click **Launch Static Driver Verifier...**.
This opens the Static Driver Verifier application, where you can control, configure, and schedule when Static Driver Verifier performs an analysis.
-2. Click the **Rules** tab to select which driver DDI usage rules to verify when you start the analysis.
+1. Click the **Rules** tab to select which driver DDI usage rules to verify when you start the analysis.
Static Driver Verifier detects the type of driver you are analyzing (WDF, WDM, NDIS, or Storport) and selects the default set of rules for your driver type. If this is the first time you are running SDV on your driver, you should run the default rule set. To shorten the amount of time it takes to analyze the fail\_driver1 driver sample, you can select the **Custom rule selection**.
Use the default rule set, or select **Custom rule selection**, click **Clear All**, and then select the following rules for the WDM fail\_driver1 sample:
- - [CancelSpinLock](http://msdn.microsoft.com/en-us/library/windows/hardware/ff542478)
- - [IrqlIoApcLte](http://msdn.microsoft.com/en-us/library/windows/hardware/ff547759)
- - [IrqlKeSetEvent](http://msdn.microsoft.com/en-us/library/windows/hardware/ff547835)
- - [LowerDriverReturn](http://msdn.microsoft.com/en-us/library/windows/hardware/ff548273)
- - [SpinLock (WDM)](http://msdn.microsoft.com/en-us/library/windows/hardware/ff551861)
+ - [CancelSpinLock](http://msdn.microsoft.com/en-us/library/windows/hardware/ff542478)
+ - [IrqlIoApcLte](http://msdn.microsoft.com/en-us/library/windows/hardware/ff547759)
+ - [IrqlKeSetEvent](http://msdn.microsoft.com/en-us/library/windows/hardware/ff547835)
+ - [LowerDriverReturn](http://msdn.microsoft.com/en-us/library/windows/hardware/ff548273)
+ - [SpinLock (WDM)](http://msdn.microsoft.com/en-us/library/windows/hardware/ff551861)
For information about the rules, see [DDI Compliance Rules](http://msdn.microsoft.com/en-us/library/windows/hardware/ff552840).
-3. Start the static analysis. Click the **Main** tab, and click **Start**. When you click **Start**, a message is displayed to let you know that static analysis is scheduled and that the analysis can take a long time to run. Click **OK** to continue.
+1. Start the static analysis. Click the **Main** tab, and click **Start**. When you click **Start**, a message is displayed to let you know that static analysis is scheduled and that the analysis can take a long time to run. Click **OK** to continue.
-View and analyze the results
-----------------------------
+## View and analyze the results
As the static analysis proceeds, SDV reports the status of the analysis. When the analysis is complete, SDV reports the results and statistics. If the driver fails to satisfy a DDI usage rule, the result is reported as a defect. SDV finds 5 defects in this sample.
To view specific defects in the [Static Driver Verifier Report](http://msdn.microsoft.com/en-us/library/windows/hardware/ff552834), click the Defect in the **Results** pane. This opens the [Trace Viewer](http://msdn.microsoft.com/en-us/library/windows/hardware/ff544659), which displays a trace of the code path to the rule violation. For more information, see [Interpreting Static Driver Verifier Results](http://msdn.microsoft.com/en-us/library/windows/hardware/ff547228).
-
diff --git a/tools/sdv/samples/SDV-FailDriver-WDM/tools-sdv-samples-sdv-faildriver-wdm.yml b/tools/sdv/samples/SDV-FailDriver-WDM/tools-sdv-samples-sdv-faildriver-wdm.yml
deleted file mode 100644
index a746c40c..00000000
--- a/tools/sdv/samples/SDV-FailDriver-WDM/tools-sdv-samples-sdv-faildriver-wdm.yml
+++ /dev/null
@@ -1,12 +0,0 @@
-### YamlMime:Sample
-sample:
-- name: SDV-FailDriver-WDM
- description: Demonstrates how Static Driver Verifier (SDV) can find errors in a WDM driver.
- generateZip: true
- preserveParentHierarchy: true
- author: windows-driver-samples
- languages:
- - cpp
- technologies:
- - windows
- vssolution: /tools/sdv/samples/SDV-FailDriver-WDM/SDV-FailDriver-WDM.sln