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 Sphinx books should be built with ``make {htmldocs | pdfdocs | epubdocs}``.
45 * Name: **linux/Documentation**
48 :Location: Documentation/
49 :Keywords: text files, Sphinx.
50 :Description: Documentation that comes with the kernel sources,
51 inside the Documentation directory. Some pages from this document
52 (including this document itself) have been moved there, and might
53 be more up to date than the web version.
58 * Title: **Linux Kernel Mailing List Glossary**
61 :URL: https://kernelnewbies.org/KernelGlossary
62 :Date: rolling version
63 :Keywords: glossary, terms, linux-kernel.
64 :Description: From the introduction: "This glossary is intended as
65 a brief description of some of the acronyms and terms you may hear
66 during discussion of the Linux kernel".
68 * Title: **Tracing the Way of Data in a TCP Connection through the Linux Kernel**
70 :Author: Richard Sailer
71 :URL: https://archive.org/details/linux_kernel_data_flow_short_paper
73 :Keywords: Linux Kernel Networking, TCP, tracing, ftrace
74 :Description: A seminar paper explaining ftrace and how to use it for
75 understanding linux kernel internals,
76 illustrated at tracing the way of a TCP packet through the kernel.
77 :Abstract: *This short paper outlines the usage of ftrace a tracing framework
78 as a tool to understand a running Linux system.
79 Having obtained a trace-log a kernel hacker can read and understand
80 source code more determined and with context.
81 In a detailed example this approach is demonstrated in tracing
82 and the way of data in a TCP Connection through the kernel.
83 Finally this trace-log is used as base for more a exact conceptual
84 exploration and description of the Linux TCP/IP implementation.*
86 * Title: **On submitting kernel Patches**
89 :URL: http://halobates.de/on-submitting-kernel-patches.pdf
91 :Keywords: patches, review process, types of submissions, basic rules, case studies
92 :Description: This paper gives several experience values on what types of patches
93 there are and how likley they get merged.
95 [...]. This paper examines some common problems for
96 submitting larger changes and some strategies to avoid problems.
98 * Title: **Overview of the Virtual File System**
100 :Author: Richard Gooch.
101 :URL: http://www.mjmwired.net/kernel/Documentation/filesystems/vfs.txt
103 :Keywords: VFS, File System, mounting filesystems, opening files,
105 :Description: Brief introduction to the Linux Virtual File System.
106 What is it, how it works, operations taken when opening a file or
107 mounting a file system and description of important data
108 structures explaining the purpose of each of their entries.
110 * Title: **Linux Device Drivers, Third Edition**
112 :Author: Jonathan Corbet, Alessandro Rubini, Greg Kroah-Hartman
113 :URL: http://lwn.net/Kernel/LDD3/
115 :Description: A 600-page book covering the (2.6.10) driver
116 programming API and kernel hacking in general. Available under the
117 Creative Commons Attribution-ShareAlike 2.0 license.
118 :note: You can also :ref:`purchase a copy from O'Reilly or elsewhere <ldd3_published>`.
120 * Title: **Writing an ALSA Driver**
122 :Author: Takashi Iwai <tiwai@suse.de>
123 :URL: http://www.alsa-project.org/~iwai/writing-an-alsa-driver/index.html
125 :Keywords: ALSA, sound, soundcard, driver, lowlevel, hardware.
126 :Description: Advanced Linux Sound Architecture for developers,
127 both at kernel and user-level sides. ALSA is the Linux kernel
128 sound architecture in the 2.6 kernel version.
130 * Title: **Linux PCMCIA Programmer's Guide**
132 :Author: David Hinds.
133 :URL: http://pcmcia-cs.sourceforge.net/ftp/doc/PCMCIA-PROG.html
136 :Description: "This document describes how to write kernel device
137 drivers for the Linux PCMCIA Card Services interface. It also
138 describes how to write user-mode utilities for communicating with
141 * Title: **Linux Kernel Module Programming Guide**
143 :Author: Ori Pomerantz.
144 :URL: http://tldp.org/LDP/lkmpg/2.6/html/index.html
146 :Keywords: modules, GPL book, /proc, ioctls, system calls,
148 :Description: Very nice 92 pages GPL book on the topic of modules
149 programming. Lots of examples.
151 * Title: **Global spinlock list and usage**
153 :Author: Rick Lindsley.
154 :URL: http://lse.sourceforge.net/lockhier/global-spin-lock
157 :Description: This is an attempt to document both the existence and
158 usage of the spinlocks in the Linux 2.4.5 kernel. Comprehensive
159 list of spinlocks showing when they are used, which functions
160 access them, how each lock is acquired, under what conditions it
161 is held, whether interrupts can occur or not while it is held...
163 * Title: **A Linux vm README**
165 :Author: Kanoj Sarcar.
166 :URL: http://kos.enix.org/pub/linux-vmm.html
168 :Keywords: virtual memory, mm, pgd, vma, page, page flags, page
169 cache, swap cache, kswapd.
170 :Description: Telegraphic, short descriptions and definitions
171 relating the Linux virtual memory implementation.
173 * Title: **Video4linux Drivers, Part 1: Video-Capture Device**
176 :URL: http://www.linux-mag.com/id/406
178 :Keywords: video4linux, driver, video capture, capture devices,
180 :Description: The title says it all.
182 * Title: **Video4linux Drivers, Part 2: Video-capture Devices**
185 :URL: http://www.linux-mag.com/id/429
187 :Keywords: video4linux, driver, video capture, capture devices,
188 camera driver, control, query capabilities, capability, facility.
189 :Description: The title says it all.
191 * Title: **Linux IP Networking. A Guide to the Implementation and Modification of the Linux Protocol Stack.**
193 :Author: Glenn Herrin.
194 :URL: http://www.cs.unh.edu/cnrg/gherrin
196 :Keywords: network, networking, protocol, IP, UDP, TCP, connection,
197 socket, receiving, transmitting, forwarding, routing, packets,
198 modules, /proc, sk_buff, FIB, tags.
199 :Description: Excellent paper devoted to the Linux IP Networking,
200 explaining anything from the kernel's to the user space
201 configuration tools' code. Very good to get a general overview of
202 the kernel networking implementation and understand all steps
203 packets follow from the time they are received at the network
204 device till they are delivered to applications. The studied kernel
205 code is from 2.2.14 version. Provides code for a working packet
208 * Title: **How To Make Sure Your Driver Will Work On The Power Macintosh**
210 :Author: Paul Mackerras.
211 :URL: http://www.linux-mag.com/id/261
213 :Keywords: Mac, Power Macintosh, porting, drivers, compatibility.
214 :Description: The title says it all.
216 * Title: **An Introduction to SCSI Drivers**
219 :URL: http://www.linux-mag.com/id/284
221 :Keywords: SCSI, device, driver.
222 :Description: The title says it all.
224 * Title: **Advanced SCSI Drivers And Other Tales**
227 :URL: http://www.linux-mag.com/id/307
229 :Keywords: SCSI, device, driver, advanced.
230 :Description: The title says it all.
232 * Title: **Writing Linux Mouse Drivers**
235 :URL: http://www.linux-mag.com/id/330
237 :Keywords: mouse, driver, gpm.
238 :Description: The title says it all.
240 * Title: **More on Mouse Drivers**
243 :URL: http://www.linux-mag.com/id/356
245 :Keywords: mouse, driver, gpm, races, asynchronous I/O.
246 :Description: The title still says it all.
248 * Title: **Writing Video4linux Radio Driver**
251 :URL: http://www.linux-mag.com/id/381
253 :Keywords: video4linux, driver, radio, radio devices.
254 :Description: The title says it all.
256 * Title: **I/O Event Handling Under Linux**
258 :Author: Richard Gooch.
259 :URL: http://web.mit.edu/~yandros/doc/io-events.html
261 :Keywords: IO, I/O, select(2), poll(2), FDs, aio_read(2), readiness
263 :Description: From the Introduction: "I/O Event handling is about
264 how your Operating System allows you to manage a large number of
265 open files (file descriptors in UNIX/POSIX, or FDs) in your
266 application. You want the OS to notify you when FDs become active
267 (have data ready to be read or are ready for writing). Ideally you
268 want a mechanism that is scalable. This means a large number of
269 inactive FDs cost very little in memory and CPU time to manage".
271 * Title: **(nearly) Complete Linux Loadable Kernel Modules. The definitive guide for hackers, virus coders and system administrators.**
273 :Author: pragmatic/THC.
274 :URL: http://packetstormsecurity.org/docs/hack/LKM_HACKING.html
276 :Keywords: syscalls, intercept, hide, abuse, symbol table.
277 :Description: Interesting paper on how to abuse the Linux kernel in
278 order to intercept and modify syscalls, make
279 files/directories/processes invisible, become root, hijack ttys,
280 write kernel modules based virus... and solutions for admins to
281 avoid all those abuses.
282 :Notes: For 2.0.x kernels. Gives guidances to port it to 2.2.x
285 * Name: **Linux Virtual File System**
287 :Author: Peter J. Braam.
288 :URL: http://www.coda.cs.cmu.edu/doc/talks/linuxvfs/
290 :Keywords: slides, VFS, inode, superblock, dentry, dcache.
291 :Description: Set of slides, presumably from a presentation on the
292 Linux VFS layer. Covers version 2.1.x, with dentries and the
295 * Title: **The Venus kernel interface**
297 :Author: Peter J. Braam.
298 :URL: http://www.coda.cs.cmu.edu/doc/html/kernel-venus-protocol.html
300 :Keywords: coda, filesystem, venus, cache manager.
301 :Description: "This document describes the communication between
302 Venus and kernel level file system code needed for the operation
303 of the Coda filesystem. This version document is meant to describe
304 the current interface (version 1.0) as well as improvements we
307 * Title: **Design and Implementation of the Second Extended Filesystem**
309 :Author: Rémy Card, Theodore Ts'o, Stephen Tweedie.
310 :URL: http://web.mit.edu/tytso/www/linux/ext2intro.html
312 :Keywords: ext2, linux fs history, inode, directory, link, devices,
313 VFS, physical structure, performance, benchmarks, ext2fs library,
314 ext2fs tools, e2fsck.
315 :Description: Paper written by three of the top ext2 hackers.
316 Covers Linux filesystems history, ext2 motivation, ext2 features,
317 design, physical structure on disk, performance, benchmarks,
318 e2fsck's passes description... A must read!
319 :Notes: This paper was first published in the Proceedings of the
320 First Dutch International Symposium on Linux, ISBN 90-367-0385-9.
322 * Title: **The Linux RAID-1, 4, 5 Code**
324 :Author: Ingo Molnar, Gadi Oxman and Miguel de Icaza.
325 :URL: http://www.linuxjournal.com/article.php?sid=2391
327 :Keywords: RAID, MD driver.
328 :Description: Linux Journal Kernel Korner article. Here is its
329 :Abstract: *A description of the implementation of the RAID-1,
330 RAID-4 and RAID-5 personalities of the MD device driver in the
331 Linux kernel, providing users with high performance and reliable,
332 secondary-storage capability using software*.
334 * Title: **Linux Kernel Hackers' Guide**
336 :Author: Michael K. Johnson.
337 :URL: http://www.tldp.org/LDP/khg/HyperNews/get/khg.html
339 :Keywords: device drivers, files, VFS, kernel interface, character vs
340 block devices, hardware interrupts, scsi, DMA, access to user memory,
341 memory allocation, timers.
342 :Description: A guide designed to help you get up to speed on the
343 concepts that are not intuitevly obvious, and to document the internal
346 * Title: **Dynamic Kernels: Modularized Device Drivers**
348 :Author: Alessandro Rubini.
349 :URL: http://www.linuxjournal.com/article.php?sid=1219
351 :Keywords: device driver, module, loading/unloading modules,
352 allocating resources.
353 :Description: Linux Journal Kernel Korner article. Here is its
354 :Abstract: *This is the first of a series of four articles
355 co-authored by Alessandro Rubini and Georg Zezchwitz which present
356 a practical approach to writing Linux device drivers as kernel
357 loadable modules. This installment presents an introduction to the
358 topic, preparing the reader to understand next month's
361 * Title: **Dynamic Kernels: Discovery**
363 :Author: Alessandro Rubini.
364 :URL: http://www.linuxjournal.com/article.php?sid=1220
366 :Keywords: character driver, init_module, clean_up module,
367 autodetection, mayor number, minor number, file operations,
369 :Description: Linux Journal Kernel Korner article. Here is its
370 :Abstract: *This article, the second of four, introduces part of
371 the actual code to create custom module implementing a character
372 device driver. It describes the code for module initialization and
373 cleanup, as well as the open() and close() system calls*.
375 * Title: **The Devil's in the Details**
377 :Author: Georg v. Zezschwitz and Alessandro Rubini.
378 :URL: http://www.linuxjournal.com/article.php?sid=1221
380 :Keywords: read(), write(), select(), ioctl(), blocking/non
381 blocking mode, interrupt handler.
382 :Description: Linux Journal Kernel Korner article. Here is its
383 :Abstract: *This article, the third of four on writing character
384 device drivers, introduces concepts of reading, writing, and using
387 * Title: **Dissecting Interrupts and Browsing DMA**
389 :Author: Alessandro Rubini and Georg v. Zezschwitz.
390 :URL: http://www.linuxjournal.com/article.php?sid=1222
392 :Keywords: interrupts, irqs, DMA, bottom halves, task queues.
393 :Description: Linux Journal Kernel Korner article. Here is its
394 :Abstract: *This is the fourth in a series of articles about
395 writing character device drivers as loadable kernel modules. This
396 month, we further investigate the field of interrupt handling.
397 Though it is conceptually simple, practical limitations and
398 constraints make this an ''interesting'' part of device driver
399 writing, and several different facilities have been provided for
400 different situations. We also investigate the complex topic of
403 * Title: **Device Drivers Concluded**
405 :Author: Georg v. Zezschwitz.
406 :URL: http://www.linuxjournal.com/article.php?sid=1287
408 :Keywords: address spaces, pages, pagination, page management,
409 demand loading, swapping, memory protection, memory mapping, mmap,
410 virtual memory areas (VMAs), vremap, PCI.
411 :Description: Finally, the above turned out into a five articles
412 series. This latest one's introduction reads: "This is the last of
413 five articles about character device drivers. In this final
414 section, Georg deals with memory mapping devices, beginning with
415 an overall description of the Linux memory management concepts".
417 * Title: **Network Buffers And Memory Management**
420 :URL: http://www.linuxjournal.com/article.php?sid=1312
422 :Keywords: sk_buffs, network devices, protocol/link layer
423 variables, network devices flags, transmit, receive,
424 configuration, multicast.
425 :Description: Linux Journal Kernel Korner.
426 :Abstract: *Writing a network device driver for Linux is fundamentally
427 simple---most of the complexity (other than talking to the
428 hardware) involves managing network packets in memory*.
430 * Title: **Analysis of the Ext2fs structure**
432 :Author: Louis-Dominique Dubeau.
433 :URL: http://teaching.csse.uwa.edu.au/units/CITS2002/fs-ext2/
435 :Keywords: ext2, filesystem, ext2fs.
436 :Description: Description of ext2's blocks, directories, inodes,
437 bitmaps, invariants...
442 * Title: **Linux Treiber entwickeln**
444 :Author: Jürgen Quade, Eva-Katharina Kunst
445 :Publisher: dpunkt.verlag
446 :Date: Oct 2015 (4th edition)
448 :ISBN: 978-3-86490-288-8
449 :Note: German. The third edition from 2011 is
450 much cheaper and still quite up-to-date.
452 * Title: **Linux Kernel Networking: Implementation and Theory**
456 :Date: December 22, 2013
458 :ISBN: 978-1430261964
460 * Title: **Embedded Linux Primer: A practical Real-World Approach, 2nd Edition**
462 :Author: Christopher Hallinan
464 :Date: November, 2010
466 :ISBN: 978-0137017836
468 * Title: **Linux Kernel Development, 3rd Edition**
471 :Publisher: Addison-Wesley
474 :ISBN: 978-0672329463
476 * Title: **Essential Linux Device Drivers**
478 :Author: Sreekrishnan Venkateswaran
479 :Published: Prentice Hall
482 :ISBN: 978-0132396554
486 * Title: **Linux Device Drivers, 3rd Edition**
488 :Authors: Jonathan Corbet, Alessandro Rubini, and Greg Kroah-Hartman
489 :Publisher: O'Reilly & Associates
493 :Notes: Further information in
494 http://www.oreilly.com/catalog/linuxdrive3/
495 PDF format, URL: http://lwn.net/Kernel/LDD3/
497 * Title: **Linux Kernel Internals**
499 :Author: Michael Beck
500 :Publisher: Addison-Wesley
502 :ISBN: 0-201-33143-8 (second edition)
504 * Title: **Programmation Linux 2.0 API systeme et fonctionnement du noyau**
506 :Author: Remy Card, Eric Dumas, Franck Mevel
513 * Title: **The Design and Implementation of the 4.4 BSD UNIX Operating System**
515 :Author: Marshall Kirk McKusick, Keith Bostic, Michael J. Karels,
517 :Publisher: Addison-Wesley
521 * Title: **Unix internals -- the new frontiers**
523 :Author: Uresh Vahalia
524 :Publisher: Prentice Hall
529 * Title: **Programming for the real world - POSIX.4**
531 :Author: Bill O. Gallmeister
532 :Publisher: O'Reilly & Associates, Inc
536 :Notes: Though not being directly about Linux, Linux aims to be
537 POSIX. Good reference.
539 * Title: **UNIX Systems for Modern Architectures: Symmetric Multiprocessing and Caching for Kernel Programmers**
541 :Author: Curt Schimmel
542 :Publisher: Addison Wesley
547 * Title: **The Design and Implementation of the 4.3 BSD UNIX Operating System**
549 :Author: Samuel J. Leffler, Marshall Kirk McKusick, Michael J
550 Karels, John S. Quarterman
551 :Publisher: Addison-Wesley
552 :Date: 1989 (reprinted with corrections on October, 1990)
555 * Title: **The Design of the UNIX Operating System**
557 :Author: Maurice J. Bach
558 :Publisher: Prentice Hall
566 * Name: **Cross-Referencing Linux**
568 :URL: http://lxr.free-electrons.com/
569 :Keywords: Browsing source code.
570 :Description: Another web-based Linux kernel source code browser.
571 Lots of cross references to variables and functions. You can see
572 where they are defined and where they are used.
574 * Name: **Linux Weekly News**
577 :Keywords: latest kernel news.
578 :Description: The title says it all. There's a fixed kernel section
579 summarizing developers' work, bug fixes, new features and versions
580 produced during the week. Published every Thursday.
582 * Name: **The home page of Linux-MM**
584 :Author: The Linux-MM team.
585 :URL: http://linux-mm.org/
586 :Keywords: memory management, Linux-MM, mm patches, TODO, docs,
588 :Description: Site devoted to Linux Memory Management development.
589 Memory related patches, HOWTOs, links, mm developers... Don't miss
590 it if you are interested in memory management development!
592 * Name: **Kernel Newbies IRC Channel and Website**
594 :URL: http://www.kernelnewbies.org
595 :Keywords: IRC, newbies, channel, asking doubts.
596 :Description: #kernelnewbies on irc.oftc.net.
597 #kernelnewbies is an IRC network dedicated to the 'newbie'
598 kernel hacker. The audience mostly consists of people who are
599 learning about the kernel, working on kernel projects or
600 professional kernel hackers that want to help less seasoned kernel
602 #kernelnewbies is on the OFTC IRC Network.
603 Try irc.oftc.net as your server and then /join #kernelnewbies.
604 The kernelnewbies website also hosts articles, documents, FAQs...
606 * Name: **linux-kernel mailing list archives and search engines**
608 :URL: http://vger.kernel.org/vger-lists.html
609 :URL: http://www.uwsg.indiana.edu/hypermail/linux/kernel/index.html
610 :URL: http://groups.google.com/group/mlist.linux.kernel
611 :Keywords: linux-kernel, archives, search.
612 :Description: Some of the linux-kernel mailing list archivers. If
613 you have a better/another one, please let me know.
617 Document last updated on Tue 2016-Sep-20
619 This document is based on:
620 http://www.dit.upm.es/~jmseyas/linux/kernel/hackers-docs.html