Foreword ...........................................................................................................................................3
作者声明...........................................................................................................................3
版本和注意.......................................................................................................................3
感谢...................................................................................................................................3
译者注 ...............................................................................................................................3
Chapter 1. Introduction .....................................................................................................................4
什么是内核模块? ...........................................................................................................4
内核模块是如何被调入内核工作的? ...........................................................................4
Chapter 2. Hello World .....................................................................................................................7
Hello, World (part 1): 最简单的内核模块 ......................................................................7
Hello World (part 2) ..........................................................................................................9
Hello World (part 3): 关于__init 和__exit 宏 ................................................................10
Hello World (part 4): 内核模块证书和内核模块文档说明..........................................11
从命令行传递参数给内核模块 .....................................................................................13
由多个文件构成的内核模块 .........................................................................................16
为已编译的内核编译模块 .............................................................................................18
Chapter 3. Preliminaries ..................................................................................................................20
内核模块和用户程序的比较 .................................................................................................20
内核模块是如何开始和结束的 .....................................................................................20
模块可调用的函数 .........................................................................................................20
用户空间和内核空间 .....................................................................................................21
命名空间.........................................................................................................................21
代码空间.........................................................................................................................22
Device Drivers.................................................................................................................22
Chapter 4. Character Device Files...................................................................................................24
字符设备文件.........................................................................................................................24
关于 file_operations 结构体.....................................................................................24
Chapter 5. The /proc File System....................................................................................................32
关于 /proc 文件系统...................................................................................................32
Chapter 6. Using /proc For Input ....................................................................................................36
使用 /proc 作为输入...................................................................................................36
Chapter 7. Talking To Device Files .................................................................................................43
与设备文件对话 (writes and IOCTLs)..........................................................................43
Chapter 8. System Calls ..................................................................................................................56
系统调用.........................................................................................................................56
Chapter 9. Blocking Processes........................................................................................................62
阻塞进程.........................................................................................................................62
Chapter 10. Replacing Printks.........................................................................................................70
替换 printk ......................................................................................................................70
让你的键盘指示灯闪起来 .............................................................................................72
Chapter 11. Scheduling Tasks .........................................................................................................76
任务调度.........................................................................................................................76
Chapter 12. Interrupt Handlers........................................................................................................81
Interrupt Handlers ...........................................................................................................81
Chapter 13. Symmetric Multi Processing........................................................................................86
对称多线程处理.............................................................................................................86