Making C Less Dangerous
summary
Kernel C changes focus on concrete fixes: removing Variable Length Arrays reduces hundreds of patches to a few remaining and converts hot paths to fixed-size arrays that show 13% speed-up in a driver benchmark; forcing automatic variables to be initialized via GCC/Clang plugins eliminates uninitialized-memory surprises; bounds checks use overloaded builtins and hardened_usercopy which costs ~1% perf hit and string/mem wrappers cost ~2% each; integer-overflow helpers (UBSan/clang unsigned checks) and CFI under Clang plus hardware options like Intel CET and ARM PAC narrow indirect-call and return attacks.
AI-written summary · about
chapters (21)
- 0:00Intro
- 1:04Kernel Self Protection Project
- 1:53C as a fancy assembler almost machine code
- 2:32C as a fancy assembler: undefined behavior
- 4:44Variable Length Arrays are bad
- 6:01Variable Length Arrays are slow
- 6:55Switch case fall-through did I mean it?
- 7:49Switch case fall-through: new statement
- 8:11Switch case fall-through new statement
- 8:29Always-initialized local variables: just do it
- 10:28Always-initialized local variables switch gotcha
- 12:46Arithmetic overflow detection Clang :
- 13:35Bounds checking: explicit checking is slow
- 15:48Bounds checking memory tagging :
- 17:06Control Flow Integrity: indirect calls
- 18:38CFI, forward edges: enforce prototype :
- 19:22CFI, backward edges: two stacks
- 19:57CFI, backward edges: shadow call stack . Clang's Shadow Cal Stack
- 20:25CFI, backward edges: hardware support
- 21:36Where is the Linux kernel now?
- 23:55Challenges in Kernel Security Development
related talks
01h 12mEnhancing Spatial Safety: Better Array-bounds Checking in C (and Linux)
35mUpstream Kernel Hardening: Recent Progress and Challenges
44mWhere are we on security features?
47mChallenges and Innovations Towards Spatial Safety in the Linux Kernel
52mKernel Hardening: Ten Years Deep
58mKeynote: Safety and Security: The Future of C and C++
38mTaking Kernel Hardening to the Next Level
18mExciting new compiler flags for kernel security
