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