如何修复静态驱动程序验证程序结果“错误”

发布于 2025-01-25 18:19:02 字数 1632 浏览 2 评论 0原文

我正在尝试在Visual Studio 2019中的“内核模式驱动程序,USB(KMDF)”模板项目上运行静态驱动程序验证仪。

我选择了X64平台的发行配置。我只选择了“驱动程序”规则。如果我在driverentry中删除wdfdriverCreate的调用,则我将获得“必须f缩影”,并带有一个可单击的链接,将我带到了报告页面。

如果我将代码保留为原样,则呼叫wdfdrervercreate,则结果是“错误”,并且结果文本无法单击。

我可以看到UI中的构建和链接步骤是成功的,这也反映在文件smvbuild.log中。

sdv-map.h看起来像这样:

//Approved=false
//DriverEntry
#define fun_DriverEntry DriverEntry
//TestStaticVerifierEvtDevicePrepareHardware
#define fun_WDF_DEVICE_PREPARE_HARDWARE TestStaticVerifierEvtDevicePrepareHardware
//TestStaticVerifierEvtDeviceAdd
#define fun_WDF_DRIVER_DEVICE_ADD TestStaticVerifierEvtDeviceAdd
//TestStaticVerifierEvtIoDeviceControl
#define fun_WDF_IO_QUEUE_IO_DEVICE_CONTROL TestStaticVerifierEvtIoDeviceControl
//TestStaticVerifierEvtIoStop
#define fun_WDF_IO_QUEUE_IO_STOP TestStaticVerifierEvtIoStop
//TestStaticVerifierEvtDriverContextCleanup
#define fun_WDF_OBJECT_CONTEXT_CLEANUP TestStaticVerifierEvtDriverContextCleanup

sdv \ resuct \ drivercreate_sdv.xml包含以下内容:

<?xml version="1.0"?>
<RuleResult xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <defect>false</defect>
  <Name>drivercreate</Name>
  <Result>SDV_TOOLERROR</Result>
  <IsPreCondition>false</IsPreCondition>
  <IsMustFix>true</IsMustFix>
  <isWarning>false</isWarning>
</RuleResult>

sdv_toolerror看起来可疑,但我不知道问题是什么。我如何找到有关问题出在这里的更多信息?

I am trying to run the Static Driver Verifier on the "Kernel Mode Driver, USB (KMDF)" template project in Visual Studio 2019.

I select the Release configuration for x64 platform. I have only selected the "DriverCreate" rule. If I remove the call to WdfDriverCreate in DriverEntry, then I get "MustFix Defect" as result, with a clickable link that takes me to the report page.

If I leave the code as it is, with the call to WdfDriverCreate then the result is "error", and the result text is not clickable.

I can see that the build and link step is succesful in the UI, and this is also reflected in the file smvbuild.log.

SDV-map.h looks like this:

//Approved=false
//DriverEntry
#define fun_DriverEntry DriverEntry
//TestStaticVerifierEvtDevicePrepareHardware
#define fun_WDF_DEVICE_PREPARE_HARDWARE TestStaticVerifierEvtDevicePrepareHardware
//TestStaticVerifierEvtDeviceAdd
#define fun_WDF_DRIVER_DEVICE_ADD TestStaticVerifierEvtDeviceAdd
//TestStaticVerifierEvtIoDeviceControl
#define fun_WDF_IO_QUEUE_IO_DEVICE_CONTROL TestStaticVerifierEvtIoDeviceControl
//TestStaticVerifierEvtIoStop
#define fun_WDF_IO_QUEUE_IO_STOP TestStaticVerifierEvtIoStop
//TestStaticVerifierEvtDriverContextCleanup
#define fun_WDF_OBJECT_CONTEXT_CLEANUP TestStaticVerifierEvtDriverContextCleanup

sdv\results\drivercreate_SDV.xml contains this:

<?xml version="1.0"?>
<RuleResult xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <defect>false</defect>
  <Name>drivercreate</Name>
  <Result>SDV_TOOLERROR</Result>
  <IsPreCondition>false</IsPreCondition>
  <IsMustFix>true</IsMustFix>
  <isWarning>false</isWarning>
</RuleResult>

SDV_TOOLERROR looks suspicious, but I don't know what the problem is. How can I find more information about what the problem is here?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文