B.1. Where From Here?

I could easily have squeezed a few more chapters into this book. I could have added a chapter about creating new file systems, or about adding new protocol stacks (as if there's a need for that -- you'd have to dig underground to find a protocol stack not supported by Linux). I could have added explanations of the kernel mechanisms we haven't touched upon, such as bootstrapping or the disk interface.

However, I chose not to. My purpose in writing this book was to provide initiation into the mysteries of kernel module programming and to teach the common techniques for that purpose. For people seriously interested in kernel programming, I recommend Juan-Mariano de Goyeneche's list of kernel resources . Also, as Linus said, the best way to learn the kernel is to read the source code yourself.

If you're interested in more examples of short kernel modules, I recommend Phrack magazine. Even if you're not interested in security, and as a programmer you should be, the kernel modules there are good examples of what you can do inside the kernel, and they're short enough not to require too much effort to understand.

I hope I have helped you in your quest to become a better programmer, or at least to have fun through technology. And, if you do write useful kernel modules, I hope you publish them under the GPL, so I can use them too.

 

Index

B

BH_IMMEDIATE, Interrupt Handlers blocking processes, Blocking Processes blocking, how to avoid, Replacing printk bottom half, Interrupt Handlers busy, Replacing printk

E

EAGAIN, Replacing printk EINTR, Replacing printk elf_i386, Modules Spanning Multiple Files ENTRY(system call), System Calls entry.S, System Calls

F

file, The file structure filesystem
/proc, The /proc File System
registration, Using /proc For Input
filesystem registration, Using /proc For Input file_operations, The file_operations Structure file_operations structure, Using /proc For Input flush, Changes between 2.0 and 2.2

H

handlers
interrupt, Interrupt Handlers
housekeeping, Scheduling Tasks Hurd, Code space

M

major number, Major and Minor Numbers
dynamic allocation, Registering A Device
mark_bh, Interrupt Handlers memory segments, Using /proc For Input microkernel, Code space minor number, Major and Minor Numbers mknod, Major and Minor Numbers modem, Talking to Device Files (writes and IOCTLs)} module
parameters, Changes between 2.0 and 2.2
module parameters, Changes between 2.0 and 2.2 module.h, Modules Spanning Multiple Files modules.conf
alias, How Do Modules Get Into The Kernel?
comment, How Do Modules Get Into The Kernel?
keep, How Do Modules Get Into The Kernel?
options, How Do Modules Get Into The Kernel?
path, How Do Modules Get Into The Kernel?
MODULE_AUTHOR(), Hello World (part 4): Licensing and Module Documentation module_cleanup, Scheduling Tasks MODULE_DESCRIPTION(), Hello World (part 4): Licensing and Module Documentation module_exit, Hello World (part 2) module_init, Hello World (part 2) module_interruptible_sleep_on, Replacing printk MODULE_LICENSE(), Hello World (part 4): Licensing and Module Documentation MODULE_PARM, Changes between 2.0 and 2.2 module_permissions, Using /proc For Input module_sleep_on, Replacing printk, Scheduling Tasks MODULE_SUPPORTED_DEVICE(), Hello World (part 4): Licensing and Module Documentation module_wake_up, Replacing printk MOD_DEC_USE_COUNT, Unregistering A Device MOD_INC_USE_COUNT, Unregistering A Device, System Calls MOD_IN_USE, Unregistering A Device monolithic kernel, Code space multi-processing, Symmetrical Multi-Processing multi-tasking, Replacing printk multitasking, Replacing printk

N

namespace pollution, Name Space Neutrino, Code space non-blocking, Replacing printk

O

official ioctl assignment, Talking to Device Files (writes and IOCTLs)} O_NONBLOCK, Replacing printk

P

permission, Using /proc For Input pointer
current, Using /proc For Input
printk
replacing, Replacing printk
printk(), Introducing printk() proc
using for input, Using /proc For Input
proc file
ksyms, Common Pitfalls
processes
blocking, Blocking Processes
killing, Replacing printk
waking up, Replacing printk
processing
multi, Symmetrical Multi-Processing
proc_dir_entry, Using /proc For Input proc_register, The /proc File System, Changes between 2.0 and 2.2 proc_register_dynamic, The /proc File System, Changes between 2.0 and 2.2 putting processes to sleep, Replacing printk put_user, Using /proc For Input, Changes between 2.0 and 2.2

R

read, Changes between 2.0 and 2.2
in the kernel, Using /proc For Input
reference count, Scheduling Tasks refund policy, Common Pitfalls register_chrdev, Registering A Device request_irq(), Interrupt Handlers rmmod, System Calls, Scheduling Tasks
preventing, Unregistering A Device

S

SA_INTERRUPT, Interrupt Handlers SA_SHIRQ, Interrupt Handlers scheduler, Replacing printk scheduling tasks, Scheduling Tasks segment
memory, Using /proc For Input
serial port, Talking to Device Files (writes and IOCTLs)} shutdown, System Calls SIGINT, Replacing printk signal, Replacing printk signals, Changes between 2.0 and 2.2 sleep
putting processes to, Replacing printk
sleep_on, Replacing printk, Scheduling Tasks SMP, Symmetrical Multi-Processing, Changes between 2.0 and 2.2 source file
chardev.c, Talking to Device Files (writes and IOCTLs)}
chardev.h, Talking to Device Files (writes and IOCTLs)}
hello-1.c, Hello, World (part 1): The Simplest Module
hello-2.c, Hello World (part 2)
hello-3.c, Hello World (part 3): The __init and __exit Macros
hello-4.c, Hello World (part 4): Licensing and Module Documentation
hello-5.c, Passing Command Line Arguments to a Module
intrpt.c, Keyboards on the Intel Architecture
ioctl.c, Talking to Device Files (writes and IOCTLs)}
print_string.c, Replacing printk
procfs.c, System Calls
sched.c, Scheduling Tasks
sleep.c, Replacing printk
start.c, Modules Spanning Multiple Files
stop.c, Modules Spanning Multiple Files
source files
multiple, Modules Spanning Multiple Files
ssize_t, Changes between 2.0 and 2.2 standard libraries, Common Pitfalls strace, Functions available to modules, System Calls struct
tty, Replacing printk
struct file_operations, Using /proc For Input struct inode_operations, Using /proc For Input structure
file_operations, Changes between 2.0 and 2.2
symbol table, Name Space symmetrical multi-processing, Symmetrical Multi-Processing, Changes between 2.0 and 2.2 sync, System Calls system call, Functions available to modules, System Calls
open, System Calls
system calls, System Calls sys_call_table, System Calls sys_open, System Calls

T

task, Scheduling Tasks
current, Replacing printk
tasks
scheduling, Scheduling Tasks
TASK_INTERRUPTIBLE, Replacing printk tq_immediate, Interrupt Handlers tq_struct, Scheduling Tasks tq_timer, Scheduling Tasks tty_structure, Replacing printk

W

waking up processes, Replacing printk write, Changes between 2.0 and 2.2
in the kernel, Using /proc For Input
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值