kmdfIrql 规则 (kmdf)

KmdfIrql 规则指定驱动程序在 IRQL 中调用小于或等于该方法的最大 IRQL 的框架方法。

此规则类似于 KmdfIrql2 规则;但是, KmdfIrql2 规则对具有 IRQL 要求的回调函数执行,具体取决于其相关对象的执行级别规范。

驱动程序模型:KMDF

如何测试

编译时

运行 静态驱动程序验证程序 并指定 KmdfIrql 规则。

使用以下步骤运行代码分析:
  1. 准备代码 (使用角色类型声明) 。
  2. 运行静态驱动程序验证程序。
  3. 查看和分析结果。

有关详细信息,请参阅 使用静态驱动程序验证程序查找驱动程序中的缺陷

适用于

WdfChildListAddOrUpdateChildDescriptionAsPresentWdfChildListBeginIterationWdfChildListBeginScanWdfChildListCreateWdfChildListEndIterationWdfChildListEndScanWdfChildListGetDeviceWdfChildListRequestChildEjectWdfChildListRetrieveAddressDescriptionWdfChildListRetrieveNextDeviceWdfChildListRetrievePdoWdfChildListUpdateAllChildDescriptionsAsPresentWdfChildListUpdateChildDescriptionAsMissingWdfCmResourceListAppendDescriptorWdfCmResourceListGetCountWdfCmResourceListsourceListGetDescriptorWdfCmResourceListInsertDescriptorWdfCmResourceListRemoveWdfCmResourceListRemoveByDescriptorWdfCollectionAddWdfCollectionCreateWdfCollectionGetCountWdfCollectionGetFirstItemWdfCollectionGetItemWdfCollectionGetLastItemWdfCollectionRemoveWdfCollectionRemoveItemWdfCommonBufferCreateWdfCommonBufferCreateWithConfigWdfCommonBufferGetAlignedLogicalAddressWdfCommonBufferGetAlignedVirtualAddressWdfCommonBufferGetLengthWdfControlDeviceInitAllocateWdfControlDeviceInitSetShutdownNotificationWdfControlFinishInitializingWdfDeviceAddDependentUsageDeviceObjectWdfDeviceAddQueryInterfaceWdfDeviceAddRemovalRelationsPhysicalDeviceWdfDeviceAllocAndQueryPropertyWdfDeviceAssignMofResourceNameWdfDeviceAssignS0IdleSettingsWdfDeviceAssignSxWakeSettingsWdfDeviceClearRemovalRelationsDevicesWdfDeviceConfigureRequestDispatchingWdfDeviceCreateWdfDeviceCreateDeviceInterfaceWdfDeviceCreateSymbolicLinkWdfDeviceEnqueueRequestWdfDeviceGetAlignmentRequirementWdfDeviceGetCharacteristicsWdfDeviceGetDefaultQueueWdfDeviceGetDevicePnpStateWdfDeviceGetDevicePowerPolicyStateWdfDeviceGetDevicePowerStateWdfDeviceGetDeviceStateWdfDeviceGetDriverWdfDeviceGetFileObjectWdfDeviceGetIoTargetWdfDeviceGetSystemPowerActionWdfDeviceIndicateWakeStatusWdfDeveviceInitAssignNameWdfDeviceInitAssignSDDLStringWdfDeviceInitAssignWdmIrpPreprocessCallbackWdfDeviceInitFreeWdfDeviceInitRegisterPnpStateChangeCallbackWdfDeviceInitRegisterPowerPolicyStateChangeCallbackWdfDeviceInitRegisterPowerStateChangeCallbackWdfDeviceInitSetCharacteristicsWdfDeviceInitSetDeviceClassWdfDDeviceInitSetDeviceTypeWdfDeviceInitSetExclusiveWdfDeviceInitSetFileObjectConfigWdfDeviceInitSetIoInCallerContextCallbackWdfDeviceInitSetIoTypeWdfDeviceInitSetPnpPowerEventCallbacksWdfDeviceInitSetPowerInrushWdfDeviceInitSetPowerNotPageableWdfDeviceInitSetPowerPageableWdfDeviceInitSetPowerPolicyEventCallbacksWdfDeviceInitSetPowerPolicyOwnershipWdfDeviceInitSetRequestAttributesWdfDeviceMiniportCreateWdfDeviceOpenRegistryKeyWdfDeviceQueryPropertyWdfDeviceRemoveDependentUsageDeviceObjectWdfDeviceRemoveRemovalRelationsPhysicalDeviceWdfDeviceResumeIdleWdfDeviceRetrieveDeviceInterfaceStringWdfDeviceRefacetrieveDeviceNameWdfDeviceSetAlignmentRequirementWdfDeviceSetBusInformationForChildrenWdfDeviceSetCharacteristicsWdfDeviceSetDeviceInterfaceStateWdfDeviceSetDeviceStateWdfDeviceSetFailedWdfDeviceSetPnpCapabilitiesWdfDeviceSetPowerCapabilitiesWdfDeviceSetSpecialFileSupportWdfDeviceSetStaticStopRemoveWdfDeviceStopIdleWdfDDeviceWdmDispatchPreprocessedIrp WdfDeviceWdmGetAttachedDeviceWdmGetDeviceWdmGetDeviceWdmGetPhysicalDevice WdfDmaEnablerCreateWdfDmaEnablerGetFragmentLengthWdfDmaEnablerGetMaximumLengthWdfDmaEnablerGetMaximumScatterGatherElementsWdfDmaEnablerSetMaximumScatterGatherElementsWdfDmaEnablerWdmGetDmaAdapterWdfDmaTransactionCreateWdfDmaTransactionDmaCompletedWdfDmaTransactionDmaCompletedFinalWdfDmaTransactionDmaCompletedWithLengthWdfDmaTransactionExecuteWdfDmaTransactionGetBytesTransferredWdfDmaTransactionGetCurrentDmaTransferLengthWdfDmaTransactionGetDeviceWdfDmaTransactionGetRequestWdfDmaTransactionInitializeWdfDmaTransactionInitializeUsingRequestWdfDmaTransactionReleaseWdfDpcCancelWdfDpcCreateWdfDpcEnqueueWdfDpcGetParentObjectWdfDpcWdmGetDpcWdfDriverCreateWdfDriverGetRegistryPathWdfDriverIsVersionAvailableWdfDriverOpenParametersRegistryKeyWdfDriverRetrieveVersionStringWdfFdoAddStaticChildWdfFFdoGetDefaultChildListWdfFdoInitAllocAndQueryPropertyWdfFdoInitOpenRegistryKeyWdfFdoInitQueryPropertyWdfFdoInitSetDefaultChildListConfigWdfFdoInitSetEventCallbacksWdfFdoInitSetFilterWdfFdoInitWdmGetPhysicalDeviceWdfFdoLockStaticChildListForIterationWdfFdoQueryForInterfaceWdfFdoRetrieveNextStaticChildWdfFdoUnlockStaticChildListFromIterationWdfFileObjectGetDeviceWdfFileObjectGetFileNameWdfFileObjectGetFlagsWdfFileObjectWdmGetFileObjectWdfInterruptAcquireLockWdfInterruptCreateWdfInterruptDisableWdfInterruptEnableWdfInterruptReleaseLockWdfInterruptSynchronizeWdfIoQueueCreateWdfIoQueueDrainWdfIoQueueDrainSynchronouslyWdfIoQueueFindRequestWdfIoQueueGetDeviceWdfIoQueueGetStateWdfIoQueuePurgeWdfIoQueuePurgeSynchronouslyWdfIoQueueReadyNotifyWdfIoQueueRetrieveFoundRequestWdfIoQueueRetrieveNextRequestWdfIoQueueRetrieveRequestByFileObjectWdfIoQueueStartWdfIoQueueStopWdfIoQueueStopSynchronouslyWdfIoResourceListAppendDescriptorWdfIoResourceListCreateWdfIoResourceListGetCountWdfIoResourceListGetDescriptorWdfIoResourceListInsertDescriptorWdfIoResourceListRemoveWdfIoResourceListRemoveByDescriptorWdfIoResourceListUpdateDescriptorWdfIoResourceRequirementsListAppendIoResListWdfIoResourceRequirementsListGetCountWdfIoResourceRequirementsListGetIoResListWdfIoResourceRequirementsListInsertIoResListWdfIoResourceRequirementsListRemoveWdfIoResourceRequirementsListRemoveByIoResListWdfIoResourceRequirementsListSetInterfaceTypeWdfIoResourceRequirementsListSetSlotNumberWdfIoTargetAllocAndQueryTargetPropertyWdfIoTargetCloseWdfIoTargetCloseForQueryRemoveWdfIoTargetCreateWdfIoTargetFormatRequestForInternalIoctlWdfIoTargetFormatRequestForInternalIoctlOthersWdfIoTargetFormatRequestForIoctlWdfIoTargetFormatRequestForReadWdfIoTargetFormatRequestForWriteWdfIoTargetGetDeviceWdfIoTargetGetStateWdfIoTargetOpenWdfIoTargetQueryForInterfaceWdfIoTargetQueryTargetPropertyWdfIoTargetSendInternalIoctlOthersSynchronouslyWdfIoTargetSendInternalIoctlSynchronouslyWdfIoTargetSendIoctlSynchronouslyWdfIoTargetSendReadSynchronouslyWdfIoTargetSendWriteSynchronouslyWdfIoTargetStartWdfIoTargetStopWdfIoTargetWdmGetTargetDeviceObjectWdfIoTargetWdmGetTargetFileHandleWdfIoTargetWdmGetTargetFileObjectWdfIoTargetWdmGetPhysicalDeviceWdfLookasideListCreateWdfMemoryCreateWdfMemoryCreatePreallocatedWdfObjectAcquireLockWdfObjectCreateWdfObjectDeleteWdfObjectReleaseLockWdfPdoAddEjectionRelationsPhysicalDeviceWdfPdoClearEjectionRelationsDevicesWdfPdoGetParentWdfPdoInitAddCompatibleIDWdfPdoInitAddDeviceTextWdfPdoInitAddHardwareIDWdfPdoInitAllocateWdfPdoInitAssignDeviceIDWdfPdoInitAssignInstanceIDWdfPdoInitAssignRawDeviceWdfPdoInitSetDefaultLocaleWdfPdoInitSetEventCallbacksWdfPdoMarkMissingWdfPdoRemoveEjectionRelationsPhysicalDeviceWdfPdoRequestEjectWdfPdoRetrieveAddressDescriptionWdfPdoRetrieveIdentificationDescriptionWdfPdoUpdateAddressDescriptionWdfRegistryAssignMemoryWdfRegistryAssignMultiStringWdfRegistryAssignString WdfRegistryAssignStringWdfRegistryAssignULongWdfRegistryAssignUnicodeStringWdfRegistryAssignValueWdfRegistryCloseWdfRegistryCreateKeyWdfRegistryOpenKeyWdfRegistryQueryMemoryWdfRegistryQueryMultiStringWdfRegistryQueryStringWdfRegistryQueryULongWdfRegistryQueryUnicodeStringWdfRegistryQueryValueWdfRegistryRemoveKeyWdfRegistryRemoveValueWdfRequestAllocateTimerWdfRequestCancelSentRequestWdfRequestChangeTargetWdfRequestCompleteWdfRequestCompleteWithInformationWdfRequestCompleteWithPriorityBoostWdfRequestCreateWdfRequestCreateFromIrpWdfRequestFormatRequestUsingCurrentTypeWdfRequestForwardToIoQueueWdfRequestGetCompletionParamsWdfRequestGetFileObjectWdfRequestGetInformationWdfRequestGetIoQueueWdfRequestGetParametersWdfRequestGetRequestorModeWdfRequestGetStatusWdfRequestIsCanceledWdfRequestIsFrom32BitProcessWdfRequestMarkCancelableWdfRequestMarkCancelableExWdfRequestProbeAndLockUserBufferForReadWdfRequestProbeAndLockUserBufferForWriteWdfRequestRequeueWdfRequestRetrieveInputBufferWdfRequestRetrieveInputMemoryWdfRequestRetrieveInputWdmMdlWdfRequestRetrieveOutputBufferWdfRequestRetrieveOutputMemoryWdfRequestRetrieveOutputWdmMdlWdfRequestRetrieveUnsafeUserInputBufferWdfRequestRetrieveUnsafeUserOutputBufferWdfRequestReuseWdfRequestSendWdfRequestSetCompletionRoutineWdfRequestSetInformationWdfRequestStopAcknowledgeWdfRequestUnmarkCancelableWdfRequestWdmFormatUsingStackLocationWdfRequestWdmGetIrpWdfSpinLockAcquireWdfSpinLockCreateWdfSpinLockReleaseWdfStringCreateWdfStringingGetUnicodeStringWdfTimerCreateWdfTimerStartWdfTimerStopWdfUsbInterfaceGetConfiguredPipeWdfUsbInterfaceGetConfiguredSettingIndexWdfUsbInterfaceGetDescriptorWdfUsbInterfaceGetEndpointInformationWdfUsbInterfaceGetInterfaceNumberWdfUsbInterfaceGetNumConfiguredPipesWdfUsbInterfaceGetNumEndpointsWdfUsbInterfaceGetNumSettingsWdfUsbInterfaceSelectSettingWdfUsbTargetDeviceAllocAndQueryStringWdfUsbTargetDeviceCreateWdfUsbTargetDeviceCyclePortSynchronouslyWdfUsbTargetDeviceFormatRequestForControlTransferWdfUsbTargetDeviceFormatRequestForCyclePortWdfUsbTargetDeviceFormatRequestForStringWdfUsbTargetDeviceFormatRequestForUrbWdfUsbTargetDeviceGetDeviceDescriptorWdfUsbTargetDeviceGetInterfaceWdfUsbTargetDeviceGetNumInterfacesWdfUsbTargetDeviceIsConnectedSynchronousWdfUsbTargetDeviceQueryStringWdfUsbTargetDeviceResetPortSynchronouslyWdfUsbTargetDeviceRetrieveConfigDescriptorWdfUsbTargetDeviceRetrieveCurrentFrameNumberWdfUsbTargetDeviceRetrieveInformationWdfUsbTargetDeviceSelectConfigWdfUsbTargetDeviceSendControlTransferSynchronouslyWdfUsbTargetDeviceSendUrbSynchronouslyWdfUsbTargetDeviceWdmGetConfigurationHandleWdfUsbTargetPipeAbortSynchronouslyWdfUsbTargetPipeConfigContinuousReaderWdfUsbTargetPipeFormatRequestForAbortWdfUsbTargetPipeFormatRequestForReadWdfUsbTargetPipeFormatRequestForResetWdfUsbTargetPipeFormatRequestForUrbWdfUsbTargetPipeFormatRequestForWriteWdfUsbTargetPipeGetInformationWdfUsbTargetPipeGetTypeWdfUsbTargetPipeIsInEndpointWdfUsbTargetPipeIsOutEndpointWdfUsbTargetPipeReadSynchronouslyWdfUsbTargetPipeResetSynchronouslyWdfUsbTargetPipeSendUrbSynchronWdfUsbTargetPipeSetNoMaximumPacketSizeCheckWdfUsbTargetPipeWdmGetPipeHandleWdfUsbTargetPipeWriteSynchronouslyWdfWaitLockAcquireWdfWaitLockCreateWdfWaitLockReleaseWdfWdmDeviceGetWdfDeviceHandleWdfWmiInstanceCreateWdfWmiInstanceDeregisterWdfWmiInstanceFireEventWdfWmiInstanceGetDeviceWdfWWmiInstanceGetProviderWdfWmiInstanceRegisterWdfWmiProviderCreateWdfWmiProviderGetDeviceWdfWmiProviderGetTracingHandleWdfWmiProviderIsEnableddWdfWorkItemCreateWdfWorkItemEnqueueWdfWorkItemFlushWdfWorkItemGetParentObjectPAGED_CODE