Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
[linux-2.6-microblaze.git] / Documentation / process / kernel-docs.rst
1 .. _kernel_docs:
2
3 Index of Documentation for People Interested in Writing and/or Understanding the Linux Kernel
4 =============================================================================================
5
6           Juan-Mariano de Goyeneche <jmseyas@dit.upm.es>
7
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.
11
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.
16
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.
22
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.
26
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
31 Document.
32
33 Enjoy!
34
35 .. note::
36
37    The documents on each section of this document are ordered by its
38    published date, from the newest to the oldest.
39
40 Docs at the Linux Kernel tree
41 -----------------------------
42
43 The Sphinx books should be built with ``make {htmldocs | pdfdocs | epubdocs}``.
44
45     * Name: **linux/Documentation**
46
47       :Author: Many.
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.
54
55 On-line docs
56 ------------
57
58     * Title: **Linux Kernel Mailing List Glossary**
59
60       :Author: various
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".
67
68     * Title: **Tracing the Way of Data in a TCP Connection through the Linux Kernel**
69
70       :Author: Richard Sailer
71       :URL: https://archive.org/details/linux_kernel_data_flow_short_paper
72       :Date: 2016
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.*
85
86     * Title: **On submitting kernel Patches**
87
88       :Author: Andi Kleen
89       :URL: http://halobates.de/on-submitting-kernel-patches.pdf
90       :Date: 2008
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 likely they get merged.
94       :Abstract:
95         [...]. This paper examines some common problems for
96         submitting larger changes and some strategies to avoid problems.
97
98     * Title: **Linux Device Drivers, Third Edition**
99
100       :Author: Jonathan Corbet, Alessandro Rubini, Greg Kroah-Hartman
101       :URL: https://lwn.net/Kernel/LDD3/
102       :Date: 2005
103       :Description: A 600-page book covering the (2.6.10) driver
104         programming API and kernel hacking in general.  Available under the
105         Creative Commons Attribution-ShareAlike 2.0 license.
106       :note: You can also :ref:`purchase a copy from O'Reilly or elsewhere  <ldd3_published>`.
107
108     * Title: **Writing an ALSA Driver**
109
110       :Author: Takashi Iwai <tiwai@suse.de>
111       :URL: http://www.alsa-project.org/~iwai/writing-an-alsa-driver/index.html
112       :Date: 2005
113       :Keywords: ALSA, sound, soundcard, driver, lowlevel, hardware.
114       :Description: Advanced Linux Sound Architecture for developers,
115         both at kernel and user-level sides. ALSA is the Linux kernel
116         sound architecture in the 2.6 kernel version.
117
118     * Title: **Linux PCMCIA Programmer's Guide**
119
120       :Author: David Hinds.
121       :URL: http://pcmcia-cs.sourceforge.net/ftp/doc/PCMCIA-PROG.html
122       :Date: 2003
123       :Keywords: PCMCIA.
124       :Description: "This document describes how to write kernel device
125         drivers for the Linux PCMCIA Card Services interface. It also
126         describes how to write user-mode utilities for communicating with
127         Card Services.
128
129     * Title: **The Linux Kernel Module Programming Guide**
130
131       :Author: Peter Jay Salzman, Michael Burian, Ori Pomerantz, Bob Mottram,
132         Jim Huang.
133       :URL: https://sysprog21.github.io/lkmpg/
134       :Date: 2021
135       :Keywords: modules, GPL book, /proc, ioctls, system calls,
136         interrupt handlers .
137       :Description: A very nice GPL book on the topic of modules
138         programming. Lots of examples. Currently the new version is being
139         actively maintained at https://github.com/sysprog21/lkmpg.
140
141     * Title: **Global spinlock list and usage**
142
143       :Author: Rick Lindsley.
144       :URL: http://lse.sourceforge.net/lockhier/global-spin-lock
145       :Date: 2001
146       :Keywords: spinlock.
147       :Description: This is an attempt to document both the existence and
148         usage of the spinlocks in the Linux 2.4.5 kernel. Comprehensive
149         list of spinlocks showing when they are used, which functions
150         access them, how each lock is acquired, under what conditions it
151         is held, whether interrupts can occur or not while it is held...
152
153     * Title: **A Linux vm README**
154
155       :Author: Kanoj Sarcar.
156       :URL: http://kos.enix.org/pub/linux-vmm.html
157       :Date: 2001
158       :Keywords: virtual memory, mm, pgd, vma, page, page flags, page
159         cache, swap cache, kswapd.
160       :Description: Telegraphic, short descriptions and definitions
161         relating the Linux virtual memory implementation.
162
163     * Title: **Video4linux Drivers, Part 1: Video-Capture Device**
164
165       :Author: Alan Cox.
166       :URL: http://www.linux-mag.com/id/406
167       :Date: 2000
168       :Keywords: video4linux, driver, video capture, capture devices,
169         camera driver.
170       :Description: The title says it all.
171
172     * Title: **Video4linux Drivers, Part 2: Video-capture Devices**
173
174       :Author: Alan Cox.
175       :URL: http://www.linux-mag.com/id/429
176       :Date: 2000
177       :Keywords: video4linux, driver, video capture, capture devices,
178         camera driver, control, query capabilities, capability, facility.
179       :Description: The title says it all.
180
181     * Title: **Linux IP Networking. A Guide to the Implementation and Modification of the Linux Protocol Stack.**
182
183       :Author: Glenn Herrin.
184       :URL: http://www.cs.unh.edu/cnrg/gherrin
185       :Date: 2000
186       :Keywords: network, networking, protocol, IP, UDP, TCP, connection,
187         socket, receiving, transmitting, forwarding, routing, packets,
188         modules, /proc, sk_buff, FIB, tags.
189       :Description: Excellent paper devoted to the Linux IP Networking,
190         explaining anything from the kernel's to the user space
191         configuration tools' code. Very good to get a general overview of
192         the kernel networking implementation and understand all steps
193         packets follow from the time they are received at the network
194         device till they are delivered to applications. The studied kernel
195         code is from 2.2.14 version. Provides code for a working packet
196         dropper example.
197
198     * Title: **How To Make Sure Your Driver Will Work On The Power Macintosh**
199
200       :Author: Paul Mackerras.
201       :URL: http://www.linux-mag.com/id/261
202       :Date: 1999
203       :Keywords: Mac, Power Macintosh, porting, drivers, compatibility.
204       :Description: The title says it all.
205
206     * Title: **An Introduction to SCSI Drivers**
207
208       :Author: Alan Cox.
209       :URL: http://www.linux-mag.com/id/284
210       :Date: 1999
211       :Keywords: SCSI, device, driver.
212       :Description: The title says it all.
213
214     * Title: **Advanced SCSI Drivers And Other Tales**
215
216       :Author: Alan Cox.
217       :URL: http://www.linux-mag.com/id/307
218       :Date: 1999
219       :Keywords: SCSI, device, driver, advanced.
220       :Description: The title says it all.
221
222     * Title: **Writing Linux Mouse Drivers**
223
224       :Author: Alan Cox.
225       :URL: http://www.linux-mag.com/id/330
226       :Date: 1999
227       :Keywords: mouse, driver, gpm.
228       :Description: The title says it all.
229
230     * Title: **More on Mouse Drivers**
231
232       :Author: Alan Cox.
233       :URL: http://www.linux-mag.com/id/356
234       :Date: 1999
235       :Keywords: mouse, driver, gpm, races, asynchronous I/O.
236       :Description: The title still says it all.
237
238     * Title: **Writing Video4linux Radio Driver**
239
240       :Author: Alan Cox.
241       :URL: http://www.linux-mag.com/id/381
242       :Date: 1999
243       :Keywords: video4linux, driver, radio, radio devices.
244       :Description: The title says it all.
245
246     * Title: **I/O Event Handling Under Linux**
247
248       :Author: Richard Gooch.
249       :URL: https://web.mit.edu/~yandros/doc/io-events.html
250       :Date: 1999
251       :Keywords: IO, I/O, select(2), poll(2), FDs, aio_read(2), readiness
252         event queues.
253       :Description: From the Introduction: "I/O Event handling is about
254         how your Operating System allows you to manage a large number of
255         open files (file descriptors in UNIX/POSIX, or FDs) in your
256         application. You want the OS to notify you when FDs become active
257         (have data ready to be read or are ready for writing). Ideally you
258         want a mechanism that is scalable. This means a large number of
259         inactive FDs cost very little in memory and CPU time to manage".
260
261     * Title: **(nearly) Complete Linux Loadable Kernel Modules. The definitive guide for hackers, virus coders and system administrators.**
262
263       :Author: pragmatic/THC.
264       :URL: http://packetstormsecurity.org/docs/hack/LKM_HACKING.html
265       :Date: 1999
266       :Keywords: syscalls, intercept, hide, abuse, symbol table.
267       :Description: Interesting paper on how to abuse the Linux kernel in
268         order to intercept and modify syscalls, make
269         files/directories/processes invisible, become root, hijack ttys,
270         write kernel modules based virus... and solutions for admins to
271         avoid all those abuses.
272       :Notes: For 2.0.x kernels. Gives guidances to port it to 2.2.x
273         kernels.
274
275     * Name: **Linux Virtual File System**
276
277       :Author: Peter J. Braam.
278       :URL: http://www.coda.cs.cmu.edu/doc/talks/linuxvfs/
279       :Date: 1998
280       :Keywords: slides, VFS, inode, superblock, dentry, dcache.
281       :Description: Set of slides, presumably from a presentation on the
282         Linux VFS layer. Covers version 2.1.x, with dentries and the
283         dcache.
284
285     * Title: **The Venus kernel interface**
286
287       :Author: Peter J. Braam.
288       :URL: http://www.coda.cs.cmu.edu/doc/html/kernel-venus-protocol.html
289       :Date: 1998
290       :Keywords: coda, filesystem, venus, cache manager.
291       :Description: "This document describes the communication between
292         Venus and kernel level file system code needed for the operation
293         of the Coda filesystem. This version document is meant to describe
294         the current interface (version 1.0) as well as improvements we
295         envisage".
296
297     * Title: **Design and Implementation of the Second Extended Filesystem**
298
299       :Author: Rémy Card, Theodore Ts'o, Stephen Tweedie.
300       :URL: https://web.mit.edu/tytso/www/linux/ext2intro.html
301       :Date: 1998
302       :Keywords: ext2, linux fs history, inode, directory, link, devices,
303         VFS, physical structure, performance, benchmarks, ext2fs library,
304         ext2fs tools, e2fsck.
305       :Description: Paper written by three of the top ext2 hackers.
306         Covers Linux filesystems history, ext2 motivation, ext2 features,
307         design, physical structure on disk, performance, benchmarks,
308         e2fsck's passes description... A must read!
309       :Notes: This paper was first published in the Proceedings of the
310         First Dutch International Symposium on Linux, ISBN 90-367-0385-9.
311
312     * Title: **The Linux RAID-1, 4, 5 Code**
313
314       :Author: Ingo Molnar, Gadi Oxman and Miguel de Icaza.
315       :URL: http://www.linuxjournal.com/article.php?sid=2391
316       :Date: 1997
317       :Keywords: RAID, MD driver.
318       :Description: Linux Journal Kernel Korner article.
319       :Abstract: *A description of the implementation of the RAID-1,
320         RAID-4 and RAID-5 personalities of the MD device driver in the
321         Linux kernel, providing users with high performance and reliable,
322         secondary-storage capability using software*.
323
324     * Title: **Linux Kernel Hackers' Guide**
325
326       :Author: Michael K. Johnson.
327       :URL: https://www.tldp.org/LDP/khg/HyperNews/get/khg.html
328       :Date: 1997
329       :Keywords: device drivers, files, VFS, kernel interface, character vs
330         block devices, hardware interrupts, scsi, DMA, access to user memory,
331         memory allocation, timers.
332       :Description: A guide designed to help you get up to speed on the
333         concepts that are not intuitively obvious, and to document the internal
334         structures of Linux.
335
336     * Title: **Dynamic Kernels: Modularized Device Drivers**
337
338       :Author: Alessandro Rubini.
339       :URL: http://www.linuxjournal.com/article.php?sid=1219
340       :Date: 1996
341       :Keywords: device driver, module, loading/unloading modules,
342         allocating resources.
343       :Description: Linux Journal Kernel Korner article.
344       :Abstract: *This is the first of a series of four articles
345         co-authored by Alessandro Rubini and Georg Zezchwitz which present
346         a practical approach to writing Linux device drivers as kernel
347         loadable modules. This installment presents an introduction to the
348         topic, preparing the reader to understand next month's
349         installment*.
350
351     * Title: **Dynamic Kernels: Discovery**
352
353       :Author: Alessandro Rubini.
354       :URL: http://www.linuxjournal.com/article.php?sid=1220
355       :Date: 1996
356       :Keywords: character driver, init_module, clean_up module,
357         autodetection, mayor number, minor number, file operations,
358         open(), close().
359       :Description: Linux Journal Kernel Korner article.
360       :Abstract: *This article, the second of four, introduces part of
361         the actual code to create custom module implementing a character
362         device driver. It describes the code for module initialization and
363         cleanup, as well as the open() and close() system calls*.
364
365     * Title: **The Devil's in the Details**
366
367       :Author: Georg v. Zezschwitz and Alessandro Rubini.
368       :URL: http://www.linuxjournal.com/article.php?sid=1221
369       :Date: 1996
370       :Keywords: read(), write(), select(), ioctl(), blocking/non
371         blocking mode, interrupt handler.
372       :Description: Linux Journal Kernel Korner article.
373       :Abstract: *This article, the third of four on writing character
374         device drivers, introduces concepts of reading, writing, and using
375         ioctl-calls*.
376
377     * Title: **Dissecting Interrupts and Browsing DMA**
378
379       :Author: Alessandro Rubini and Georg v. Zezschwitz.
380       :URL: https://www.linuxjournal.com/article.php?sid=1222
381       :Date: 1996
382       :Keywords: interrupts, irqs, DMA, bottom halves, task queues.
383       :Description: Linux Journal Kernel Korner article.
384       :Abstract: *This is the fourth in a series of articles about
385         writing character device drivers as loadable kernel modules. This
386         month, we further investigate the field of interrupt handling.
387         Though it is conceptually simple, practical limitations and
388         constraints make this an ''interesting'' part of device driver
389         writing, and several different facilities have been provided for
390         different situations. We also investigate the complex topic of
391         DMA*.
392
393     * Title: **Device Drivers Concluded**
394
395       :Author: Georg v. Zezschwitz.
396       :URL: https://www.linuxjournal.com/article.php?sid=1287
397       :Date: 1996
398       :Keywords: address spaces, pages, pagination, page management,
399         demand loading, swapping, memory protection, memory mapping, mmap,
400         virtual memory areas (VMAs), vremap, PCI.
401       :Description: Finally, the above turned out into a five articles
402         series. This latest one's introduction reads: "This is the last of
403         five articles about character device drivers. In this final
404         section, Georg deals with memory mapping devices, beginning with
405         an overall description of the Linux memory management concepts".
406
407     * Title: **Network Buffers And Memory Management**
408
409       :Author: Alan Cox.
410       :URL: https://www.linuxjournal.com/article.php?sid=1312
411       :Date: 1996
412       :Keywords: sk_buffs, network devices, protocol/link layer
413         variables, network devices flags, transmit, receive,
414         configuration, multicast.
415       :Description: Linux Journal Kernel Korner.
416       :Abstract: *Writing a network device driver for Linux is fundamentally
417         simple---most of the complexity (other than talking to the
418         hardware) involves managing network packets in memory*.
419
420     * Title: **Analysis of the Ext2fs structure**
421
422       :Author: Louis-Dominique Dubeau.
423       :URL: https://teaching.csse.uwa.edu.au/units/CITS2002/fs-ext2/
424       :Date: 1994
425       :Keywords: ext2, filesystem, ext2fs.
426       :Description: Description of ext2's blocks, directories, inodes,
427         bitmaps, invariants...
428
429 Published books
430 ---------------
431
432     * Title: **Linux Treiber entwickeln**
433
434       :Author: Jürgen Quade, Eva-Katharina Kunst
435       :Publisher: dpunkt.verlag
436       :Date: Oct 2015 (4th edition)
437       :Pages: 688
438       :ISBN: 978-3-86490-288-8
439       :Note: German. The third edition from 2011 is
440          much cheaper and still quite up-to-date.
441
442     * Title: **Linux Kernel Networking: Implementation and Theory**
443
444       :Author: Rami Rosen
445       :Publisher: Apress
446       :Date: December 22, 2013
447       :Pages: 648
448       :ISBN: 978-1430261964
449
450     * Title: **Embedded Linux Primer: A practical Real-World Approach, 2nd Edition**
451
452       :Author: Christopher Hallinan
453       :Publisher: Pearson
454       :Date: November, 2010
455       :Pages: 656
456       :ISBN: 978-0137017836
457
458     * Title: **Linux Kernel Development, 3rd Edition**
459
460       :Author: Robert Love
461       :Publisher: Addison-Wesley
462       :Date: July, 2010
463       :Pages: 440
464       :ISBN: 978-0672329463
465
466     * Title: **Essential Linux Device Drivers**
467
468       :Author: Sreekrishnan Venkateswaran
469       :Published: Prentice Hall
470       :Date: April, 2008
471       :Pages: 744
472       :ISBN: 978-0132396554
473
474 .. _ldd3_published:
475
476     * Title: **Linux Device Drivers, 3rd Edition**
477
478       :Authors: Jonathan Corbet, Alessandro Rubini, and Greg Kroah-Hartman
479       :Publisher: O'Reilly & Associates
480       :Date: 2005
481       :Pages: 636
482       :ISBN: 0-596-00590-3
483       :Notes: Further information in
484         http://www.oreilly.com/catalog/linuxdrive3/
485         PDF format, URL: https://lwn.net/Kernel/LDD3/
486
487     * Title: **Linux Kernel Internals**
488
489       :Author: Michael Beck
490       :Publisher: Addison-Wesley
491       :Date: 1997
492       :ISBN: 0-201-33143-8 (second edition)
493
494     * Title: **Programmation Linux 2.0 API systeme et fonctionnement du noyau**
495
496       :Author: Remy Card, Eric Dumas, Franck Mevel
497       :Publisher: Eyrolles
498       :Date: 1997
499       :Pages: 520
500       :ISBN: 2-212-08932-5
501       :Notes: French
502
503     * Title: **The Design and Implementation of the 4.4 BSD UNIX Operating System**
504
505       :Author: Marshall Kirk McKusick, Keith Bostic, Michael J. Karels,
506         John S. Quarterman
507       :Publisher: Addison-Wesley
508       :Date: 1996
509       :ISBN: 0-201-54979-4
510
511     * Title: **Unix internals -- the new frontiers**
512
513       :Author: Uresh Vahalia
514       :Publisher: Prentice Hall
515       :Date: 1996
516       :Pages: 600
517       :ISBN: 0-13-101908-2
518
519     * Title: **Programming for the real world - POSIX.4**
520
521       :Author: Bill O. Gallmeister
522       :Publisher: O'Reilly & Associates, Inc
523       :Date: 1995
524       :Pages: 552
525       :ISBN: I-56592-074-0
526       :Notes: Though not being directly about Linux, Linux aims to be
527         POSIX. Good reference.
528
529     * Title:  **UNIX  Systems  for  Modern Architectures: Symmetric Multiprocessing and Caching for Kernel Programmers**
530
531       :Author: Curt Schimmel
532       :Publisher: Addison Wesley
533       :Date: June, 1994
534       :Pages: 432
535       :ISBN: 0-201-63338-8
536
537     * Title: **The Design and Implementation of the 4.3 BSD UNIX Operating System**
538
539       :Author: Samuel J. Leffler, Marshall Kirk McKusick, Michael J
540         Karels, John S. Quarterman
541       :Publisher: Addison-Wesley
542       :Date: 1989 (reprinted with corrections on October, 1990)
543       :ISBN: 0-201-06196-1
544
545     * Title: **The Design of the UNIX Operating System**
546
547       :Author: Maurice J. Bach
548       :Publisher: Prentice Hall
549       :Date: 1986
550       :Pages: 471
551       :ISBN: 0-13-201757-1
552
553 Miscellaneous
554 -------------
555
556     * Name: **Cross-Referencing Linux**
557
558       :URL: https://elixir.bootlin.com/
559       :Keywords: Browsing source code.
560       :Description: Another web-based Linux kernel source code browser.
561         Lots of cross references to variables and functions. You can see
562         where they are defined and where they are used.
563
564     * Name: **Linux Weekly News**
565
566       :URL: https://lwn.net
567       :Keywords: latest kernel news.
568       :Description: The title says it all. There's a fixed kernel section
569         summarizing developers' work, bug fixes, new features and versions
570         produced during the week. Published every Thursday.
571
572     * Name: **The home page of Linux-MM**
573
574       :Author: The Linux-MM team.
575       :URL: https://linux-mm.org/
576       :Keywords: memory management, Linux-MM, mm patches, TODO, docs,
577         mailing list.
578       :Description: Site devoted to Linux Memory Management development.
579         Memory related patches, HOWTOs, links, mm developers... Don't miss
580         it if you are interested in memory management development!
581
582     * Name: **Kernel Newbies IRC Channel and Website**
583
584       :URL: https://www.kernelnewbies.org
585       :Keywords: IRC, newbies, channel, asking doubts.
586       :Description: #kernelnewbies on irc.oftc.net.
587         #kernelnewbies is an IRC network dedicated to the 'newbie'
588         kernel hacker. The audience mostly consists of people who are
589         learning about the kernel, working on kernel projects or
590         professional kernel hackers that want to help less seasoned kernel
591         people.
592         #kernelnewbies is on the OFTC IRC Network.
593         Try irc.oftc.net as your server and then /join #kernelnewbies.
594         The kernelnewbies website also hosts articles, documents, FAQs...
595
596     * Name: **linux-kernel mailing list archives and search engines**
597
598       :URL: http://vger.kernel.org/vger-lists.html
599       :URL: http://www.uwsg.indiana.edu/hypermail/linux/kernel/index.html
600       :URL: http://groups.google.com/group/mlist.linux.kernel
601       :Keywords: linux-kernel, archives, search.
602       :Description: Some of the linux-kernel mailing list archivers. If
603         you have a better/another one, please let me know.
604
605 -------
606
607 Document last updated on Tue 2016-Sep-20
608
609 This document is based on:
610  https://www.dit.upm.es/~jmseyas/linux/kernel/hackers-docs.html