Irql_Miscellaneous_Function 规则 (ndis)

Irql_Miscellaneous_Function 规则指定必须在正确的 IRQL 级别调用 NDIS 函数。

此规则验证以下函数:

KeGetCurrentProcessorNumberNdisAllocateFromNPagedLookasideListNdisAllocateGenericObjectNdisAllocateIoWorkItemNdisAllocateMemoryWithTagPriorityNdisAnsiStringToUnicodeStringNdisCloseConfigurationNdisCloseFileNdisDeleteNPagedLookasideListNdisDeregisterDeviceExNdisEqualMemoryNdisEqualUnicodeStringNdisFreeGenericObjectNdisFreeIoWorkItemNdisFreeMemoryNdisFreeSpinLockNdisFreeStringNdisFreeToNPagedLookasideListNdisGeneratePartialCancelIdNdisGetCurrentProcessorCountsNdisGetDriverHandleNdisGetRoutineAddressNdisGetSharedDataAlignmentNdisGetVersionNdisInitAnsiStringNdisInitializeListHeadNdisInitializeNPagedLookasideListNdisInitializeSListHeadNdisInitializeStringNdisInitUnicodeStringNdisMapFileNdisOpenConfigurationExNdisOpenConfigurationKeyByIndexNdisOpenConfigurationKeyByNameNdisOpenFileNdisQueryAdapterInstanceNameNdisQueryDepthSListNdisQueueIoWorkItemNdisReadConfigurationNdisReadNetworkAddressNdisReEnumerateProtocolBindingsNdisSetOptionalHandlersNdisSystemProcessorCountNdisUnicodeStringToAnsiStringNdisUnmapFileNdisUpcaseUnicodeStringNdisWaitEventNdisWriteConfigurationNdisWriteErrorLogEntryNdisWriteEventLogEntry

驱动程序模型:NDIS

如何测试

编译时

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

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

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

适用于

NdisAllocateFromNPagedLookasideList
NdisAllocateGenericObject
NdisAllocateIoWorkItem
NdisAllocateMemoryWithTagPriority
NdisAnsiStringToUnicodeString
NdisCloseConfiguration
NdisCloseFile
NdisDeleteNPagedLookasideList
NdisDeregisterDeviceEx
NdisEqualMemory
NdisEqualString
NdisEqualUnicodeString
NdisFreeGenericObject
NdisFreeIoWorkItem
NdisFreeMemory
NdisFreeString
NdisFreeToNPagedLookasideList
NdisGeneratePartialCancelId
NdisGetCurrentProcessorCounts
NdisGetRoutineAddress
NdisGetSharedDataAlignment
NdisGetVersion
NdisInitAnsiString
NdisInitializeNPagedLookasideList
NdisInitializeString
NdisInitUnicodeString
NdisMapFile
NdisOpenConfigurationEx
NdisOpenConfigurationKeyByIndex
NdisOpenConfigurationKeyByName
NdisOpenFile
NdisQueryAdapterInstanceName
NdisQueryDepthSList
NdisQueueIoWorkItem
NdisReadConfiguration
NdisReadNetworkAddress
NdisReEnumerateProtocolBindings
NdisRegisterDeviceEx
NdisSetOptionalHandlers
NdisSystemProcessorCount
NdisUnicodeStringToAnsiString
NdisUnmapFile
NdisUpcaseUnicodeString
NdisWaitEvent
NdisWriteConfiguration
NdisWriteErrorLogEntry
NdisWriteEventLogEntry
KeGetCurrentProcessorNumber