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
37 The documents on each section of this document are ordered by its
38 published date, from the newest to the oldest.
40 Docs at the Linux Kernel tree
41 -----------------------------
43 The DocBook books should be built with ``make {htmldocs | psdocs | pdfdocs}``.
44 The Sphinx books should be built with ``make {htmldocs | pdfdocs | epubdocs}``.
46 * Name: **linux/Documentation**
49 :Location: Documentation/
50 :Keywords: text files, Sphinx, DocBook.
51 :Description: Documentation that comes with the kernel sources,
52 inside the Documentation directory. Some pages from this document
53 (including this document itself) have been moved there, and might
54 be more up to date than the web version.
56 * Title: **The Kernel Hacking HOWTO**
58 :Author: Various Talented People, and Rusty.
59 :Location: Documentation/DocBook/kernel-hacking.tmpl
60 :Keywords: HOWTO, kernel contexts, deadlock, locking, modules,
61 symbols, return conventions.
62 :Description: From the Introduction: "Please understand that I
63 never wanted to write this document, being grossly underqualified,
64 but I always wanted to read it, and this was the only way. I
65 simply explain some best practices, and give reading entry-points
66 into the kernel sources. I avoid implementation details: that's
67 what the code is for, and I ignore whole tracts of useful
68 routines. This document assumes familiarity with C, and an
69 understanding of what the kernel is, and how it is used. It was
70 originally written for the 2.3 kernels, but nearly all of it
71 applies to 2.2 too; 2.0 is slightly different".
73 * Title: **Linux Kernel Locking HOWTO**
75 :Author: Various Talented People, and Rusty.
76 :Location: Documentation/DocBook/kernel-locking.tmpl
77 :Keywords: locks, locking, spinlock, semaphore, atomic, race
78 condition, bottom halves, tasklets, softirqs.
79 :Description: The title says it all: document describing the
80 locking system in the Linux Kernel either in uniprocessor or SMP
82 :Notes: "It was originally written for the later (>2.3.47) 2.3
83 kernels, but most of it applies to 2.2 too; 2.0 is slightly
84 different". Freely redistributable under the conditions of the GNU
85 General Public License.
90 * Title: **Linux Kernel Mailing List Glossary**
93 :URL: http://kernelnewbies.org/glossary/
94 :Date: rolling version
95 :Keywords: glossary, terms, linux-kernel.
96 :Description: From the introduction: "This glossary is intended as
97 a brief description of some of the acronyms and terms you may hear
98 during discussion of the Linux kernel".
100 * Title: **Tracing the Way of Data in a TCP Connection through the Linux Kernel**
102 :Author: Richard Sailer
103 :URL: https://archive.org/details/linux_kernel_data_flow_short_paper
105 :Keywords: Linux Kernel Networking, TCP, tracing, ftrace
106 :Description: A seminar paper explaining ftrace and how to use it for
107 understanding linux kernel internals,
108 illustrated at tracing the way of a TCP packet through the kernel.
109 :Abstract: *This short paper outlines the usage of ftrace a tracing framework
110 as a tool to understand a running Linux system.
111 Having obtained a trace-log a kernel hacker can read and understand
112 source code more determined and with context.
113 In a detailed example this approach is demonstrated in tracing
114 and the way of data in a TCP Connection through the kernel.
115 Finally this trace-log is used as base for more a exact conceptual
116 exploration and description of the Linux TCP/IP implementation.*
118 * Title: **On submitting kernel Patches**
121 :URL: http://halobates.de/on-submitting-kernel-patches.pdf
123 :Keywords: patches, review process, types of submissions, basic rules, case studies
124 :Description: This paper gives several experience values on what types of patches
125 there are and how likley they get merged.
127 [...]. This paper examines some common problems for
128 submitting larger changes and some strategies to avoid problems.
130 * Title: **Overview of the Virtual File System**
132 :Author: Richard Gooch.
133 :URL: http://www.mjmwired.net/kernel/Documentation/filesystems/vfs.txt
135 :Keywords: VFS, File System, mounting filesystems, opening files,
137 :Description: Brief introduction to the Linux Virtual File System.
138 What is it, how it works, operations taken when opening a file or
139 mounting a file system and description of important data
140 structures explaining the purpose of each of their entries.
142 * Title: **Linux Device Drivers, Third Edition**
144 :Author: Jonathan Corbet, Alessandro Rubini, Greg Kroah-Hartman
145 :URL: http://lwn.net/Kernel/LDD3/
147 :Description: A 600-page book covering the (2.6.10) driver
148 programming API and kernel hacking in general. Available under the
149 Creative Commons Attribution-ShareAlike 2.0 license.
150 :note: You can also :ref:`purchase a copy from O'Reilly or elsewhere <ldd3_published>`.
152 * Title: **Writing an ALSA Driver**
154 :Author: Takashi Iwai <tiwai@suse.de>
155 :URL: http://www.alsa-project.org/~iwai/writing-an-alsa-driver/index.html
157 :Keywords: ALSA, sound, soundcard, driver, lowlevel, hardware.
158 :Description: Advanced Linux Sound Architecture for developers,
159 both at kernel and user-level sides. ALSA is the Linux kernel
160 sound architecture in the 2.6 kernel version.
162 * Title: **Linux PCMCIA Programmer's Guide**
164 :Author: David Hinds.
165 :URL: http://pcmcia-cs.sourceforge.net/ftp/doc/PCMCIA-PROG.html
168 :Description: "This document describes how to write kernel device
169 drivers for the Linux PCMCIA Card Services interface. It also
170 describes how to write user-mode utilities for communicating with
173 * Title: **Linux Kernel Module Programming Guide**
175 :Author: Ori Pomerantz.
176 :URL: http://tldp.org/LDP/lkmpg/2.6/html/index.html
178 :Keywords: modules, GPL book, /proc, ioctls, system calls,
180 :Description: Very nice 92 pages GPL book on the topic of modules
181 programming. Lots of examples.
183 * Title: **Global spinlock list and usage**
185 :Author: Rick Lindsley.
186 :URL: http://lse.sourceforge.net/lockhier/global-spin-lock
189 :Description: This is an attempt to document both the existence and
190 usage of the spinlocks in the Linux 2.4.5 kernel. Comprehensive
191 list of spinlocks showing when they are used, which functions
192 access them, how each lock is acquired, under what conditions it
193 is held, whether interrupts can occur or not while it is held...
195 * Title: **A Linux vm README**
197 :Author: Kanoj Sarcar.
198 :URL: http://kos.enix.org/pub/linux-vmm.html
200 :Keywords: virtual memory, mm, pgd, vma, page, page flags, page
201 cache, swap cache, kswapd.
202 :Description: Telegraphic, short descriptions and definitions
203 relating the Linux virtual memory implementation.
205 * Title: **Video4linux Drivers, Part 1: Video-Capture Device**
208 :URL: http://www.linux-mag.com/id/406
210 :Keywords: video4linux, driver, video capture, capture devices,
212 :Description: The title says it all.
214 * Title: **Video4linux Drivers, Part 2: Video-capture Devices**
217 :URL: http://www.linux-mag.com/id/429
219 :Keywords: video4linux, driver, video capture, capture devices,
220 camera driver, control, query capabilities, capability, facility.
221 :Description: The title says it all.
223 * Title: **Linux IP Networking. A Guide to the Implementation and Modification of the Linux Protocol Stack.**
225 :Author: Glenn Herrin.
226 :URL: http://www.cs.unh.edu/cnrg/gherrin
228 :Keywords: network, networking, protocol, IP, UDP, TCP, connection,
229 socket, receiving, transmitting, forwarding, routing, packets,
230 modules, /proc, sk_buff, FIB, tags.
231 :Description: Excellent paper devoted to the Linux IP Networking,
232 explaining anything from the kernel's to the user space
233 configuration tools' code. Very good to get a general overview of
234 the kernel networking implementation and understand all steps
235 packets follow from the time they are received at the network
236 device till they are delivered to applications. The studied kernel
237 code is from 2.2.14 version. Provides code for a working packet
240 * Title: **How To Make Sure Your Driver Will Work On The Power Macintosh**
242 :Author: Paul Mackerras.
243 :URL: http://www.linux-mag.com/id/261
245 :Keywords: Mac, Power Macintosh, porting, drivers, compatibility.
246 :Description: The title says it all.
248 * Title: **An Introduction to SCSI Drivers**
251 :URL: http://www.linux-mag.com/id/284
253 :Keywords: SCSI, device, driver.
254 :Description: The title says it all.
256 * Title: **Advanced SCSI Drivers And Other Tales**
259 :URL: http://www.linux-mag.com/id/307
261 :Keywords: SCSI, device, driver, advanced.
262 :Description: The title says it all.
264 * Title: **Writing Linux Mouse Drivers**
267 :URL: http://www.linux-mag.com/id/330
269 :Keywords: mouse, driver, gpm.
270 :Description: The title says it all.
272 * Title: **More on Mouse Drivers**
275 :URL: http://www.linux-mag.com/id/356
277 :Keywords: mouse, driver, gpm, races, asynchronous I/O.
278 :Description: The title still says it all.
280 * Title: **Writing Video4linux Radio Driver**
283 :URL: http://www.linux-mag.com/id/381
285 :Keywords: video4linux, driver, radio, radio devices.
286 :Description: The title says it all.
288 * Title: **I/O Event Handling Under Linux**
290 :Author: Richard Gooch.
291 :URL: http://web.mit.edu/~yandros/doc/io-events.html
293 :Keywords: IO, I/O, select(2), poll(2), FDs, aio_read(2), readiness
295 :Description: From the Introduction: "I/O Event handling is about
296 how your Operating System allows you to manage a large number of
297 open files (file descriptors in UNIX/POSIX, or FDs) in your
298 application. You want the OS to notify you when FDs become active
299 (have data ready to be read or are ready for writing). Ideally you
300 want a mechanism that is scalable. This means a large number of
301 inactive FDs cost very little in memory and CPU time to manage".
303 * Title: **(nearly) Complete Linux Loadable Kernel Modules. The definitive guide for hackers, virus coders and system administrators.**
305 :Author: pragmatic/THC.
306 :URL: http://packetstormsecurity.org/docs/hack/LKM_HACKING.html
308 :Keywords: syscalls, intercept, hide, abuse, symbol table.
309 :Description: Interesting paper on how to abuse the Linux kernel in
310 order to intercept and modify syscalls, make
311 files/directories/processes invisible, become root, hijack ttys,
312 write kernel modules based virus... and solutions for admins to
313 avoid all those abuses.
314 :Notes: For 2.0.x kernels. Gives guidances to port it to 2.2.x
317 * Name: **Linux Virtual File System**
319 :Author: Peter J. Braam.
320 :URL: http://www.coda.cs.cmu.edu/doc/talks/linuxvfs/
322 :Keywords: slides, VFS, inode, superblock, dentry, dcache.
323 :Description: Set of slides, presumably from a presentation on the
324 Linux VFS layer. Covers version 2.1.x, with dentries and the
327 * Title: **The Venus kernel interface**
329 :Author: Peter J. Braam.
330 :URL: http://www.coda.cs.cmu.edu/doc/html/kernel-venus-protocol.html
332 :Keywords: coda, filesystem, venus, cache manager.
333 :Description: "This document describes the communication between
334 Venus and kernel level file system code needed for the operation
335 of the Coda filesystem. This version document is meant to describe
336 the current interface (version 1.0) as well as improvements we
339 * Title: **Design and Implementation of the Second Extended Filesystem**
341 :Author: Rémy Card, Theodore Ts'o, Stephen Tweedie.
342 :URL: http://web.mit.edu/tytso/www/linux/ext2intro.html
344 :Keywords: ext2, linux fs history, inode, directory, link, devices,
345 VFS, physical structure, performance, benchmarks, ext2fs library,
346 ext2fs tools, e2fsck.
347 :Description: Paper written by three of the top ext2 hackers.
348 Covers Linux filesystems history, ext2 motivation, ext2 features,
349 design, physical structure on disk, performance, benchmarks,
350 e2fsck's passes description... A must read!
351 :Notes: This paper was first published in the Proceedings of the
352 First Dutch International Symposium on Linux, ISBN 90-367-0385-9.
354 * Title: **The Linux RAID-1, 4, 5 Code**
356 :Author: Ingo Molnar, Gadi Oxman and Miguel de Icaza.
357 :URL: http://www.linuxjournal.com/article.php?sid=2391
359 :Keywords: RAID, MD driver.
360 :Description: Linux Journal Kernel Korner article. Here is its
361 :Abstract: *A description of the implementation of the RAID-1,
362 RAID-4 and RAID-5 personalities of the MD device driver in the
363 Linux kernel, providing users with high performance and reliable,
364 secondary-storage capability using software*.
366 * Title: **Linux Kernel Hackers' Guide**
368 :Author: Michael K. Johnson.
369 :URL: http://www.tldp.org/LDP/khg/HyperNews/get/khg.html
371 :Keywords: device drivers, files, VFS, kernel interface, character vs
372 block devices, hardware interrupts, scsi, DMA, access to user memory,
373 memory allocation, timers.
374 :Description: A guide designed to help you get up to speed on the
375 concepts that are not intuitevly obvious, and to document the internal
378 * Title: **Dynamic Kernels: Modularized Device Drivers**
380 :Author: Alessandro Rubini.
381 :URL: http://www.linuxjournal.com/article.php?sid=1219
383 :Keywords: device driver, module, loading/unloading modules,
384 allocating resources.
385 :Description: Linux Journal Kernel Korner article. Here is its
386 :Abstract: *This is the first of a series of four articles
387 co-authored by Alessandro Rubini and Georg Zezchwitz which present
388 a practical approach to writing Linux device drivers as kernel
389 loadable modules. This installment presents an introduction to the
390 topic, preparing the reader to understand next month's
393 * Title: **Dynamic Kernels: Discovery**
395 :Author: Alessandro Rubini.
396 :URL: http://www.linuxjournal.com/article.php?sid=1220
398 :Keywords: character driver, init_module, clean_up module,
399 autodetection, mayor number, minor number, file operations,
401 :Description: Linux Journal Kernel Korner article. Here is its
402 :Abstract: *This article, the second of four, introduces part of
403 the actual code to create custom module implementing a character
404 device driver. It describes the code for module initialization and
405 cleanup, as well as the open() and close() system calls*.
407 * Title: **The Devil's in the Details**
409 :Author: Georg v. Zezschwitz and Alessandro Rubini.
410 :URL: http://www.linuxjournal.com/article.php?sid=1221
412 :Keywords: read(), write(), select(), ioctl(), blocking/non
413 blocking mode, interrupt handler.
414 :Description: Linux Journal Kernel Korner article. Here is its
415 :Abstract: *This article, the third of four on writing character
416 device drivers, introduces concepts of reading, writing, and using
419 * Title: **Dissecting Interrupts and Browsing DMA**
421 :Author: Alessandro Rubini and Georg v. Zezschwitz.
422 :URL: http://www.linuxjournal.com/article.php?sid=1222
424 :Keywords: interrupts, irqs, DMA, bottom halves, task queues.
425 :Description: Linux Journal Kernel Korner article. Here is its
426 :Abstract: *This is the fourth in a series of articles about
427 writing character device drivers as loadable kernel modules. This
428 month, we further investigate the field of interrupt handling.
429 Though it is conceptually simple, practical limitations and
430 constraints make this an ''interesting'' part of device driver
431 writing, and several different facilities have been provided for
432 different situations. We also investigate the complex topic of
435 * Title: **Device Drivers Concluded**
437 :Author: Georg v. Zezschwitz.
438 :URL: http://www.linuxjournal.com/article.php?sid=1287
440 :Keywords: address spaces, pages, pagination, page management,
441 demand loading, swapping, memory protection, memory mapping, mmap,
442 virtual memory areas (VMAs), vremap, PCI.
443 :Description: Finally, the above turned out into a five articles
444 series. This latest one's introduction reads: "This is the last of
445 five articles about character device drivers. In this final
446 section, Georg deals with memory mapping devices, beginning with
447 an overall description of the Linux memory management concepts".
449 * Title: **Network Buffers And Memory Management**
452 :URL: http://www.linuxjournal.com/article.php?sid=1312
454 :Keywords: sk_buffs, network devices, protocol/link layer
455 variables, network devices flags, transmit, receive,
456 configuration, multicast.
457 :Description: Linux Journal Kernel Korner.
458 :Abstract: *Writing a network device driver for Linux is fundamentally
459 simple---most of the complexity (other than talking to the
460 hardware) involves managing network packets in memory*.
462 * Title: **Analysis of the Ext2fs structure**
464 :Author: Louis-Dominique Dubeau.
465 :URL: http://teaching.csse.uwa.edu.au/units/CITS2002/fs-ext2/
467 :Keywords: ext2, filesystem, ext2fs.
468 :Description: Description of ext2's blocks, directories, inodes,
469 bitmaps, invariants...
474 * Title: **Linux Treiber entwickeln**
476 :Author: Jürgen Quade, Eva-Katharina Kunst
477 :Publisher: dpunkt.verlag
478 :Date: Oct 2015 (4th edition)
480 :ISBN: 978-3-86490-288-8
481 :Note: German. The third edition from 2011 is
482 much cheaper and still quite up-to-date.
484 * Title: **Linux Kernel Networking: Implementation and Theory**
488 :Date: December 22, 2013
490 :ISBN: 978-1430261964
492 * Title: **Embedded Linux Primer: A practical Real-World Approach, 2nd Edition**
494 :Author: Christopher Hallinan
496 :Date: November, 2010
498 :ISBN: 978-0137017836
500 * Title: **Linux Kernel Development, 3rd Edition**
503 :Publisher: Addison-Wesley
506 :ISBN: 978-0672329463
508 * Title: **Essential Linux Device Drivers**
510 :Author: Sreekrishnan Venkateswaran
511 :Published: Prentice Hall
514 :ISBN: 978-0132396554
518 * Title: **Linux Device Drivers, 3rd Edition**
520 :Authors: Jonathan Corbet, Alessandro Rubini, and Greg Kroah-Hartman
521 :Publisher: O'Reilly & Associates
525 :Notes: Further information in
526 http://www.oreilly.com/catalog/linuxdrive3/
527 PDF format, URL: http://lwn.net/Kernel/LDD3/
529 * Title: **Linux Kernel Internals**
531 :Author: Michael Beck
532 :Publisher: Addison-Wesley
534 :ISBN: 0-201-33143-8 (second edition)
536 * Title: **Programmation Linux 2.0 API systeme et fonctionnement du noyau**
538 :Author: Remy Card, Eric Dumas, Franck Mevel
545 * Title: **The Design and Implementation of the 4.4 BSD UNIX Operating System**
547 :Author: Marshall Kirk McKusick, Keith Bostic, Michael J. Karels,
549 :Publisher: Addison-Wesley
553 * Title: **Unix internals -- the new frontiers**
555 :Author: Uresh Vahalia
556 :Publisher: Prentice Hall
561 * Title: **Programming for the real world - POSIX.4**
563 :Author: Bill O. Gallmeister
564 :Publisher: O'Reilly & Associates, Inc
568 :Notes: Though not being directly about Linux, Linux aims to be
569 POSIX. Good reference.
571 * Title: **UNIX Systems for Modern Architectures: Symmetric Multiprocessing and Caching for Kernel Programmers**
573 :Author: Curt Schimmel
574 :Publisher: Addison Wesley
579 * Title: **The Design and Implementation of the 4.3 BSD UNIX Operating System**
581 :Author: Samuel J. Leffler, Marshall Kirk McKusick, Michael J
582 Karels, John S. Quarterman
583 :Publisher: Addison-Wesley
584 :Date: 1989 (reprinted with corrections on October, 1990)
587 * Title: **The Design of the UNIX Operating System**
589 :Author: Maurice J. Bach
590 :Publisher: Prentice Hall
598 * Name: **Cross-Referencing Linux**
600 :URL: http://lxr.free-electrons.com/
601 :Keywords: Browsing source code.
602 :Description: Another web-based Linux kernel source code browser.
603 Lots of cross references to variables and functions. You can see
604 where they are defined and where they are used.
606 * Name: **Linux Weekly News**
609 :Keywords: latest kernel news.
610 :Description: The title says it all. There's a fixed kernel section
611 summarizing developers' work, bug fixes, new features and versions
612 produced during the week. Published every Thursday.
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 Tue 2016-Sep-20
651 This document is based on:
652 http://www.dit.upm.es/~jmseyas/linux/kernel/hackers-docs.html