Between Building and Testing Your Linux Driver
Talkat Open Source Summit Europe 2025 · on Monday, 2025-08-25· at 15:35· Elicium 1 (Elicium Level 1)·
summary
Building alone misses bugs like an array element read before its bounds check that compiles clean but yields out‑of‑bounds access; static analyzers catch those mistakes. Workflow: compile with clang (use Warnings and try-clang builds), run smatch for intent/NULL/resource checks, run sparse for locking and address‑space issues, and use Coccinelle for large semantic refactors. clang/smatch/sparse run quickly; Coccinelle can take hours on the whole tree. Always fix root causes and record tool output in commits.
AI-written summary · about
chapters (10)
- 0:00Static analysis in Linux drivers
- 1:05Why building your driver is not enough
- 4:37Clang and GCC for static analysis
- 7:46Sparse for kernel checks
- 13:25Smatch static analyzer
- 17:16Coccinelle for refactoring
- 22:32Work in Linux kernel
- 24:39AI tools in kernel dev
- 27:24Q&A workflows
- 33:14Final thoughts
related talks
22mWriting safe and secure code
01h 12mFinding Bugs with Clang at Compile and Run Time
01h 03mPurging Undefined Behavior & Intel Assumptions in a Legacy C++ Codebase
34mMaking C Less Dangerous
59mHardening Your Code
01h 04mCompiler Bugs And Bug Compilers
50mSecure development with C++ - Lessons and techniques
29mSecuring C code that seems to work just fine
