Windows驱动程序开发人员:是否可以分出ntoskrnl代码? [英] Windows driver dev: Can ntoskrnl code get paged out?

查看:65
本文介绍了Windows驱动程序开发人员:是否可以分出ntoskrnl代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Windows 7 x64中启用了驱动程序验证程序的驱动程序,并得到IRQL_NOT_LESS_OR_EQUAL(0A)错误检查.从 analyze -v 信息来看,似乎 RtlAnsiCharToUnicodeChar 函数的内存页面被分页了,因此调用该函数会导致bugcheck 0A. RtlAnsiCharToUnicodeChar 是ntoskrnl.exe导出的函数.真的可以将其调出页面吗?如果是这样,我该如何预防呢?

I'm trying my driver with Driver Verifier turned on in Windows 7 x64, and get IRQL_NOT_LESS_OR_EQUAL(0A) bugcheck. From analyze -v info, it seems that the memory page of RtlAnsiCharToUnicodeChar function gets paged out, so calling that function causes bugcheck 0A . RtlAnsiCharToUnicodeChar is an ntoskrnl.exe exported function. Can it really be paged out? If so, how can I prevent it?

下面的现场调试信息屏幕截图:

On spot debug info screen shot below:

推荐答案

是.当然-PAGE *部分中有很多ntoskrnl例程. RtlAnsiCharToUnicodeChar 也已分页-阅读文档:

yes. of course - very many ntoskrnl routines in PAGE* section. RtlAnsiCharToUnicodeChar also paged - read in documentation:

IRQL< = APC_LEVEL

IRQL <= APC_LEVEL

还阅读了有关 DbgPrintEx的信息常规

可以在IRQL <= DIRQL处调用DbgPrint和DbgPrintEx.但是,Unicode格式代码(%wc和%ws)只能在IRQL = PASSIVE_LEVEL时使用.

DbgPrint and DbgPrintEx can be called at IRQL<=DIRQL. However, Unicode format codes (%wc and %ws) can be used only at IRQL = PASSIVE_LEVEL.

但是,Unicode格式代码(%C,%S,%lc,%ls,%wc,%ws和%wZ)只能与IRQL = PASSIVE_LEVEL一起使用.

However, the Unicode format codes (%C, %S, %lc, %ls, %wc, %ws, and %wZ) can only be used with IRQL = PASSIVE_LEVEL.

因此,如果您不使用Unicode格式,则可以在任何IRQL上使用 DbgPrint KdPrint (这是宏),但是如果您使用Unicode格式-仅在PASSIVE_LEVEL或APC_LEVEL上(关于APC_LEVEL,我自己说)

so if you not use Unicode format you can use DbgPrint or KdPrint(this is macro) at any IRQL but if you use Unicode format - only on PASSIVE_LEVEL or APC_LEVEL (about APC_LEVEL i say by self)

这篇关于Windows驱动程序开发人员:是否可以分出ntoskrnl代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆