What you should have in mind when writing kernel code.
[cascardo/kernel/old_slides/.git] / plano
1 intro
2         linux
3                 version history/evolution DO?
4                 modules
5                 constant change, book is already outdated
6                 current versioning/development model
7                 build dependencies
8                 running new/bleeding-edge kernels
9
10 concepts
11         kernel/user space
12                 rings/levels/modes
13                 memory protection/segmentation/pagination
14                 library calls
15                 allowed uses (floating point forbidden)
16                 concurrency
17                 small stack
18         libc/system calls
19         operating system functions
20                 process management
21                         concurrency
22                         communication/IPC, scheduling
23                 memory management
24                         address space
25                         virtual memory
26                 filesystems
27                 networking
28                 device, I/O
29         robustness/security
30                 error checking
31                 kernel space code
32                 programming errors and bugs
33                 restrict some operations to privileged users
34                 do not send unzeored data (information leak)
35                 do not trust received data (malformed data) (exploit)
36                 risks for the machine/system/data
37
38 basics
39         Makefile
40         Kconfig DO?
41         building linux DO?
42         build
43         init/exit
44         module macros
45         module parameters
46         config/build time options/parameters
47         sysfs interface for modules DO?
48         printk
49
50 VFS
51         center/hub/interface
52         char/block/procfs/sysfs: all go through VFS to device
53         fops is the main structure in linux
54         FS on top of block devices
55                 block layer
56                 exception: some on top of MTD devices
57
58 device driver subsystem
59         buses
60         device classes
61         interfaces
62                 dev file
63                 sysfs
64                 procfs
65                 sysctl DO?
66                 netlink DO?
67
68 char device
69 procfs
70 sysfs
71 block device DO? STUDY
72 network device DO? STUDY
73 terminal/serial device DO? STUDY
74
75 debugging techniques
76         printk/procfs
77         debugfs DO? STUDY
78         kgdb DO?
79         trace DO?
80         kprobe DO?
81
82 C basics
83         container_of (struct embedding)
84         fops/*ops (function pointers)
85         IS_ERR (pointers and error values)
86
87 data structures
88         list_head
89         bitmap
90         trees DO? STUDY rbtree
91         idr DO?
92         any hash implementation DO? STUDY
93
94 contexts
95         user context (current, copy_from_user, schedule) STUDY schedule
96         interrupt context
97         workqueue is user context
98         sleep == schedule
99
100 concurrency
101         SMP systems
102         locking
103         spinlock: disable scheduler
104         semaphore/mutex sleeps
105         per-cpu variables STUDY
106         atomic
107         RCU DO?
108
109 memory allocation
110         kobject refcount MENTION
111         slab STUDY
112                 multiple implementations
113                 space efficient (tables for different object sizes)
114                 concurrency efficient (per-cpu tables)
115         kmalloc
116                 uses slab STUDY
117         vmalloc
118                 linux memory layout
119
120 scheduling/timing
121         schedule{,_timeout}
122         timer
123         workqueue
124         completion/wait_head
125         tasklets DO? STUDY
126
127 portability
128         readl/writel/etc
129         be16_to_cpu/etc
130
131 interrupt
132         {request,free}_irq
133         interrupt context
134         tasklet/workqueue/postpone
135
136 buses
137         PCI bus DO?
138         USB bus DO?
139         some bus: SPI, I2C, parport DO?
140
141 device classes
142         some class: cdrom, backlight, input, misc DO?
143
144 kobject DO? advanced
145         refcounting
146
147 STUDY:
148         module owner, concurrency, reference counting