Oddbean new post about | logout
 [$] Preventing atomic-context violations in Rust code with klint

One of the core constraints when programming in the kernel is the need to
avoid sleeping when running in atomic context.  For the most part, the
responsibility for adherence to this rule is placed on the developer's
shoulders;  Rust developers, though, want the compiler to ensure that code
is safe whenever possible.  At the <a href="https://lpc.events/" rel="nofollow">2023 Linux
Plumbers Conference</a>, Gary Guo presented (via a remote link) the klint
tool, which can find 
and flag many atomic-context violations before they turn into
user-affecting bugs.

https://lwn.net/Articles/951550/