Klint: Compile-time Detection of Atomic Context Violations for Kernel Rust Code - Dr Gary Guo
Channel: Linux Plumbers Conference
Date: 2023-11-29

The unique demands of the Linux kernel often blur the lines between safety and correctness: a prime example is the potentially hazardous act of sleeping inside an atomic context. While at first glance it may seem to be merely a correctness concern, in scenarios involving an RCU read lock, it could escalate to a safety violation by leading to use-after-free issues. Addressing these concerns through safe APIs often involves runtime costs or suffer from ergonomic issues, making them less favourable for kernel work. Klint is a specialized tool that is designed to catch such violations at compile time. It aims to use simple and easy-to-understand rules to generate useful and developer-friendly diagnostics.