欢迎来到 嗅灵易学

零基础也能上手的脚本技术课,一对一答疑带你入门

[翻译]WDK-Handling IRPs

[翻译]WDK-Handling IRPs

最近在看东辉主防和A盾代码,有一些手动下发IRP的代码,不是很懂,就翻开WDK看了下处理IRP的相关章节,顺便做了翻译。
翻译的应该还是比较通顺的,但我也是内核新手,有些地方不是很明白。对于有可能翻译错误的地方,译文后都备有原文,这些地方推荐读原文,以免被误导了。另外,我把翻译过程中的疑问整理如下,希望有大牛可以解答,然后我会更新一下文档。
Handling IRPs
  The Life of an I/O Request
    Example I/O Request - The Details
      原句:If they are, the driver usually calls I/O support routines to tell the I/O manager that a device operation is pending on the IRP 
        疑问:"a device operation is pending on the IRP",这句该如何翻译?
      原句:Each driver-created device object represents a physical, logical, or virtual device for which a particular driver carries out I/O requests.
        疑问:“for which a particular driver carries out I/O requests”,这句该如何翻译?
  Completing IRPs
    Using IoCompletion Routines
      Implementing an IoCompletion Routine
        原句:When the IoCompletion routine has processed and freed the driver-allocated IRP, the routine must return control with STATUS_MORE_PROCESSING_REQUIRED. 
          疑问:“return control”,是把控制权返回给谁了?是指通过设置事件,然后返回STATUS_MORE_PROCESSING_REQUIRED,把控制权返回给派遣例程?
  Using I/O Control Codes
    Creating IOCTL Requests in Drivers
      原句:With the exception of certain SCSI requests, the buffers at Irp->AssociatedIrp.SystemBuffer, at Irp->MdlAddress, and at Parameters.DeviceIoControl.Type3InputBuffer in a driver's I/O stack location do not contain pointers to other data buffers, nor do they contain structures that contain pointers, for system-defined I/O control codes
        疑问:"do not contain pointers to other data buffers",原意是不包含指向其他数据缓冲区的指针。但是,上面列举的几个属性,不都是(直接或间接)指向数据缓冲区的指针么?还是说“其他数据缓冲区”有什么具体的含义?
    Defining I/O Control Codes
      原句:Note that the vendor-assigned values set the Common bit. / Note that the vendor-assigned values set the Custom bit.
        疑问:是指,根据是系统定义的,还是供应商提供的,来设置Common/Custom位为0或者1吗?
  IRP Processing Examples
    Processing IRPs in an Intermediate-Level Driver
      原句:because the IRP is not associated with a thread, its completion processing should end with the driver that created it.
        疑问:"completion processing should end with the driver that created it",completion processing,是IO管理器来做的吧?这句是啥意思?
因为时间精力有限,没有翻译所有的章节。具体翻译目录如下:
Windows I/O模型综述
终端用户的I/O请求与文件对象
I/O请求的生命周期
  示例IO请求——概述
  示例IO请求——详情
  驱动的线程上下文
  关于用户 I/O 请求考虑要点
I/O栈
I/O状态块
将IRP在IRP栈中下发
为下层驱动创建IRP
IRP的入队与出队(没翻译)
完成IRP
  什么时候完成IRP
  在派遣例程中完成IRP
    如何在派遣例程中完成IRP
    何时在派遣例程中完成IRP
  使用IO完成例程
    注册IO完成例程
    实现IO完成例程
取消IRP(没翻译)
重用IRP
设备类型相关的I/O请求
使用I/O控制码
  IO控制码介绍
  驱动中创建IOCTL请求
  定义IO控制码
  IO控制码的数据缓冲区
  IO控制码的安全问题
使用IRP Priority Hints
IRP处理示例
  最底层驱动处理IRP
  中间层驱动处理IRP
以上!

上传的附件 【翻译WDK】处理IRP.pdf

注意:上传附件及图片大小不得大于30M。

⚠️ 版权声明:
本博客所有内容(含教程、源码、工具)仅供个人技术学习与研究交流使用,严禁商用、倒卖、二次分发及非法用途。
未经作者书面授权,任何组织或个人不得转载、复制或用于其他平台,违者将追究相关责任。

0 0 0 举报
复制成功