# README

* [Linux Kernel](#linux-kernel)
  * [Subsystems selected](#subsystems-selected)
  * [Notes](#notes)
  * [Extras](#extras)
  * [Readings](#readings)

## Linux Kernel

For people who are very new to kernel and kernel development:

* I will **highly recommend** you to first complete [MIT 6.1810: Operating System Engineering](https://pdos.csail.mit.edu/6.828/2023/index.html) Labs and Readings together with a linux kernel book like [Understanding the Linux Kernel 3e: From I/O Ports to Process Management](https://www.amazon.in/Understanding-Linux-Kernel-Daniel-Bovet/dp/0596005652).
* This book goes into much details which is not needed, just sift through the chapters along with `xv6 book` in the MIT course.
* Look into theory and complete the labs.

Once you are done with the course, you will have good background to explore the linux kernel source.

### Subsystems selected

1. Devicetree
2. DRM (GPU)
3. eBPF (Tracing)
4. Bcachefs (Filesystem)

### Notes

* [Debugging](https://lagnos.gitbook.io/linux-kernel-notes/debugging-tracing/debugging)
  * [Step 1 : Getting and understanding the logs](https://lagnos.gitbook.io/linux-kernel-notes/debugging-tracing/debugging#step-1--getting-and-understanding-the-logs)
  * [Step 2 : Debugging with GDB and QEMU/libvirt](https://lagnos.gitbook.io/linux-kernel-notes/debugging-tracing/debugging#step-2--debugging-with-gdb-and-qemulibvirt)
  * [Extras](https://lagnos.gitbook.io/linux-kernel-notes/debugging-tracing/debugging#extras)
* [Finding Bugs](https://lagnos.gitbook.io/linux-kernel-notes/debugging-tracing/finding-bugs)
* [Event tracing](https://lagnos.gitbook.io/linux-kernel-notes/debugging-tracing/tracing)
  * [eBPF tracing](https://lagnos.gitbook.io/linux-kernel-notes/debugging-tracing/ebpf-tracing)(*TODO*)
* Kernel Concepts
  * [Interrupts](https://lagnos.gitbook.io/linux-kernel-notes/concepts/interrupts)
    * [Syscalls](https://lagnos.gitbook.io/linux-kernel-notes/concepts/syscalls/syscalls)
* [Kernel Core APIs](https://lagnos.gitbook.io/linux-kernel-notes/core-apis/core-apis) (*TODO*)
  * Core Utilities
    * [Notification Mechanisms](https://lagnos.gitbook.io/linux-kernel-notes/core-apis/core-utilities/notification-mechanism)
    * [Printk](https://lagnos.gitbook.io/linux-kernel-notes/core-apis/core-utilities/printk)
    * [Symbols and Assembler Notations](https://lagnos.gitbook.io/linux-kernel-notes/core-apis/core-utilities/symbols-assemblers)
    * [Workqueues](https://lagnos.gitbook.io/linux-kernel-notes/core-apis/core-utilities/workqueue)
  * [Kobjects](https://lagnos.gitbook.io/linux-kernel-notes/core-apis/kobjects)
* Kernel Subsystems
  * Devicetree
    * [Devicetree Yamls](https://lagnos.gitbook.io/linux-kernel-notes/subsystems/device-tree/devicetree-yaml)
    * [Testing yaml dtschemas](https://lagnos.gitbook.io/linux-kernel-notes/subsystems/device-tree/testing-schema)
  * Graphics (*TODO*)
* Implementations
  * [Pipes and Splices](https://lagnos.gitbook.io/linux-kernel-notes/implementations/pipes)
* [Kernel Mentorship Program](https://lagnos.gitbook.io/linux-kernel-notes/lkmp/mentorship) (*TODO*)
  * [Prerequisites](https://lagnos.gitbook.io/linux-kernel-notes/lkmp/prerequisites) (*TODO*)
  * Setting up the Kernel (*TODO*)

### Extras

* Kernel Boot Process (*TODO*)
* [Syzkaller Notes](https://lagnos.gitbook.io/linux-kernel-notes/debugging-tracing/syzkaller)
* [eBPF Tracing](https://lagnos.gitbook.io/linux-kernel-notes/debugging-tracing/ebpf-tracing) (*TODO*)
* [RCU in Kernel](https://lagnos.gitbook.io/linux-kernel-notes/extras/rcu) (*TODO*)

### Readings

1. Linux Kernel Development by Robert Love (3rd Edition) [Amazon Link](https://www.amazon.in/Linux-Kernel-Development-Developers-Library/dp/0672329468)
2. Linux Device Drivers 3ed by Johnathan Corbet, Alessandro Rubini, and Greg Kroah-Hartman [Amazon Link](https://www.amazon.in/dp/8173668493/?coliid=I17OESPBYIRQO5\&colid=2OMG77SFUJMQ3\&psc=1\&ref_=list_c_wl_lv_ov_lig_dp_it)
3. Understanding the Linux Kernel 3e: From I/O Ports to Process Management [Amazon Link](https://www.amazon.in/Understanding-Linux-Kernel-Daniel-Bovet/dp/0596005652)
4. Design of the UNIX Operating System by Maurice J. Bach (AT\&T Bell Labs) [Amazon Link](https://www.amazon.in/Design-UNIX-Operating-System-1/dp/9332549575/)

> Other readings are mentioned in the respective notes' README.md


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://lagnos.gitbook.io/linux-kernel-notes/readme.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
