Windows Driver Quality Signature Alok Sinha Product Unit Manager Windows Driver Kits Aloks @ microsoft.com Microsoft Corporation Session Outline Driver Quality Challenge Solutions from Microsoft Tools and services Driver Quality Signature Strategic direction of Driver Quality Signature We need your feedback Driver Quality Affects Product Success In All Scenarios Trends x64/Dual core Wireless Digital Media Personal Storage Storage area network (SAN) Blades Mobility More… Top 10 Crash Categories As a percent of all OCA crashes reported in a single month March ‘04 # Category March ‘05 March ‘04 # March ‘05 Category 1 Display 17.9% 1 Display ▬ 17.9% 2 Pool/Memory Corruption 13.6% 2 Pool/Memory Corruption ▲ 15.9% 3 OS Core 13.5% 3 OS Core ▲ 14.2% 4 Networking 12.6% 4 Networking ▼ 10.8% 5 Multimedia 9.51% 5 Multimedia ▼ 7.68% 6 Application Drivers 6.57% 6 Application Drivers ▲ 7.51% 7 Anti-virus 5.54% 7 Hardware Failures ▲ 7.00% 8 CD-Burning 5.39% 8 Anti-virus ▼ 5.42% 9 Hardware Failures 4.99% 9 Storage ▲ 4.94% Storage 4.60% 10 CD-Burning ▼ 4.28% 10 Microsoft’s Investments In Driver Quality Device Software Lifecycle Build it right Windows Driver Foundation Kernel and User Driver Frameworks Static Driver Analysis tools Windows Driver Kit Driver Test Manager Driver test tools DIFx tools Enabling better design Enabling easier development Enabling simpler testing Driver Signing Problem Definition User expectations for reliability, stability, and overall quality of experience have increased But, reports of crashes continue to come via Windows Error Reporting (WER) Lack of Microsoft sponsored program for new and emerging device categories Some partners do not have the option of using Microsoft provided tools and services Unsigned drivers lead to install time warning User Interface (UI) Leads to confusion for user (can they trust the driver?) It is difficult to perform crash analysis on unsigned drivers Driver Signing Solutions Microsoft is making significant investments related to driver signing Creating Driver Quality Signature (DQS) as a quality bar for Windows codenamed Longhorn drivers DQS is core component for every level of logo program Emerging category of device (drivers) can be signed with DQS Other related investments The Next Generation Logo Program An Introduction (TWDE05005) How to Improve Driver Quality with Winqual and Windows Hardware Quality Labs (WHQL) (TWDE05006) Windows Driver Foundation: An Introduction (TWDE05002) Partner Commitment Get your drivers signed through the Logo Program or DQS Longhorn Driver Signing Summary Driver quality is a focus of Longhorn signing policy Partner’s increased level of commitment leads to higher user confidence User confidence Signature Publisher How you get it Impact (cumulative from bottom) Example Usage Windows Partner Logo Program Microsoft Required for participants of Longhorn Logo Program Devices which fit Logo category Microsoft Driver Quality Signature Microsoft Publisher is trusted by default Devices which do not fit Logo categories Authenticode Obtain class 3 certificate from CA and selfsign Non-admins can install only from trusted publishers Only admin can make a publisher trusted In-house and Enterprise development Only admin can install Domain admin wants full control of devices installed Unsigned Recommendation For Signature In Longhorn Program Longhorn Logo Program Driver Quality Signature Category Drivers in Logo Program categories New devices for which there is no Logo Program category In-house and enterprise development Authenticode Unsigned Drivers Logo’d Drivers Authenticode Drivers Increase % of signed qualitytested drivers DQS Drivers Unsigned Drivers Signatures in Windows XP Signatures in Longhorn Logo’d Drivers Driver Quality Signature DQS Goals Goal: Improve Windows system stability and reliability Raise driver quality (as measured through Online Crash Analysis) Drive continuous improvement in Windows driver quality Plan to ship Driver Quality Tools with Windows Driver Kit Plan to periodically update Driver Quality Tools after Longhorn ship Goal: Maximize customer value of signature with minimal impact to partners Invest in seeking feedback from partners on cost-effectiveness and efficacy of tools Continuous Improvement Crash Analysis to Finding Solutions Improvement in Quality tests and tools with partner feedback E.g., if a test can catch specific Online Crash Analysis (OCA) issue, we will update it Microsoft Microsoft Research Feedback from Partner Windows Error Reporting Gather Data Analyze Validate Partner Use WDK to validate Feedback to Microsoft Microsoft Update to Tests and Tools Provide OCA data Act Partner Download OCA Data Analyze Results and Fix Driver Taxonomy Of Driver Quality Tools Tools Migrate, if Proven to Improve Quality and Can Give Pass/Fail, to Tests Quality Tests Proven to improve Quality Low cost to independent hardware vendor (IHV) Tests run and passed Quality Tools Potential to improve Quality Run all Tools and respond to output Driver Quality Tests and Tools are Independent of driver class Focused on improving driver stability and reliability How To Get Signature DQS For Logo Category Of Drivers Functionality Requirements Quality Requirements “Gold” Driver Quality Tests and Tools are core component of Logo Tests and shipped in WDK For Logo category of devices, continue to get Logo signature using WDK and WinQual Details: TWDE05005: “The Next Generation Logo Program: An Introduction” “Silver” “Quality” Requirements build on each other Longhorn Logo Program includes DQS For Emerging Devices For User mode drivers Build with User Mode Driver Framework (UMDF), if appropriate Run Application Verifier For Kernel mode drivers Run and pass Driver Quality Tests Run Driver Quality Tools and resolve issues flagged Use Windows Driver Kit (WDK) to upload results to WinQual to get signature Tools Available To Improve Driver Quality Static Tools For Drivers PREfast for Drivers (PFD) Lightweight/fast Use early in development Limited to function scope C and C++ Static Driver Verifier (SDV) Microsoft Results Code Base Drivers Verified Defects Found Code Base 1 100 231 Code Base 2 26 33 Extremely deep analysis More useful in the later stages of development Requires complete driver Works over the whole driver Limited to some kinds of drivers, and to C PFD available in Windows Server 2003 Device Driver Kit Quality Tools In Server Driver Development Kit (DDK) And HCT 12.1.01 Call Usage Verifier (CUV) Detects Initialization Errors (spin locks, lists, etc.) Detects I/O request packet (IRP) Stack Errors Consistency Errors in Spin Lock and Interlocked lists Device Path Exerciser (DPE) DPE improves drivers quality by testing correctness of I/O control (IOCTL) handling DPE helps with memory leak monitoring Driver Verifier (DV) Monitors 14 distinct checks for all drivers including Display drivers E.g., input/output (I/O) verification, Memory Pool Monitoring, Low Resource Allocation Bug Check on improper usage Windows Driver Foundation Case Study: OSRUSBFX2 Sample Metric A quicker, cheaper and easier way of developing and deploying your driver to market Reduced chances that device driver is a cause of system crash Reduced support costs Better diagnosability and debugging and logging support Improved system stability and reliability Higher quality drivers Windows Driver Model Windows Driver Foundation Comments Line Count 16350 2300 Explicit registration of granular event callbacks add to the line count LOC devoted to PnP/PM 6700 742 742 includes code to initialize the USB 0 This is the most important stat. This explains the complexity 0 There are fewer paths in the driver and hence less complexity Locks (6 Events, 3 SpinLocks) State variables devoted to PnP/PM 9 21 The Windows Driver Model (WDM) version of OSRUSBFx2 sample available on osronline.com and the Windows Driver Foundation (WDF) version provided in the Driver Development Kit (DDK) are functionally equivalent Details: “TWDE05002 – Windows Driver Foundation An Introduction” Windows Driver Kit (WDK) One Single Kit More than a simple combination of DDK, installable file system (IFS) Kit and hardware compatibility test (HCT) Content, tests, tools, development environment Driver Test Manager replaces HCT Key WDK Objectives Build, test, debug drivers on Windows 2000 forward to Longhorn Support DQS and Logo programs Including Longhorn Logo program testing and DQS For Longhorn and previous Windows versions HCT replaced by WDK at Longhorn RTM Delivery Plans for WDK Plan to make beta available with Longhorn Beta1 Plan to ship with Longhorn Release Candidate (RC) Windows Driver Kit Integrated build environment for device software development Operating System and Tools Documentation Development Tools (PREfast) Logo Tests Quality Tests Kernel Debugger Maintain Samples Template Drivers Qualify WinQual Integration Test Driver Test Manager Develop Build Environment Design Windows Driver Foundation Key Usage Scenarios 1 Build Drivers ( Windows 2000 LH) 2 Debug Drivers 3 Driver Testing 4 Logo Testing Windows Driver Kit And WinQual Integration Logs, results, machine configuration data WDK Submit to WinQual Drivers Driver Store Longhorn DQ Tests And Tools Timeline Timeline Plan to make available starting with Longhorn Beta 2 Plan to ship final bits at Longhorn Release Candidate (RC) DQ tests and tools ship with WDK Driver Test Manager (DTM) is only test harness Continuous improvement (after Longhorn ships) Improvement in tests and tools with partner feedback Periodic updates of tests and tools Summary Users are expecting reliability and stability Let us work together to improve quality of drivers for our mutual end-user customers Microsoft Investments Windows Driver Kit (WDK) Windows Driver Foundation (WDF) Driver Quality Tests and Tools DQ Signature is core component for Logo Recommendations for Partner Begin to use quality tools now Sign up for WDK Beta to get Driver Quality Tests and Tools Prepare to get your driver signed for Longhorn Call To Action Contact us at dqsfeed @ microsoft.com Begin using Driver Quality Tests and Tools WDF – WDF Beta http://www.microsoft.com/whdc/driver/wdf/beta.mspx CUV, PFD – Windows Server 2003 Driver Development Kit DPE and digital video – hardware compatibility test 12.1.01 Provide feedback once Windows Driver Kit Beta is available Visit the Beta Program Signup desk in the Microsoft booth in the Exhibit Hall Attend the following sessions TWDE05006: How to Improve Driver Quality with Winqual and WHQL TWDE05002: Windows Driver Foundation: An Introduction TWDE05004: The WDK for Engineering Managers and Product Planners: An Introduction Community Resources Windows Hardware and Driver Central (WHDC) www.microsoft.com/whdc/default.mspx Technical Communities www.microsoft.com/communities/products/default.mspx Non-Microsoft Community Sites www.microsoft.com/communities/related/default.mspx Microsoft Public Newsgroups www.microsoft.com/communities/newsgroups Technical Chats and Webcasts www.microsoft.com/communities/chats/default.mspx www.microsoft.com/webcasts Microsoft Blogs www.microsoft.com/communities/blogs Additional Resources Community Sites http://www.microsoft.com/communities/default.mspx List of Newsgroups http://communities2.microsoft.com/communities/newsgroups/enus/default.aspx Attend a free chat or webcast http://www.microsoft.com/communities/chats/default.mspx http://www.microsoft.com/seminar/events/webcasts/default.mspx Locate a local user group(s) http://www.microsoft.com/communities/usergroups/default.mspx Non-Microsoft Community Sites http://www.microsoft.com/communities/related/default.mspx Additional Resources E-Mail: dqsfeed @ microsoft.com Web Resources WDK: http://www.microsoft.com/whdc/driver/wdk/default.mspx Testing: http://www.microsoft.com/whdc/whql/default.mspx DDK: http://www.microsoft.com/whdc/DevTools/default.mspx Overall: http://www.Microsoft.com/WHDC/ Related Sessions TWWI05010: Business Value of the Windows Device Software Life Cycle TWDE05005: The Next Generation Logo Program An Introduction TWDE05006: How to Improve Driver Quality with Winqual and WHQL TWDE05004: The WDK for Engineering Managers and Product Planners: An Introduction © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.