WDK知识点.IRQL PsCreateSystemThread

1、关键字:

  KeRaiseIrqlhttps://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/content/wdm/nf-wdm-keraiseirql

  KeLowerIrqlhttps://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/content/wdm/nf-wdm-kelowerirql

  KeRaiseIrqlToDpcLevel(https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/content/wdm/nf-wdm-keraiseirqltodpclevel

  KeGetCurrentIrql(https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/content/wdm/nf-wdm-kegetcurrentirql

#define PASSIVE_LEVEL                            0
#define LOW_LEVEL                                0
#define APC_LEVEL                                1
#define DISPATCH_LEVEL                           2
#define PROFILE_LEVEL                            27
#define CLOCK1_LEVEL                             28
#define CLOCK2_LEVEL                             28
#define IPI_LEVEL                                29
#define POWER_LEVEL                              30
#define HIGH_LEVEL                               31

2、资料:

  2.1、Managing Hardware Priorities _ Microsoft Docs.html(https://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/managing-hardware-priorities

  2.2、Dispatch Routines and IRQLs _ Microsoft Docs.html(https://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/dispatch-routines-and-irqls

  2.3、

    _IO_STACK_LOCATION _ Microsoft Docs.html(https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/content/wdm/ns-wdm-_io_stack_location

    I_O Stack Locations _ Microsoft Docs.html(https://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/i-o-stack-locations

    IRP structure (Windows Drivers).html(https://msdn.microsoft.com/library/windows/hardware/ff550694

  2.4、设备驱动程序和线程上下文切换的IRQL问题,怎么解决 - 91® 编程问答.html(百度搜索 "设备驱动程序和线程上下文切换的IRQL问题")(ZC:貌似 原来的帖子打不开...只能看百度的快照了...)

    http://cache.baiducontent.com/c?m=9d78d513d9951aee1abed22f5701d6160e53f4743da78e423b83cd5f931500010438f4bb56604345929e383016ae394bed842173475d77f3cc969f4aace4c9796fd56669245a9206528d16f58d0067d621e347f4ea5ca2adf04598ad92c4df230f9d151829c1a9965a0713cd6cfa1326e3d1c30e4a01&p=8c769a4786cc43b302bbcb355b&newp=87769a47c7b118b112bd9b7c4753d8304a02c70e3fc3864e1290c408d23f061d4862e4ba22221103d7c27d6c02af425beafa377323454df6cc8a871d81ed835a76966d&user=baidu&fm=sc&query=DISPATCH_LEVEL+IRQL++PASSIVE_LEVEL+microsoft&qid=e45e930b00012046&p1=8

  2.5、IRQL中断请求级别及APC_LEVEL讨论 - CSDN博客.html(https://blog.csdn.net/yujiao90/article/details/37880247

    ZC:合格文章讲的 比较详细,里面的内容看上去很像是官网上的内容,但是 我一直想找官方的文档(关于各个IRQL级别的解释),就是一直都没能找到...

    ZC:参看:What is IRQL_ – A Hole In My Head.html(https://blogs.msdn.microsoft.com/doronh/2010/02/02/what-is-irql/

  2.6、ZC:貌似 WinDbg能看 切换到Debugger之前的保存的IRQL:

    irql extension command _ Microsoft Docs.html(https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/-irql

When the target computer breaks into the debugger, the IRQL changes, but the IRQL that was effective just before the debugger break is saved. The !irql extension displays the saved IRQL.

3、

  [分享]映射驱动内存到用户空间蓝屏(KERNEL_DATA_INPAGE_ERROR)的一种可能的解决方法-『编程技术』-看雪安全论坛.html(https://bbs.pediy.com/thread-214600.htm

    ZC:里面提:驱动申请内存,然后给 不用的用户程序使用,比较有想法

    ZC:帖子的恢复中提到:

      (1)、驱动中创建子线程,我查了 关键是几个函数:

        PsCreateSystemThread、PsTerminateSystemThread、"通过内核事件KEVENT和内核等待KeWaitForSingleObject来演示事件的创建过程"

       参考文章:

        驱动程序多线程 PsCreateSystemThread - 沉疴 - 博客园.html(https://www.cnblogs.com/lsh123/p/7357468.html

        驱动开发之 创建线程函数PsCreateSystemThread - CSDN博客.html(https://blog.csdn.net/liyun123gx/article/details/30500703

      (2)、workitem (个人不知道是什么,还以为是 工作线程的意思(∵上面也提到了线程...),查了一下 才知道是 和 DPC有关...)

    ZC:这个是发问题的帖子:[结贴]DMA共用缓存区映射到用户进程空间失败,KERNEL_DATA_INPAGE_ERROR蓝屏-『经典问答』-看雪安全论坛.html(https://bbs.pediy.com/thread-214508.htm

4、

5、

猜你喜欢

转载自www.cnblogs.com/DriverSkill/p/9032673.html