SPINFER: Inferring Semantic Patches for the Linux Kernel
summary
Spinfer is a tool that infers Coccinelle semantic patches from example edits and outputs human-checkable rules that Coccinelle applies as concrete diffs. It clusters modified statements, abstracts them into patterns, assembles variants using observed control- and data-flow ordering, and maps expressions to meta‑variables. Evaluation on 40 kernel change groups shows it handles real Linux API migrations and complex cross‑function cases, achieving 86% precision and 69% recall on average. Key mechanisms are clustering modified statements and handling control- and data-flow dependencies across examples.
AI-written summary · about
chapters (23)
- 0:00Intro
- 0:31Maintenance of the Linux kernel
- 1:26Example of API migration
- 1:53init_timer migration
- 3:33Automation
- 4:18Related work
- 5:13Transformation challenges taxonomy
- 7:56Need for a new tool
- 8:59A tool suitable for the Linux kernel
- 9:15Transformation rules
- 9:40Coccinelle
- 11:53Our approach: Spinfer
- 12:14Infering semantic patches
- 12:34Extracting modified statements
- 12:50Clustering similar statements
- 13:19Abstracting clusters
- 13:35Assembling abstractions
- 14:14Rule splitting
- 14:51Iterating
- 16:01Obtained semantic patch
- 16:19Evaluation
- 17:08Results on the randomly sampled dataset
- 19:04Conclusion
related talks
21mCoccinelle: Program transformation in the real world
23mPrecise and Accurate Patch Presence Test for Binaries
01h 02mProgram Manipulation of C Code
08mLightning Talk: Coccinelle for C++
24mSymbiotic: finding bugs in C programs
53mTooling Up for SPDX Software Package Data Exchange
24mAnalysing differences in kernel parameters
01h 00mCurrent State of the Industrial-Strength Infer Static Analysis Platform
