Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

Linux Foundation

Writing Linux Kernel Modules in Safe Rust

Linux Foundation via YouTube

Overview

This course aims to teach learners how to write Linux kernel modules in safe Rust, addressing the prevalent issue of memory unsafety in kernel development. The course covers techniques for building binary-compatible kernel modules in Rust, working with existing C code, designing safe bindings over raw kernel APIs, and integrating Rust in upstream kernel development. The course also explores Rust concepts such as memory safety, structs, traits, generics, error handling, concurrency, and architecture support. The intended audience for this course includes kernel developers and downstream users interested in using a safer language than C for kernel development.

Syllabus

Intro
Memory unsafety
49% - Chrome
72% - Firefox
70% - Microsoft
65% - Ubuntu
65% - Android
225 - Syzkaller
UAF Static Analysis
Hardening C
Isolation
What do we want out of our language?
A whirlwind tour of Rust, focusing on safety
Hello world!
Uninitialized variables
Structs
Traits
Generics and polymorphism
Trait objects and runtime polymorphism
Enums with data
Option and Result
Error handling
Panics and unwinding
Dangling references
Mutable references are unique references
Atomics
Safe and unsafe Rust
Compiling
Bindings
Mapping kernel APIs to Safe Rust
Heap allocations just work
What about _user pointers?
Concurrency!
FileOperations must be Sync!
Architecture support
Real world out-of-tree module usage?
Better kbuild integration

Taught by

Linux Foundation

Reviews

Start your review of Writing Linux Kernel Modules in Safe Rust

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.