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