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/
90 :Description: A 600-page book covering the (2.6.10) driver
91 programming API and kernel hacking in general. Available under the
92 Creative Commons Attribution-ShareAlike 2.0 license.
93 :note: You can also :ref:`purchase a copy from O'Reilly or elsewhere <ldd3_published>`.
95 * Title: **Overview of the Virtual File System**
97 :Author: Richard Gooch.
98 :URL: http://www.mjmwired.net/kernel/Documentation/filesystems/vfs.txt
100 :Keywords: VFS, File System, mounting filesystems, opening files,
102 :Description: Brief introduction to the Linux Virtual File System.
103 What is it, how it works, operations taken when opening a file or
104 mounting a file system and description of important data
105 structures explaining the purpose of each of their entries.
107 * Title: **The Linux RAID-1, 4, 5 Code**
109 :Author: Ingo Molnar, Gadi Oxman and Miguel de Icaza.
110 :URL: http://www.linuxjournal.com/article.php?sid=2391
112 :Keywords: RAID, MD driver.
113 :Description: Linux Journal Kernel Korner article. Here is its
114 :Abstract: *A description of the implementation of the RAID-1,
115 RAID-4 and RAID-5 personalities of the MD device driver in the
116 Linux kernel, providing users with high performance and reliable,
117 secondary-storage capability using software*.
119 * Title: **Dynamic Kernels: Modularized Device Drivers**
121 :Author: Alessandro Rubini.
122 :URL: http://www.linuxjournal.com/article.php?sid=1219
124 :Keywords: device driver, module, loading/unloading modules,
125 allocating resources.
126 :Description: Linux Journal Kernel Korner article. Here is its
127 :Abstract: *This is the first of a series of four articles
128 co-authored by Alessandro Rubini and Georg Zezchwitz which present
129 a practical approach to writing Linux device drivers as kernel
130 loadable modules. This installment presents an introduction to the
131 topic, preparing the reader to understand next month's
134 * Title: **Dynamic Kernels: Discovery**
136 :Author: Alessandro Rubini.
137 :URL: http://www.linuxjournal.com/article.php?sid=1220
139 :Keywords: character driver, init_module, clean_up module,
140 autodetection, mayor number, minor number, file operations,
142 :Description: Linux Journal Kernel Korner article. Here is its
143 :Abstract: *This article, the second of four, introduces part of
144 the actual code to create custom module implementing a character
145 device driver. It describes the code for module initialization and
146 cleanup, as well as the open() and close() system calls*.
148 * Title: **On submitting kernel Patches**
151 :URL: http://halobates.de/on-submitting-kernel-patches.pdf
153 :Keywords: patches, review process, types of submissions, basic rules, case studies
154 :Description: This paper gives several experience values on what types of patches
155 there are and how likley they get merged.
157 [...]. This paper examines some common problems for
158 submitting larger changes and some strategies to avoid problems.
160 * Title: **Tracing the Way of Data in a TCP Connection through the Linux Kernel**
161 :Author: Richard Sailer
162 :URL: https://archive.org/details/linux_kernel_data_flow_short_paper
164 :Keywords: Linux Kernel Networking, TCP, tracing, ftrace
165 :Description: A seminar paper explaining ftrace and how to use it for
166 understanding linux kernel internals,
167 illustrated at tracing the way of a TCP packet through the kernel.
168 :Abstract: *This short paper outlines the usage of ftrace a tracing framework
169 as a tool to understand a running Linux system.
170 Having obtained a trace-log a kernel hacker can read and understand
171 source code more determined and with context.
172 In a detailed example this approach is demonstrated in tracing
173 and the way of data in a TCP Connection through the kernel.
174 Finally this trace-log is used as base for more a exact conceptual
175 exploration and description of the Linux TCP/IP implementation.*
177 * Title: **The Devil's in the Details**
179 :Author: Georg v. Zezschwitz and Alessandro Rubini.
180 :URL: http://www.linuxjournal.com/article.php?sid=1221
182 :Keywords: read(), write(), select(), ioctl(), blocking/non
183 blocking mode, interrupt handler.
184 :Description: Linux Journal Kernel Korner article. Here is its
185 :Abstract: *This article, the third of four on writing character
186 device drivers, introduces concepts of reading, writing, and using
189 * Title: **Dissecting Interrupts and Browsing DMA**
191 :Author: Alessandro Rubini and Georg v. Zezschwitz.
192 :URL: http://www.linuxjournal.com/article.php?sid=1222
194 :Keywords: interrupts, irqs, DMA, bottom halves, task queues.
195 :Description: Linux Journal Kernel Korner article. Here is its
196 :Abstract: *This is the fourth in a series of articles about
197 writing character device drivers as loadable kernel modules. This
198 month, we further investigate the field of interrupt handling.
199 Though it is conceptually simple, practical limitations and
200 constraints make this an ''interesting'' part of device driver
201 writing, and several different facilities have been provided for
202 different situations. We also investigate the complex topic of
205 * Title: **Device Drivers Concluded**
207 :Author: Georg v. Zezschwitz.
208 :URL: http://www.linuxjournal.com/article.php?sid=1287
210 :Keywords: address spaces, pages, pagination, page management,
211 demand loading, swapping, memory protection, memory mapping, mmap,
212 virtual memory areas (VMAs), vremap, PCI.
213 :Description: Finally, the above turned out into a five articles
214 series. This latest one's introduction reads: "This is the last of
215 five articles about character device drivers. In this final
216 section, Georg deals with memory mapping devices, beginning with
217 an overall description of the Linux memory management concepts".
219 * Title: **Network Buffers And Memory Management**
222 :URL: http://www.linuxjournal.com/article.php?sid=1312
224 :Keywords: sk_buffs, network devices, protocol/link layer
225 variables, network devices flags, transmit, receive,
226 configuration, multicast.
227 :Description: Linux Journal Kernel Korner.
228 :Abstract: *Writing a network device driver for Linux is fundamentally
229 simple---most of the complexity (other than talking to the
230 hardware) involves managing network packets in memory*.
232 * Title: **Linux Kernel Hackers' Guide**
234 :Author: Michael K. Johnson.
235 :URL: http://www.tldp.org/LDP/khg/HyperNews/get/khg.html
237 :Keywords: device drivers, files, VFS, kernel interface, character vs
238 block devices, hardware interrupts, scsi, DMA, access to user memory,
239 memory allocation, timers.
240 :Description: A guide designed to help you get up to speed on the
241 concepts that are not intuitevly obvious, and to document the internal
244 * Title: **The Venus kernel interface**
246 :Author: Peter J. Braam.
247 :URL: http://www.coda.cs.cmu.edu/doc/html/kernel-venus-protocol.html
249 :Keywords: coda, filesystem, venus, cache manager.
250 :Description: "This document describes the communication between
251 Venus and kernel level file system code needed for the operation
252 of the Coda filesystem. This version document is meant to describe
253 the current interface (version 1.0) as well as improvements we
256 * Title: **Design and Implementation of the Second Extended Filesystem**
258 :Author: Rémy Card, Theodore Ts'o, Stephen Tweedie.
259 :URL: http://web.mit.edu/tytso/www/linux/ext2intro.html
261 :Keywords: ext2, linux fs history, inode, directory, link, devices,
262 VFS, physical structure, performance, benchmarks, ext2fs library,
263 ext2fs tools, e2fsck.
264 :Description: Paper written by three of the top ext2 hackers.
265 Covers Linux filesystems history, ext2 motivation, ext2 features,
266 design, physical structure on disk, performance, benchmarks,
267 e2fsck's passes description... A must read!
268 :Notes: This paper was first published in the Proceedings of the
269 First Dutch International Symposium on Linux, ISBN 90-367-0385-9.
271 * Title: **Analysis of the Ext2fs structure**
273 :Author: Louis-Dominique Dubeau.
274 :URL: http://teaching.csse.uwa.edu.au/units/CITS2002/fs-ext2/
276 :Keywords: ext2, filesystem, ext2fs.
277 :Description: Description of ext2's blocks, directories, inodes,
278 bitmaps, invariants...
280 * Title: **Linux Kernel Module Programming Guide**
282 :Author: Ori Pomerantz.
283 :URL: http://tldp.org/LDP/lkmpg/2.6/html/index.html
285 :Keywords: modules, GPL book, /proc, ioctls, system calls,
287 :Description: Very nice 92 pages GPL book on the topic of modules
288 programming. Lots of examples.
290 * Title: **I/O Event Handling Under Linux**
292 :Author: Richard Gooch.
293 :URL: http://web.mit.edu/~yandros/doc/io-events.html
295 :Keywords: IO, I/O, select(2), poll(2), FDs, aio_read(2), readiness
297 :Description: From the Introduction: "I/O Event handling is about
298 how your Operating System allows you to manage a large number of
299 open files (file descriptors in UNIX/POSIX, or FDs) in your
300 application. You want the OS to notify you when FDs become active
301 (have data ready to be read or are ready for writing). Ideally you
302 want a mechanism that is scalable. This means a large number of
303 inactive FDs cost very little in memory and CPU time to manage".
305 * Title: **Writing an ALSA Driver**
307 :Author: Takashi Iwai <tiwai@suse.de>
308 :URL: http://www.alsa-project.org/~iwai/writing-an-alsa-driver/index.html
310 :Keywords: ALSA, sound, soundcard, driver, lowlevel, hardware.
311 :Description: Advanced Linux Sound Architecture for developers,
312 both at kernel and user-level sides. ALSA is the Linux kernel
313 sound architecture in the 2.6 kernel version.
315 * Title: **Linux Kernel Mailing List Glossary**
318 :URL: http://kernelnewbies.org/glossary/
319 :Date: rolling version
320 :Keywords: glossary, terms, linux-kernel.
321 :Description: From the introduction: "This glossary is intended as
322 a brief description of some of the acronyms and terms you may hear
323 during discussion of the Linux kernel".
325 * Title: **Global spinlock list and usage**
327 :Author: Rick Lindsley.
328 :URL: http://lse.sourceforge.net/lockhier/global-spin-lock
331 :Description: This is an attempt to document both the existence and
332 usage of the spinlocks in the Linux 2.4.5 kernel. Comprehensive
333 list of spinlocks showing when they are used, which functions
334 access them, how each lock is acquired, under what conditions it
335 is held, whether interrupts can occur or not while it is held...
337 * Title: **How To Make Sure Your Driver Will Work On The Power Macintosh**
339 :Author: Paul Mackerras.
340 :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
350 :Keywords: SCSI, device, driver.
351 :Description: The title says it all.
353 * Title: **Advanced SCSI Drivers And Other Tales**
356 :URL: http://www.linux-mag.com/id/307
358 :Keywords: SCSI, device, driver, advanced.
359 :Description: The title says it all.
361 * Title: **Writing Linux Mouse Drivers**
364 :URL: http://www.linux-mag.com/id/330
366 :Keywords: mouse, driver, gpm.
367 :Description: The title says it all.
369 * Title: **More on Mouse Drivers**
372 :URL: http://www.linux-mag.com/id/356
374 :Keywords: mouse, driver, gpm, races, asynchronous I/O.
375 :Description: The title still says it all.
377 * Title: **Writing Video4linux Radio Driver**
380 :URL: http://www.linux-mag.com/id/381
382 :Keywords: video4linux, driver, radio, radio devices.
383 :Description: The title says it all.
385 * Title: **Video4linux Drivers, Part 1: Video-Capture Device**
388 :URL: http://www.linux-mag.com/id/406
390 :Keywords: video4linux, driver, video capture, capture devices,
392 :Description: The title says it all.
394 * Title: **Video4linux Drivers, Part 2: Video-capture Devices**
397 :URL: http://www.linux-mag.com/id/429
399 :Keywords: video4linux, driver, video capture, capture devices,
400 camera driver, control, query capabilities, capability, facility.
401 :Description: The title says it all.
403 * Title: **Linux IP Networking. A Guide to the Implementation and Modification of the Linux Protocol Stack.**
405 :Author: Glenn Herrin.
406 :URL: http://www.cs.unh.edu/cnrg/gherrin
408 :Keywords: network, networking, protocol, IP, UDP, TCP, connection,
409 socket, receiving, transmitting, forwarding, routing, packets,
410 modules, /proc, sk_buff, FIB, tags.
411 :Description: Excellent paper devoted to the Linux IP Networking,
412 explaining anything from the kernel's to the user space
413 configuration tools' code. Very good to get a general overview of
414 the kernel networking implementation and understand all steps
415 packets follow from the time they are received at the network
416 device till they are delivered to applications. The studied kernel
417 code is from 2.2.14 version. Provides code for a working packet
420 * Title: **Linux PCMCIA Programmer's Guide**
422 :Author: David Hinds.
423 :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
436 :Keywords: virtual memory, mm, pgd, vma, page, page flags, page
437 cache, swap cache, kswapd.
438 :Description: Telegraphic, short descriptions and definitions
439 relating the Linux virtual memory implementation.
441 * Title: **(nearly) Complete Linux Loadable Kernel Modules. The definitive guide for hackers, virus coders and system administrators.**
443 :Author: pragmatic/THC.
444 :URL: http://packetstormsecurity.org/docs/hack/LKM_HACKING.html
446 :Keywords: syscalls, intercept, hide, abuse, symbol table.
447 :Description: Interesting paper on how to abuse the Linux kernel in
448 order to intercept and modify syscalls, make
449 files/directories/processes invisible, become root, hijack ttys,
450 write kernel modules based virus... and solutions for admins to
451 avoid all those abuses.
452 :Notes: For 2.0.x kernels. Gives guidances to port it to 2.2.x
455 * Name: **Linux Virtual File System**
457 :Author: Peter J. Braam.
458 :URL: http://www.coda.cs.cmu.edu/doc/talks/linuxvfs/
460 :Keywords: slides, VFS, inode, superblock, dentry, dcache.
461 :Description: Set of slides, presumably from a presentation on the
462 Linux VFS layer. Covers version 2.1.x, with dentries and the
465 .. Please keep the published books in reverse publication date
470 * Title: **Linux Treiber entwickeln**
472 :Author: Jürgen Quade, Eva-Katharina Kunst
473 :Publisher: dpunkt.verlag
474 :Date: Oct 2015 (4th edition)
476 :ISBN: 978-3-86490-288-8
477 :Note: German. The third edition from 2011 is
478 much cheaper and still quite up-to-date.
480 * Title: **Linux Kernel Networking: Implementation and Theory**
484 :Date: December 22, 2013
486 :ISBN: 978-1430261964
488 * Title: **Embedded Linux Primer: A practical Real-World Approach, 2nd Edition**
490 :Author: Christopher Hallinan
492 :Date: November, 2010
494 :ISBN: 978-0137017836
496 * Title: **Linux Kernel Development, 3rd Edition**
499 :Publisher: Addison-Wesley
502 :ISBN: 978-0672329463
504 * Title: **Essential Linux Device Drivers**
506 :Author: Sreekrishnan Venkateswaran
507 :Published: Prentice Hall
510 :ISBN: 978-0132396554
514 * Title: **Linux Device Drivers, 3rd Edition**
516 :Authors: Jonathan Corbet, Alessandro Rubini, and Greg Kroah-Hartman
517 :Publisher: O'Reilly & Associates
521 :Notes: Further information in
522 http://www.oreilly.com/catalog/linuxdrive3/
523 PDF format, URL: http://lwn.net/Kernel/LDD3/
525 * Title: **Linux Kernel Internals**
527 :Author: Michael Beck
528 :Publisher: Addison-Wesley
530 :ISBN: 0-201-33143-8 (second edition)
532 * Title: **Programmation Linux 2.0 API systeme et fonctionnement du noyau**
534 :Author: Remy Card, Eric Dumas, Franck Mevel
541 * Title: **The Design and Implementation of the 4.4 BSD UNIX Operating System**
543 :Author: Marshall Kirk McKusick, Keith Bostic, Michael J. Karels,
545 :Publisher: Addison-Wesley
549 * Title: **Unix internals -- the new frontiers**
551 :Author: Uresh Vahalia
552 :Publisher: Prentice Hall
557 * Title: **Programming for the real world - POSIX.4**
559 :Author: Bill O. Gallmeister
560 :Publisher: O'Reilly & Associates, Inc
564 :Notes: Though not being directly about Linux, Linux aims to be
565 POSIX. Good reference.
567 * Title: **UNIX Systems for Modern Architectures: Symmetric Multiprocessing and Caching for Kernel Programmers**
569 :Author: Curt Schimmel
570 :Publisher: Addison Wesley
575 * Title: **The Design and Implementation of the 4.3 BSD UNIX Operating System**
577 :Author: Samuel J. Leffler, Marshall Kirk McKusick, Michael J
578 Karels, John S. Quarterman
579 :Publisher: Addison-Wesley
580 :Date: 1989 (reprinted with corrections on October, 1990)
583 * Title: **The Design of the UNIX Operating System**
585 :Author: Maurice J. Bach
586 :Publisher: Prentice Hall
594 * Name: **Cross-Referencing Linux**
596 :URL: http://lxr.free-electrons.com/
597 :Keywords: Browsing source code.
598 :Description: Another web-based Linux kernel source code browser.
599 Lots of cross references to variables and functions. You can see
600 where they are defined and where they are used.
602 * Name: **Linux Weekly News**
605 :Keywords: latest kernel news.
606 :Description: The title says it all. There's a fixed kernel section
607 summarizing developers' work, bug fixes, new features and versions
608 produced during the week. Published every Thursday.
610 * Name: **The home page of Linux-MM**
612 :Author: The Linux-MM team.
613 :URL: http://linux-mm.org/
614 :Keywords: memory management, Linux-MM, mm patches, TODO, docs,
616 :Description: Site devoted to Linux Memory Management development.
617 Memory related patches, HOWTOs, links, mm developers... Don't miss
618 it if you are interested in memory management development!
620 * Name: **Kernel Newbies IRC Channel and Website**
622 :URL: http://www.kernelnewbies.org
623 :Keywords: IRC, newbies, channel, asking doubts.
624 :Description: #kernelnewbies on irc.oftc.net.
625 #kernelnewbies is an IRC network dedicated to the 'newbie'
626 kernel hacker. The audience mostly consists of people who are
627 learning about the kernel, working on kernel projects or
628 professional kernel hackers that want to help less seasoned kernel
630 #kernelnewbies is on the OFTC IRC Network.
631 Try irc.oftc.net as your server and then /join #kernelnewbies.
632 The kernelnewbies website also hosts articles, documents, FAQs...
634 * Name: **linux-kernel mailing list archives and search engines**
636 :URL: http://vger.kernel.org/vger-lists.html
637 :URL: http://www.uwsg.indiana.edu/hypermail/linux/kernel/index.html
638 :URL: http://groups.google.com/group/mlist.linux.kernel
639 :Keywords: linux-kernel, archives, search.
640 :Description: Some of the linux-kernel mailing list archivers. If
641 you have a better/another one, please let me know.
645 Document last updated on Mon 2016-Sep-19
647 This document is based on:
648 http://www.dit.upm.es/~jmseyas/linux/kernel/hackers-docs.html