3 Index of Documentation for People Interested in Writing and/or Understanding the Linux Kernel
4 =============================================================================================
6 Juan-Mariano de Goyeneche <jmseyas@dit.upm.es>
9 The latest version of this document may be found at:
10 :http://www.dit.upm.es/~jmseyas/linux/kernel/hackers-docs.html
12 The need for a document like this one became apparent in the
13 linux-kernel mailing list as the same questions, asking for pointers
14 to information, appeared again and again.
16 Fortunately, as more and more people get to GNU/Linux, more and more
17 get interested in the Kernel. But reading the sources is not always
18 enough. It is easy to understand the code, but miss the concepts, the
19 philosophy and design decisions behind this code.
21 Unfortunately, not many documents are available for beginners to
22 start. And, even if they exist, there was no "well-known" place which
23 kept track of them. These lines try to cover this lack. All documents
24 available on line known by the author are listed, while some reference
25 books are also mentioned.
27 PLEASE, if you know any paper not listed here or write a new document,
28 send me an e-mail, and I'll include a reference to it here. Any
29 corrections, ideas or comments are also welcomed.
31 The papers that follow are listed in no particular order. All are
32 cataloged with the following fields: the document's "Title", the
33 "Author"/s, the "URL" where they can be found, some "Keywords" helpful
34 when searching for specific topics, and a brief "Description" of the
42 * Title: **Linux Device Drivers, Third Edition**
44 :Author: Jonathan Corbet, Alessandro Rubini, Greg Kroah-Hartman
45 :URL: http://lwn.net/Kernel/LDD3/
46 :Description: A 600-page book covering the (2.6.10) driver
47 programming API and kernel hacking in general. Available under the
48 Creative Commons Attribution-ShareAlike 2.0 license.
50 * Title: **The Linux Kernel**
52 :Author: David A. Rusling.
53 :URL: http://www.tldp.org/LDP/tlk/tlk.html
54 :Keywords: everything!, book.
55 :Description: On line, 200 pages book describing most aspects of
56 the Linux Kernel. Probably, the first reference for beginners.
57 Lots of illustrations explaining data structures use and
58 relationships in the purest Richard W. Stevens' style. Contents:
59 "1.-Hardware Basics, 2.-Software Basics, 3.-Memory Management,
60 4.-Processes, 5.-Interprocess Communication Mechanisms, 6.-PCI,
61 7.-Interrupts and Interrupt Handling, 8.-Device Drivers, 9.-The
62 File system, 10.-Networks, 11.-Kernel Mechanisms, 12.-Modules,
63 13.-The Linux Kernel Sources, A.-Linux Data Structures, B.-The
64 Alpha AXP Processor, C.-Useful Web and FTP Sites, D.-The GNU
65 General Public License, Glossary". In short: a must have.
67 * Title: **Linux Device Drivers, 2nd Edition**
69 :Author: Alessandro Rubini and Jonathan Corbet.
70 :URL: http://www.xml.com/ldd/chapter/book/index.html
71 :Keywords: device drivers, modules, debugging, memory, hardware,
72 interrupt handling, char drivers, block drivers, kmod, mmap, DMA,
74 :Description: O'Reilly's popular book, now also on-line under the
75 GNU Free Documentation License.
76 :Notes: You can also buy it in paper-form from O'Reilly. See below
77 under BOOKS (Not on-line).
79 * Title: **Conceptual Architecture of the Linux Kernel**
81 :Author: Ivan T. Bowman.
82 :URL: http://plg.uwaterloo.ca/
83 :Keywords: conceptual software architecture, extracted design,
84 reverse engineering, system structure.
85 :Description: Conceptual software architecture of the Linux kernel,
86 automatically extracted from the source code. Very detailed. Good
87 figures. Gives good overall kernel understanding.
89 * Title: **Concrete Architecture of the Linux Kernel**
91 :Author: Ivan T. Bowman, Saheem Siddiqi, and Meyer C. Tanuan.
92 :URL: http://plg.uwaterloo.ca/
93 :Keywords: concrete architecture, extracted design, reverse
94 engineering, system structure, dependencies.
95 :Description: Concrete architecture of the Linux kernel,
96 automatically extracted from the source code. Very detailed. Good
97 figures. Gives good overall kernel understanding. This papers
98 focus on lower details than its predecessor (files, variables...).
100 * Title: **Linux as a Case Study: Its Extracted Software Architecture**
102 :Author: Ivan T. Bowman, Richard C. Holt and Neil V. Brewster.
103 :URL: http://plg.uwaterloo.ca/
104 :Keywords: software architecture, architecture recovery,
106 :Description: Paper appeared at ICSE'99, Los Angeles, May 16-22,
107 1999. A mixture of the previous two documents from the same
110 * Title: **Overview of the Virtual File System**
112 :Author: Richard Gooch.
113 :URL: http://www.mjmwired.net/kernel/Documentation/filesystems/vfs.txt
114 :Keywords: VFS, File System, mounting filesystems, opening files,
116 :Description: Brief introduction to the Linux Virtual File System.
117 What is it, how it works, operations taken when opening a file or
118 mounting a file system and description of important data
119 structures explaining the purpose of each of their entries.
121 * Title: **The Linux RAID-1, 4, 5 Code**
123 :Author: Ingo Molnar, Gadi Oxman and Miguel de Icaza.
124 :URL: http://www.linuxjournal.com/article.php?sid=2391
125 :Keywords: RAID, MD driver.
126 :Description: Linux Journal Kernel Korner article. Here is its
127 :Abstract: *A description of the implementation of the RAID-1,
128 RAID-4 and RAID-5 personalities of the MD device driver in the
129 Linux kernel, providing users with high performance and reliable,
130 secondary-storage capability using software*.
132 * Title: **Dynamic Kernels: Modularized Device Drivers**
134 :Author: Alessandro Rubini.
135 :URL: http://www.linuxjournal.com/article.php?sid=1219
136 :Keywords: device driver, module, loading/unloading modules,
137 allocating resources.
138 :Description: Linux Journal Kernel Korner article. Here is its
139 :Abstract: *This is the first of a series of four articles
140 co-authored by Alessandro Rubini and Georg Zezchwitz which present
141 a practical approach to writing Linux device drivers as kernel
142 loadable modules. This installment presents an introduction to the
143 topic, preparing the reader to understand next month's
146 * Title: **Dynamic Kernels: Discovery**
148 :Author: Alessandro Rubini.
149 :URL: http://www.linuxjournal.com/article.php?sid=1220
150 :Keywords: character driver, init_module, clean_up module,
151 autodetection, mayor number, minor number, file operations,
153 :Description: Linux Journal Kernel Korner article. Here is its
154 :Abstract: *This article, the second of four, introduces part of
155 the actual code to create custom module implementing a character
156 device driver. It describes the code for module initialization and
157 cleanup, as well as the open() and close() system calls*.
159 * Title: **The Devil's in the Details**
161 :Author: Georg v. Zezschwitz and Alessandro Rubini.
162 :URL: http://www.linuxjournal.com/article.php?sid=1221
163 :Keywords: read(), write(), select(), ioctl(), blocking/non
164 blocking mode, interrupt handler.
165 :Description: Linux Journal Kernel Korner article. Here is its
166 :Abstract: *This article, the third of four on writing character
167 device drivers, introduces concepts of reading, writing, and using
170 * Title: **Dissecting Interrupts and Browsing DMA**
172 :Author: Alessandro Rubini and Georg v. Zezschwitz.
173 :URL: http://www.linuxjournal.com/article.php?sid=1222
174 :Keywords: interrupts, irqs, DMA, bottom halves, task queues.
175 :Description: Linux Journal Kernel Korner article. Here is its
176 :Abstract: *This is the fourth in a series of articles about
177 writing character device drivers as loadable kernel modules. This
178 month, we further investigate the field of interrupt handling.
179 Though it is conceptually simple, practical limitations and
180 constraints make this an ''interesting'' part of device driver
181 writing, and several different facilities have been provided for
182 different situations. We also investigate the complex topic of
185 * Title: **Device Drivers Concluded**
187 :Author: Georg v. Zezschwitz.
188 :URL: http://www.linuxjournal.com/article.php?sid=1287
189 :Keywords: address spaces, pages, pagination, page management,
190 demand loading, swapping, memory protection, memory mapping, mmap,
191 virtual memory areas (VMAs), vremap, PCI.
192 :Description: Finally, the above turned out into a five articles
193 series. This latest one's introduction reads: "This is the last of
194 five articles about character device drivers. In this final
195 section, Georg deals with memory mapping devices, beginning with
196 an overall description of the Linux memory management concepts".
198 * Title: **Network Buffers And Memory Management**
201 :URL: http://www.linuxjournal.com/article.php?sid=1312
202 :Keywords: sk_buffs, network devices, protocol/link layer
203 variables, network devices flags, transmit, receive,
204 configuration, multicast.
205 :Description: Linux Journal Kernel Korner.
206 :Abstract: *Writing a network device driver for Linux is fundamentally
207 simple---most of the complexity (other than talking to the
208 hardware) involves managing network packets in memory*.
210 * Title: **Linux Kernel Hackers' Guide**
212 :Author: Michael K. Johnson.
213 :URL: http://www.tldp.org/LDP/khg/HyperNews/get/khg.html
214 :Keywords: device drivers, files, VFS, kernel interface, character vs
215 block devices, hardware interrupts, scsi, DMA, access to user memory,
216 memory allocation, timers.
217 :Description: A guide designed to help you get up to speed on the
218 concepts that are not intuitevly obvious, and to document the internal
221 * Title: **The Venus kernel interface**
223 :Author: Peter J. Braam.
224 :URL: http://www.coda.cs.cmu.edu/doc/html/kernel-venus-protocol.html
225 :Keywords: coda, filesystem, venus, cache manager.
226 :Description: "This document describes the communication between
227 Venus and kernel level file system code needed for the operation
228 of the Coda filesystem. This version document is meant to describe
229 the current interface (version 1.0) as well as improvements we
232 * Title: **Design and Implementation of the Second Extended Filesystem**
234 :Author: Rémy Card, Theodore Ts'o, Stephen Tweedie.
235 :URL: http://web.mit.edu/tytso/www/linux/ext2intro.html
236 :Keywords: ext2, linux fs history, inode, directory, link, devices,
237 VFS, physical structure, performance, benchmarks, ext2fs library,
238 ext2fs tools, e2fsck.
239 :Description: Paper written by three of the top ext2 hackers.
240 Covers Linux filesystems history, ext2 motivation, ext2 features,
241 design, physical structure on disk, performance, benchmarks,
242 e2fsck's passes description... A must read!
243 :Notes: This paper was first published in the Proceedings of the
244 First Dutch International Symposium on Linux, ISBN 90-367-0385-9.
246 * Title: **Analysis of the Ext2fs structure**
248 :Author: Louis-Dominique Dubeau.
249 :URL: http://teaching.csse.uwa.edu.au/units/CITS2002/fs-ext2/
250 :Keywords: ext2, filesystem, ext2fs.
251 :Description: Description of ext2's blocks, directories, inodes,
252 bitmaps, invariants...
254 * Title: **Linux Kernel Module Programming Guide**
256 :Author: Ori Pomerantz.
257 :URL: http://tldp.org/LDP/lkmpg/2.6/html/index.html
258 :Keywords: modules, GPL book, /proc, ioctls, system calls,
260 :Description: Very nice 92 pages GPL book on the topic of modules
261 programming. Lots of examples.
263 * Title: **I/O Event Handling Under Linux**
265 :Author: Richard Gooch.
266 :Keywords: IO, I/O, select(2), poll(2), FDs, aio_read(2), readiness
268 :Description: From the Introduction: "I/O Event handling is about
269 how your Operating System allows you to manage a large number of
270 open files (file descriptors in UNIX/POSIX, or FDs) in your
271 application. You want the OS to notify you when FDs become active
272 (have data ready to be read or are ready for writing). Ideally you
273 want a mechanism that is scalable. This means a large number of
274 inactive FDs cost very little in memory and CPU time to manage".
276 * Title: **The Kernel Hacking HOWTO**
278 :Author: Various Talented People, and Rusty.
279 :Location: in kernel tree, Documentation/DocBook/kernel-hacking.tmpl
280 (must be built as "make {htmldocs | psdocs | pdfdocs})
281 :Keywords: HOWTO, kernel contexts, deadlock, locking, modules,
282 symbols, return conventions.
283 :Description: From the Introduction: "Please understand that I
284 never wanted to write this document, being grossly underqualified,
285 but I always wanted to read it, and this was the only way. I
286 simply explain some best practices, and give reading entry-points
287 into the kernel sources. I avoid implementation details: that's
288 what the code is for, and I ignore whole tracts of useful
289 routines. This document assumes familiarity with C, and an
290 understanding of what the kernel is, and how it is used. It was
291 originally written for the 2.3 kernels, but nearly all of it
292 applies to 2.2 too; 2.0 is slightly different".
294 * Title: **Writing an ALSA Driver**
296 :Author: Takashi Iwai <tiwai@suse.de>
297 :URL: http://www.alsa-project.org/~iwai/writing-an-alsa-driver/index.html
298 :Keywords: ALSA, sound, soundcard, driver, lowlevel, hardware.
299 :Description: Advanced Linux Sound Architecture for developers,
300 both at kernel and user-level sides. ALSA is the Linux kernel
301 sound architecture in the 2.6 kernel version.
303 * Title: **Linux Kernel Mailing List Glossary**
306 :URL: http://kernelnewbies.org/glossary/
307 :Keywords: glossary, terms, linux-kernel.
308 :Description: From the introduction: "This glossary is intended as
309 a brief description of some of the acronyms and terms you may hear
310 during discussion of the Linux kernel".
312 * Title: **Linux Kernel Locking HOWTO**
314 :Author: Various Talented People, and Rusty.
315 :Location: in kernel tree, Documentation/DocBook/kernel-locking.tmpl
316 (must be built as "make {htmldocs | psdocs | pdfdocs})
317 :Keywords: locks, locking, spinlock, semaphore, atomic, race
318 condition, bottom halves, tasklets, softirqs.
319 :Description: The title says it all: document describing the
320 locking system in the Linux Kernel either in uniprocessor or SMP
322 :Notes: "It was originally written for the later (>2.3.47) 2.3
323 kernels, but most of it applies to 2.2 too; 2.0 is slightly
324 different". Freely redistributable under the conditions of the GNU
325 General Public License.
327 * Title: **Global spinlock list and usage**
329 :Author: Rick Lindsley.
330 :URL: http://lse.sourceforge.net/lockhier/global-spin-lock
332 :Description: This is an attempt to document both the existence and
333 usage of the spinlocks in the Linux 2.4.5 kernel. Comprehensive
334 list of spinlocks showing when they are used, which functions
335 access them, how each lock is acquired, under what conditions it
336 is held, whether interrupts can occur or not while it is held...
338 * Title: **How To Make Sure Your Driver Will Work On The Power Macintosh**
340 :Author: Paul Mackerras.
341 :URL: http://www.linux-mag.com/id/261
342 :Keywords: Mac, Power Macintosh, porting, drivers, compatibility.
343 :Description: The title says it all.
345 * Title: **An Introduction to SCSI Drivers**
348 :URL: http://www.linux-mag.com/id/284
349 :Keywords: SCSI, device, driver.
350 :Description: The title says it all.
352 * Title: **Advanced SCSI Drivers And Other Tales**
355 :URL: http://www.linux-mag.com/id/307
356 :Keywords: SCSI, device, driver, advanced.
357 :Description: The title says it all.
359 * Title: **Writing Linux Mouse Drivers**
362 :URL: http://www.linux-mag.com/id/330
363 :Keywords: mouse, driver, gpm.
364 :Description: The title says it all.
366 * Title: **More on Mouse Drivers**
369 :URL: http://www.linux-mag.com/id/356
370 :Keywords: mouse, driver, gpm, races, asynchronous I/O.
371 :Description: The title still says it all.
373 * Title: **Writing Video4linux Radio Driver**
376 :URL: http://www.linux-mag.com/id/381
377 :Keywords: video4linux, driver, radio, radio devices.
378 :Description: The title says it all.
380 * Title: **Video4linux Drivers, Part 1: Video-Capture Device**
383 :URL: http://www.linux-mag.com/id/406
384 :Keywords: video4linux, driver, video capture, capture devices,
386 :Description: The title says it all.
388 * Title: **Video4linux Drivers, Part 2: Video-capture Devices**
391 :URL: http://www.linux-mag.com/id/429
392 :Keywords: video4linux, driver, video capture, capture devices,
393 camera driver, control, query capabilities, capability, facility.
394 :Description: The title says it all.
396 * Title: **Linux IP Networking. A Guide to the Implementation and Modification of the Linux Protocol Stack.**
398 :Author: Glenn Herrin.
399 :URL: http://www.cs.unh.edu/cnrg/gherrin
400 :Keywords: network, networking, protocol, IP, UDP, TCP, connection,
401 socket, receiving, transmitting, forwarding, routing, packets,
402 modules, /proc, sk_buff, FIB, tags.
403 :Description: Excellent paper devoted to the Linux IP Networking,
404 explaining anything from the kernel's to the user space
405 configuration tools' code. Very good to get a general overview of
406 the kernel networking implementation and understand all steps
407 packets follow from the time they are received at the network
408 device till they are delivered to applications. The studied kernel
409 code is from 2.2.14 version. Provides code for a working packet
412 * Title: **Linux PCMCIA Programmer's Guide**
414 :Author: David Hinds.
415 :URL: http://pcmcia-cs.sourceforge.net/ftp/doc/PCMCIA-PROG.html
417 :Description: "This document describes how to write kernel device
418 drivers for the Linux PCMCIA Card Services interface. It also
419 describes how to write user-mode utilities for communicating with
422 * Title: **A Linux vm README**
424 :Author: Kanoj Sarcar.
425 :URL: http://kos.enix.org/pub/linux-vmm.html
426 :Keywords: virtual memory, mm, pgd, vma, page, page flags, page
427 cache, swap cache, kswapd.
428 :Description: Telegraphic, short descriptions and definitions
429 relating the Linux virtual memory implementation.
431 * Title: **(nearly) Complete Linux Loadable Kernel Modules. The definitive guide for hackers, virus coders and system administrators.**
433 :Author: pragmatic/THC.
434 :URL: http://packetstormsecurity.org/docs/hack/LKM_HACKING.html
435 :Keywords: syscalls, intercept, hide, abuse, symbol table.
436 :Description: Interesting paper on how to abuse the Linux kernel in
437 order to intercept and modify syscalls, make
438 files/directories/processes invisible, become root, hijack ttys,
439 write kernel modules based virus... and solutions for admins to
440 avoid all those abuses.
441 :Notes: For 2.0.x kernels. Gives guidances to port it to 2.2.x
447 * Title: **Linux Device Drivers**
449 :Author: Alessandro Rubini
450 :Publisher: O'Reilly & Associates
455 * Title: **Linux Device Drivers, 2nd Edition**
457 :Author: Alessandro Rubini and Jonathan Corbet
458 :Publisher: O'Reilly & Associates
462 :Notes: Further information in
463 http://www.oreilly.com/catalog/linuxdrive2/
465 * Title: **Linux Device Drivers, 3rd Edition**
467 :Authors: Jonathan Corbet, Alessandro Rubini, and Greg Kroah-Hartman
468 :Publisher: O'Reilly & Associates
472 :Notes: Further information in
473 http://www.oreilly.com/catalog/linuxdrive3/
474 PDF format, URL: http://lwn.net/Kernel/LDD3/
476 * Title: **Linux Kernel Internals**
478 :Author: Michael Beck
479 :Publisher: Addison-Wesley
481 :ISBN: 0-201-33143-8 (second edition)
483 * Title: **The Design of the UNIX Operating System**
485 :Author: Maurice J. Bach
486 :Publisher: Prentice Hall
491 * Title: **The Design and Implementation of the 4.3 BSD UNIX Operating System**
493 :Author: Samuel J. Leffler, Marshall Kirk McKusick, Michael J
494 Karels, John S. Quarterman
495 :Publisher: Addison-Wesley
496 :Date: 1989 (reprinted with corrections on October, 1990)
499 * Title: **The Design and Implementation of the 4.4 BSD UNIX Operating System**
501 :Author: Marshall Kirk McKusick, Keith Bostic, Michael J. Karels,
503 :Publisher: Addison-Wesley
507 * Title: **Programmation Linux 2.0 API systeme et fonctionnement du noyau**
509 :Author: Remy Card, Eric Dumas, Franck Mevel
516 * Title: **Unix internals -- the new frontiers**
518 :Author: Uresh Vahalia
519 :Publisher: Prentice Hall
524 * Title: **Programming for the real world - POSIX.4**
526 :Author: Bill O. Gallmeister
527 :Publisher: O'Reilly & Associates, Inc
531 :Notes: Though not being directly about Linux, Linux aims to be
532 POSIX. Good reference.
534 * Title: **UNIX Systems for Modern Architectures: Symmetric Multiprocessing and Caching for Kernel Programmers**
536 :Author: Curt Schimmel
537 :Publisher: Addison Wesley
542 * Title: **Linux Kernel Development, 3rd Edition**
545 :Publisher: Addison-Wesley
548 :ISBN: 978-0672329463
553 * Name: **linux/Documentation**
556 :URL: Just look inside your kernel sources.
557 :Keywords: anything, DocBook.
558 :Description: Documentation that comes with the kernel sources,
559 inside the Documentation directory. Some pages from this document
560 (including this document itself) have been moved there, and might
561 be more up to date than the web version.
563 * Name: **Linux Kernel Source Reference**
565 :Author: Thomas Graichen.
566 :URL: http://marc.info/?l=linux-kernel&m=96446640102205&w=4
567 :Keywords: CVS, web, cvsweb, browsing source code.
568 :Description: Web interface to a CVS server with the kernel
569 sources. "Here you can have a look at any file of the Linux kernel
570 sources of any version starting from 1.0 up to the (daily updated)
571 current version available. Also you can check the differences
572 between two versions of a file".
574 * Name: **Cross-Referencing Linux**
576 :URL: http://lxr.free-electrons.com/
577 :Keywords: Browsing source code.
578 :Description: Another web-based Linux kernel source code browser.
579 Lots of cross references to variables and functions. You can see
580 where they are defined and where they are used.
582 * Name: **Linux Weekly News**
585 :Keywords: latest kernel news.
586 :Description: The title says it all. There's a fixed kernel section
587 summarizing developers' work, bug fixes, new features and versions
588 produced during the week. Published every Thursday.
590 * Name: **Linux Virtual File System**
592 :Author: Peter J. Braam.
593 :URL: http://www.coda.cs.cmu.edu/doc/talks/linuxvfs/
594 :Keywords: slides, VFS, inode, superblock, dentry, dcache.
595 :Description: Set of slides, presumably from a presentation on the
596 Linux VFS layer. Covers version 2.1.x, with dentries and the
599 * Name: **The home page of Linux-MM**
601 :Author: The Linux-MM team.
602 :URL: http://linux-mm.org/
603 :Keywords: memory management, Linux-MM, mm patches, TODO, docs,
605 :Description: Site devoted to Linux Memory Management development.
606 Memory related patches, HOWTOs, links, mm developers... Don't miss
607 it if you are interested in memory management development!
609 * Name: **Kernel Newbies IRC Channel and Website**
611 :URL: http://www.kernelnewbies.org
612 :Keywords: IRC, newbies, channel, asking doubts.
613 :Description: #kernelnewbies on irc.oftc.net.
614 #kernelnewbies is an IRC network dedicated to the 'newbie'
615 kernel hacker. The audience mostly consists of people who are
616 learning about the kernel, working on kernel projects or
617 professional kernel hackers that want to help less seasoned kernel
619 #kernelnewbies is on the OFTC IRC Network.
620 Try irc.oftc.net as your server and then /join #kernelnewbies.
621 The kernelnewbies website also hosts articles, documents, FAQs...
623 * Name: **linux-kernel mailing list archives and search engines**
625 :URL: http://vger.kernel.org/vger-lists.html
626 :URL: http://www.uwsg.indiana.edu/hypermail/linux/kernel/index.html
627 :URL: http://groups.google.com/group/mlist.linux.kernel
628 :Keywords: linux-kernel, archives, search.
629 :Description: Some of the linux-kernel mailing list archivers. If
630 you have a better/another one, please let me know.
634 Document last updated on Mon 2016-Sep-19