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