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>
8 The need for a document like this one became apparent in the
9 linux-kernel mailing list as the same questions, asking for pointers
10 to information, appeared again and again.
12 Fortunately, as more and more people get to GNU/Linux, more and more
13 get interested in the Kernel. But reading the sources is not always
14 enough. It is easy to understand the code, but miss the concepts, the
15 philosophy and design decisions behind this code.
17 Unfortunately, not many documents are available for beginners to
18 start. And, even if they exist, there was no "well-known" place which
19 kept track of them. These lines try to cover this lack. All documents
20 available on line known by the author are listed, while some reference
21 books are also mentioned.
23 PLEASE, if you know any paper not listed here or write a new document,
24 send me an e-mail, and I'll include a reference to it here. Any
25 corrections, ideas or comments are also welcomed.
27 The papers that follow are listed in no particular order. All are
28 cataloged with the following fields: the document's "Title", the
29 "Author"/s, the "URL" where they can be found, some "Keywords" helpful
30 when searching for specific topics, and a brief "Description" of the
38 * Title: **Linux Device Drivers, Third Edition**
40 :Author: Jonathan Corbet, Alessandro Rubini, Greg Kroah-Hartman
41 :URL: http://lwn.net/Kernel/LDD3/
42 :Description: A 600-page book covering the (2.6.10) driver
43 programming API and kernel hacking in general. Available under the
44 Creative Commons Attribution-ShareAlike 2.0 license.
45 :note: You can also :ref:`purchase a copy from O'Reilly or elsewhere <ldd3_published>`.
47 * Title: **Conceptual Architecture of the Linux Kernel**
49 :Author: Ivan T. Bowman.
50 :URL: http://plg.uwaterloo.ca/
51 :Keywords: conceptual software architecture, extracted design,
52 reverse engineering, system structure.
53 :Description: Conceptual software architecture of the Linux kernel,
54 automatically extracted from the source code. Very detailed. Good
55 figures. Gives good overall kernel understanding.
57 * Title: **Concrete Architecture of the Linux Kernel**
59 :Author: Ivan T. Bowman, Saheem Siddiqi, and Meyer C. Tanuan.
60 :URL: http://plg.uwaterloo.ca/
61 :Keywords: concrete architecture, extracted design, reverse
62 engineering, system structure, dependencies.
63 :Description: Concrete architecture of the Linux kernel,
64 automatically extracted from the source code. Very detailed. Good
65 figures. Gives good overall kernel understanding. This papers
66 focus on lower details than its predecessor (files, variables...).
68 * Title: **Linux as a Case Study: Its Extracted Software Architecture**
70 :Author: Ivan T. Bowman, Richard C. Holt and Neil V. Brewster.
71 :URL: http://plg.uwaterloo.ca/
72 :Keywords: software architecture, architecture recovery,
74 :Description: Paper appeared at ICSE'99, Los Angeles, May 16-22,
75 1999. A mixture of the previous two documents from the same
78 * Title: **Overview of the Virtual File System**
80 :Author: Richard Gooch.
81 :URL: http://www.mjmwired.net/kernel/Documentation/filesystems/vfs.txt
82 :Keywords: VFS, File System, mounting filesystems, opening files,
84 :Description: Brief introduction to the Linux Virtual File System.
85 What is it, how it works, operations taken when opening a file or
86 mounting a file system and description of important data
87 structures explaining the purpose of each of their entries.
89 * Title: **The Linux RAID-1, 4, 5 Code**
91 :Author: Ingo Molnar, Gadi Oxman and Miguel de Icaza.
92 :URL: http://www.linuxjournal.com/article.php?sid=2391
93 :Keywords: RAID, MD driver.
94 :Description: Linux Journal Kernel Korner article. Here is its
95 :Abstract: *A description of the implementation of the RAID-1,
96 RAID-4 and RAID-5 personalities of the MD device driver in the
97 Linux kernel, providing users with high performance and reliable,
98 secondary-storage capability using software*.
100 * Title: **Dynamic Kernels: Modularized Device Drivers**
102 :Author: Alessandro Rubini.
103 :URL: http://www.linuxjournal.com/article.php?sid=1219
104 :Keywords: device driver, module, loading/unloading modules,
105 allocating resources.
106 :Description: Linux Journal Kernel Korner article. Here is its
107 :Abstract: *This is the first of a series of four articles
108 co-authored by Alessandro Rubini and Georg Zezchwitz which present
109 a practical approach to writing Linux device drivers as kernel
110 loadable modules. This installment presents an introduction to the
111 topic, preparing the reader to understand next month's
114 * Title: **Dynamic Kernels: Discovery**
116 :Author: Alessandro Rubini.
117 :URL: http://www.linuxjournal.com/article.php?sid=1220
118 :Keywords: character driver, init_module, clean_up module,
119 autodetection, mayor number, minor number, file operations,
121 :Description: Linux Journal Kernel Korner article. Here is its
122 :Abstract: *This article, the second of four, introduces part of
123 the actual code to create custom module implementing a character
124 device driver. It describes the code for module initialization and
125 cleanup, as well as the open() and close() system calls*.
127 * Title: **On submitting kernel Patches**
130 :URL: http://halobates.de/on-submitting-kernel-patches.pdf
131 :Keywords: patches, review process, types of submissions, basic rules, case studies
132 :Description: This paper gives several experience values on what types of patches
133 there are and how likley they get merged.
135 [...]. This paper examines some common problems for
136 submitting larger changes and some strategies to avoid problems.
138 * Title: **Tracing the Way of Data in a TCP Connection through the Linux Kernel**
139 :Author: Richard Sailer
140 :URL: https://archive.org/details/linux_kernel_data_flow_short_paper
141 :Keywords: Linux Kernel Networking, TCP, tracing, ftrace
142 :Description: A seminar paper explaining ftrace and how to use it for
143 understanding linux kernel internals,
144 illustrated at tracing the way of a TCP packet through the kernel.
145 :Abstract: *This short paper outlines the usage of ftrace a tracing framework
146 as a tool to understand a running Linux system.
147 Having obtained a trace-log a kernel hacker can read and understand
148 source code more determined and with context.
149 In a detailed example this approach is demonstrated in tracing
150 and the way of data in a TCP Connection through the kernel.
151 Finally this trace-log is used as base for more a exact conceptual
152 exploration and description of the Linux TCP/IP implementation.*
154 * Title: **The Devil's in the Details**
156 :Author: Georg v. Zezschwitz and Alessandro Rubini.
157 :URL: http://www.linuxjournal.com/article.php?sid=1221
158 :Keywords: read(), write(), select(), ioctl(), blocking/non
159 blocking mode, interrupt handler.
160 :Description: Linux Journal Kernel Korner article. Here is its
161 :Abstract: *This article, the third of four on writing character
162 device drivers, introduces concepts of reading, writing, and using
165 * Title: **Dissecting Interrupts and Browsing DMA**
167 :Author: Alessandro Rubini and Georg v. Zezschwitz.
168 :URL: http://www.linuxjournal.com/article.php?sid=1222
169 :Keywords: interrupts, irqs, DMA, bottom halves, task queues.
170 :Description: Linux Journal Kernel Korner article. Here is its
171 :Abstract: *This is the fourth in a series of articles about
172 writing character device drivers as loadable kernel modules. This
173 month, we further investigate the field of interrupt handling.
174 Though it is conceptually simple, practical limitations and
175 constraints make this an ''interesting'' part of device driver
176 writing, and several different facilities have been provided for
177 different situations. We also investigate the complex topic of
180 * Title: **Device Drivers Concluded**
182 :Author: Georg v. Zezschwitz.
183 :URL: http://www.linuxjournal.com/article.php?sid=1287
184 :Keywords: address spaces, pages, pagination, page management,
185 demand loading, swapping, memory protection, memory mapping, mmap,
186 virtual memory areas (VMAs), vremap, PCI.
187 :Description: Finally, the above turned out into a five articles
188 series. This latest one's introduction reads: "This is the last of
189 five articles about character device drivers. In this final
190 section, Georg deals with memory mapping devices, beginning with
191 an overall description of the Linux memory management concepts".
193 * Title: **Network Buffers And Memory Management**
196 :URL: http://www.linuxjournal.com/article.php?sid=1312
197 :Keywords: sk_buffs, network devices, protocol/link layer
198 variables, network devices flags, transmit, receive,
199 configuration, multicast.
200 :Description: Linux Journal Kernel Korner.
201 :Abstract: *Writing a network device driver for Linux is fundamentally
202 simple---most of the complexity (other than talking to the
203 hardware) involves managing network packets in memory*.
205 * Title: **Linux Kernel Hackers' Guide**
207 :Author: Michael K. Johnson.
208 :URL: http://www.tldp.org/LDP/khg/HyperNews/get/khg.html
209 :Keywords: device drivers, files, VFS, kernel interface, character vs
210 block devices, hardware interrupts, scsi, DMA, access to user memory,
211 memory allocation, timers.
212 :Description: A guide designed to help you get up to speed on the
213 concepts that are not intuitevly obvious, and to document the internal
216 * Title: **The Venus kernel interface**
218 :Author: Peter J. Braam.
219 :URL: http://www.coda.cs.cmu.edu/doc/html/kernel-venus-protocol.html
220 :Keywords: coda, filesystem, venus, cache manager.
221 :Description: "This document describes the communication between
222 Venus and kernel level file system code needed for the operation
223 of the Coda filesystem. This version document is meant to describe
224 the current interface (version 1.0) as well as improvements we
227 * Title: **Design and Implementation of the Second Extended Filesystem**
229 :Author: Rémy Card, Theodore Ts'o, Stephen Tweedie.
230 :URL: http://web.mit.edu/tytso/www/linux/ext2intro.html
231 :Keywords: ext2, linux fs history, inode, directory, link, devices,
232 VFS, physical structure, performance, benchmarks, ext2fs library,
233 ext2fs tools, e2fsck.
234 :Description: Paper written by three of the top ext2 hackers.
235 Covers Linux filesystems history, ext2 motivation, ext2 features,
236 design, physical structure on disk, performance, benchmarks,
237 e2fsck's passes description... A must read!
238 :Notes: This paper was first published in the Proceedings of the
239 First Dutch International Symposium on Linux, ISBN 90-367-0385-9.
241 * Title: **Analysis of the Ext2fs structure**
243 :Author: Louis-Dominique Dubeau.
244 :URL: http://teaching.csse.uwa.edu.au/units/CITS2002/fs-ext2/
245 :Keywords: ext2, filesystem, ext2fs.
246 :Description: Description of ext2's blocks, directories, inodes,
247 bitmaps, invariants...
249 * Title: **Linux Kernel Module Programming Guide**
251 :Author: Ori Pomerantz.
252 :URL: http://tldp.org/LDP/lkmpg/2.6/html/index.html
253 :Keywords: modules, GPL book, /proc, ioctls, system calls,
255 :Description: Very nice 92 pages GPL book on the topic of modules
256 programming. Lots of examples.
258 * Title: **I/O Event Handling Under Linux**
260 :Author: Richard Gooch.
261 :Keywords: IO, I/O, select(2), poll(2), FDs, aio_read(2), readiness
263 :Description: From the Introduction: "I/O Event handling is about
264 how your Operating System allows you to manage a large number of
265 open files (file descriptors in UNIX/POSIX, or FDs) in your
266 application. You want the OS to notify you when FDs become active
267 (have data ready to be read or are ready for writing). Ideally you
268 want a mechanism that is scalable. This means a large number of
269 inactive FDs cost very little in memory and CPU time to manage".
271 * Title: **The Kernel Hacking HOWTO**
273 :Author: Various Talented People, and Rusty.
274 :Location: in kernel tree, Documentation/DocBook/kernel-hacking.tmpl
275 (must be built as "make {htmldocs | psdocs | pdfdocs})
276 :Keywords: HOWTO, kernel contexts, deadlock, locking, modules,
277 symbols, return conventions.
278 :Description: From the Introduction: "Please understand that I
279 never wanted to write this document, being grossly underqualified,
280 but I always wanted to read it, and this was the only way. I
281 simply explain some best practices, and give reading entry-points
282 into the kernel sources. I avoid implementation details: that's
283 what the code is for, and I ignore whole tracts of useful
284 routines. This document assumes familiarity with C, and an
285 understanding of what the kernel is, and how it is used. It was
286 originally written for the 2.3 kernels, but nearly all of it
287 applies to 2.2 too; 2.0 is slightly different".
289 * Title: **Writing an ALSA Driver**
291 :Author: Takashi Iwai <tiwai@suse.de>
292 :URL: http://www.alsa-project.org/~iwai/writing-an-alsa-driver/index.html
293 :Keywords: ALSA, sound, soundcard, driver, lowlevel, hardware.
294 :Description: Advanced Linux Sound Architecture for developers,
295 both at kernel and user-level sides. ALSA is the Linux kernel
296 sound architecture in the 2.6 kernel version.
298 * Title: **Linux Kernel Mailing List Glossary**
301 :URL: http://kernelnewbies.org/glossary/
302 :Keywords: glossary, terms, linux-kernel.
303 :Description: From the introduction: "This glossary is intended as
304 a brief description of some of the acronyms and terms you may hear
305 during discussion of the Linux kernel".
307 * Title: **Linux Kernel Locking HOWTO**
309 :Author: Various Talented People, and Rusty.
310 :Location: in kernel tree, Documentation/DocBook/kernel-locking.tmpl
311 (must be built as "make {htmldocs | psdocs | pdfdocs})
312 :Keywords: locks, locking, spinlock, semaphore, atomic, race
313 condition, bottom halves, tasklets, softirqs.
314 :Description: The title says it all: document describing the
315 locking system in the Linux Kernel either in uniprocessor or SMP
317 :Notes: "It was originally written for the later (>2.3.47) 2.3
318 kernels, but most of it applies to 2.2 too; 2.0 is slightly
319 different". Freely redistributable under the conditions of the GNU
320 General Public License.
322 * Title: **Global spinlock list and usage**
324 :Author: Rick Lindsley.
325 :URL: http://lse.sourceforge.net/lockhier/global-spin-lock
327 :Description: This is an attempt to document both the existence and
328 usage of the spinlocks in the Linux 2.4.5 kernel. Comprehensive
329 list of spinlocks showing when they are used, which functions
330 access them, how each lock is acquired, under what conditions it
331 is held, whether interrupts can occur or not while it is held...
333 * Title: **How To Make Sure Your Driver Will Work On The Power Macintosh**
335 :Author: Paul Mackerras.
336 :URL: http://www.linux-mag.com/id/261
337 :Keywords: Mac, Power Macintosh, porting, drivers, compatibility.
338 :Description: The title says it all.
340 * Title: **An Introduction to SCSI Drivers**
343 :URL: http://www.linux-mag.com/id/284
344 :Keywords: SCSI, device, driver.
345 :Description: The title says it all.
347 * Title: **Advanced SCSI Drivers And Other Tales**
350 :URL: http://www.linux-mag.com/id/307
351 :Keywords: SCSI, device, driver, advanced.
352 :Description: The title says it all.
354 * Title: **Writing Linux Mouse Drivers**
357 :URL: http://www.linux-mag.com/id/330
358 :Keywords: mouse, driver, gpm.
359 :Description: The title says it all.
361 * Title: **More on Mouse Drivers**
364 :URL: http://www.linux-mag.com/id/356
365 :Keywords: mouse, driver, gpm, races, asynchronous I/O.
366 :Description: The title still says it all.
368 * Title: **Writing Video4linux Radio Driver**
371 :URL: http://www.linux-mag.com/id/381
372 :Keywords: video4linux, driver, radio, radio devices.
373 :Description: The title says it all.
375 * Title: **Video4linux Drivers, Part 1: Video-Capture Device**
378 :URL: http://www.linux-mag.com/id/406
379 :Keywords: video4linux, driver, video capture, capture devices,
381 :Description: The title says it all.
383 * Title: **Video4linux Drivers, Part 2: Video-capture Devices**
386 :URL: http://www.linux-mag.com/id/429
387 :Keywords: video4linux, driver, video capture, capture devices,
388 camera driver, control, query capabilities, capability, facility.
389 :Description: The title says it all.
391 * Title: **Linux IP Networking. A Guide to the Implementation and Modification of the Linux Protocol Stack.**
393 :Author: Glenn Herrin.
394 :URL: http://www.cs.unh.edu/cnrg/gherrin
395 :Keywords: network, networking, protocol, IP, UDP, TCP, connection,
396 socket, receiving, transmitting, forwarding, routing, packets,
397 modules, /proc, sk_buff, FIB, tags.
398 :Description: Excellent paper devoted to the Linux IP Networking,
399 explaining anything from the kernel's to the user space
400 configuration tools' code. Very good to get a general overview of
401 the kernel networking implementation and understand all steps
402 packets follow from the time they are received at the network
403 device till they are delivered to applications. The studied kernel
404 code is from 2.2.14 version. Provides code for a working packet
407 * Title: **Linux PCMCIA Programmer's Guide**
409 :Author: David Hinds.
410 :URL: http://pcmcia-cs.sourceforge.net/ftp/doc/PCMCIA-PROG.html
412 :Description: "This document describes how to write kernel device
413 drivers for the Linux PCMCIA Card Services interface. It also
414 describes how to write user-mode utilities for communicating with
417 * Title: **A Linux vm README**
419 :Author: Kanoj Sarcar.
420 :URL: http://kos.enix.org/pub/linux-vmm.html
421 :Keywords: virtual memory, mm, pgd, vma, page, page flags, page
422 cache, swap cache, kswapd.
423 :Description: Telegraphic, short descriptions and definitions
424 relating the Linux virtual memory implementation.
426 * Title: **(nearly) Complete Linux Loadable Kernel Modules. The definitive guide for hackers, virus coders and system administrators.**
428 :Author: pragmatic/THC.
429 :URL: http://packetstormsecurity.org/docs/hack/LKM_HACKING.html
430 :Keywords: syscalls, intercept, hide, abuse, symbol table.
431 :Description: Interesting paper on how to abuse the Linux kernel in
432 order to intercept and modify syscalls, make
433 files/directories/processes invisible, become root, hijack ttys,
434 write kernel modules based virus... and solutions for admins to
435 avoid all those abuses.
436 :Notes: For 2.0.x kernels. Gives guidances to port it to 2.2.x
439 .. Please keep the published books in reverse publication date
444 * Title: **Linux Treiber entwickeln**
446 :Author: Jürgen Quade, Eva-Katharina Kunst
447 :Publisher: dpunkt.verlag
448 :Date: Oct 2015 (4th edition)
450 :ISBN: 978-3-86490-288-8
451 :Note: German. The third edition from 2011 is
452 much cheaper and still quite up-to-date.
454 * Title: **Linux Kernel Networking: Implementation and Theory**
458 :Date: December 22, 2013
460 :ISBN: 978-1430261964
462 * Title: **Embedded Linux Primer: A practical Real-World Approach, 2nd Edition**
464 :Author: Christopher Hallinan
466 :Date: November, 2010
468 :ISBN: 978-0137017836
470 * Title: **Linux Kernel Development, 3rd Edition**
473 :Publisher: Addison-Wesley
476 :ISBN: 978-0672329463
478 * Title: **Essential Linux Device Drivers**
480 :Author: Sreekrishnan Venkateswaran
481 :Published: Prentice Hall
484 :ISBN: 978-0132396554
488 * Title: **Linux Device Drivers, 3rd Edition**
490 :Authors: Jonathan Corbet, Alessandro Rubini, and Greg Kroah-Hartman
491 :Publisher: O'Reilly & Associates
495 :Notes: Further information in
496 http://www.oreilly.com/catalog/linuxdrive3/
497 PDF format, URL: http://lwn.net/Kernel/LDD3/
499 * Title: **Linux Kernel Internals**
501 :Author: Michael Beck
502 :Publisher: Addison-Wesley
504 :ISBN: 0-201-33143-8 (second edition)
506 * Title: **Programmation Linux 2.0 API systeme et fonctionnement du noyau**
508 :Author: Remy Card, Eric Dumas, Franck Mevel
515 * Title: **The Design and Implementation of the 4.4 BSD UNIX Operating System**
517 :Author: Marshall Kirk McKusick, Keith Bostic, Michael J. Karels,
519 :Publisher: Addison-Wesley
523 * Title: **Unix internals -- the new frontiers**
525 :Author: Uresh Vahalia
526 :Publisher: Prentice Hall
531 * Title: **Programming for the real world - POSIX.4**
533 :Author: Bill O. Gallmeister
534 :Publisher: O'Reilly & Associates, Inc
538 :Notes: Though not being directly about Linux, Linux aims to be
539 POSIX. Good reference.
541 * Title: **UNIX Systems for Modern Architectures: Symmetric Multiprocessing and Caching for Kernel Programmers**
543 :Author: Curt Schimmel
544 :Publisher: Addison Wesley
549 * Title: **The Design and Implementation of the 4.3 BSD UNIX Operating System**
551 :Author: Samuel J. Leffler, Marshall Kirk McKusick, Michael J
552 Karels, John S. Quarterman
553 :Publisher: Addison-Wesley
554 :Date: 1989 (reprinted with corrections on October, 1990)
557 * Title: **The Design of the UNIX Operating System**
559 :Author: Maurice J. Bach
560 :Publisher: Prentice Hall
568 * Name: **linux/Documentation**
571 :URL: Just look inside your kernel sources.
572 :Keywords: anything, DocBook.
573 :Description: Documentation that comes with the kernel sources,
574 inside the Documentation directory. Some pages from this document
575 (including this document itself) have been moved there, and might
576 be more up to date than the web version.
578 * Name: **Linux Kernel Source Reference**
580 :Author: Thomas Graichen.
581 :URL: http://marc.info/?l=linux-kernel&m=96446640102205&w=4
582 :Keywords: CVS, web, cvsweb, browsing source code.
583 :Description: Web interface to a CVS server with the kernel
584 sources. "Here you can have a look at any file of the Linux kernel
585 sources of any version starting from 1.0 up to the (daily updated)
586 current version available. Also you can check the differences
587 between two versions of a file".
589 * Name: **Cross-Referencing Linux**
591 :URL: http://lxr.free-electrons.com/
592 :Keywords: Browsing source code.
593 :Description: Another web-based Linux kernel source code browser.
594 Lots of cross references to variables and functions. You can see
595 where they are defined and where they are used.
597 * Name: **Linux Weekly News**
600 :Keywords: latest kernel news.
601 :Description: The title says it all. There's a fixed kernel section
602 summarizing developers' work, bug fixes, new features and versions
603 produced during the week. Published every Thursday.
605 * Name: **Linux Virtual File System**
607 :Author: Peter J. Braam.
608 :URL: http://www.coda.cs.cmu.edu/doc/talks/linuxvfs/
609 :Keywords: slides, VFS, inode, superblock, dentry, dcache.
610 :Description: Set of slides, presumably from a presentation on the
611 Linux VFS layer. Covers version 2.1.x, with dentries and the
614 * Name: **The home page of Linux-MM**
616 :Author: The Linux-MM team.
617 :URL: http://linux-mm.org/
618 :Keywords: memory management, Linux-MM, mm patches, TODO, docs,
620 :Description: Site devoted to Linux Memory Management development.
621 Memory related patches, HOWTOs, links, mm developers... Don't miss
622 it if you are interested in memory management development!
624 * Name: **Kernel Newbies IRC Channel and Website**
626 :URL: http://www.kernelnewbies.org
627 :Keywords: IRC, newbies, channel, asking doubts.
628 :Description: #kernelnewbies on irc.oftc.net.
629 #kernelnewbies is an IRC network dedicated to the 'newbie'
630 kernel hacker. The audience mostly consists of people who are
631 learning about the kernel, working on kernel projects or
632 professional kernel hackers that want to help less seasoned kernel
634 #kernelnewbies is on the OFTC IRC Network.
635 Try irc.oftc.net as your server and then /join #kernelnewbies.
636 The kernelnewbies website also hosts articles, documents, FAQs...
638 * Name: **linux-kernel mailing list archives and search engines**
640 :URL: http://vger.kernel.org/vger-lists.html
641 :URL: http://www.uwsg.indiana.edu/hypermail/linux/kernel/index.html
642 :URL: http://groups.google.com/group/mlist.linux.kernel
643 :Keywords: linux-kernel, archives, search.
644 :Description: Some of the linux-kernel mailing list archivers. If
645 you have a better/another one, please let me know.
649 Document last updated on Mon 2016-Sep-19
651 This document is based on:
652 http://www.dit.upm.es/~jmseyas/linux/kernel/hackers-docs.html