Skip to content
Snippets Groups Projects
Forked from drm / msm
Loading
hacking.rst 30.35 KiB

Unreliable Guide To Hacking The Linux Kernel

Author: Rusty Russell

Introduction

Welcome, gentle reader, to Rusty's Remarkably Unreliable Guide to Linux Kernel Hacking. This document describes the common routines and general requirements for kernel code: its goal is to serve as a primer for Linux kernel development for experienced C programmers. I avoid implementation details: that's what the code is for, and I ignore whole tracts of useful routines.

Before you read this, please understand that I never wanted to write this document, being grossly under-qualified, but I always wanted to read it, and this was the only way. I hope it will grow into a compendium of best practice, common starting points and random information.

The Players

At any time each of the CPUs in a system can be:

  • not associated with any process, serving a hardware interrupt;
  • not associated with any process, serving a softirq or tasklet;
  • running in kernel space, associated with a process (user context);
  • running a process in user space.