Rage Against the State Machine: Type-Stated Hardware Peripherals for Increased Driver Correctness
Tyler Potyondy, Anthony Tarbinian, Leon Schuermann, Eric Mugnier, Adin Ackerman, Amit Levy, Pat Pannuto
Abstract
Hardware provides driver authors both a strict specification of the operations a driver is allowed to do, and a highly permissive interface full of operations a driver can do. Authoring drivers that adhere to the provided hardware device protocol is challenged by dynamic definitions of what a driver should do based on the hardware's state. This is further complicated by increasingly capable hardware which may transition between states concurrently and independently from the software driver.
We present Abacus, a framework that statically prevents drivers from violating device protocols. Abacus refines typestates to model hardware-software concurrency and presents a formalization of hardware states into two families: stable and transient states. The Abacus framework provides a domain specific language for developers to encode device protocol invariants in tens of lines of code, and, using the generated Abacus type-states, statically prevents device protocol bugs. We demonstrate the Abacus framework's practicality by integrating it into drivers in two Rust OSes. We find that Abacus imposes minimal to no overhead in code-size and runtime performance, statically detects device protocol violations, and enables the usage of hardware features that would otherwise be prohibitively complex.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext ab23b0ce-319f-4218-af53-e42ac12bd4b8Builds on6
- PrIntFuzz: fuzzing Linux drivers via automated virtual device simulationZheyu Ma, Bodong Zhao, Letu Ren, Zheming Li et al.ISSTA 2022 · 23 citations
- SquirrelFS: using the Rust compiler to check file-system crash consistencyHayley LeBlanc, Nathan Taylor, James Bornholt, Vijay ChidambaramOSDI 2024 · 7 citations
- Efeu: generating efficient, verified, hybrid hardware/software drivers for I2C devicesDaniel Schwyn, Zikai Liu, Timothy RoscoeEuroSys 2025 · 3 citations
- The Doom of Device Drivers: Your Android Device (Most Likely) has N-Day Kernel VulnerabilitiesLukas Maar, Florian Draschbacher, Lorenz Schumm, Ernesto Martínez García et al.USENIX Security 2025
- DevFuzz: Automatic Device Model-Guided Device Driver FuzzingYilun Wu, Tong Zhang, Changhee Jung, Dongyoon LeeS&P 2023
Related papers
- Safe Low-Level Code Without Overhead is PracticalSolal Pirelli, George CandeaICSE 2023
- Checking Data-Race Freedom of GPU Kernels, CompositionallyTiago Cogumbreiro, Julien Lange, Dennis Liew Zhen Rong, Hannah ZicarelliCAV 2021 · 17 citations
- Theseus: an Experiment in Operating System Structure and State ManagementKevin Boos, Namitha Liyanage, Ramla Ijaz, Lin ZhongOSDI 2020 · 67 citations
- Rust yDL: A Program Logic for RustDaniel Drodt, Reiner HähnleFM 2026
- Securing Mixed Rust with Hardware CapabilitiesJason Zhijingcheng Yu, Fangqi Han, Kaustab Choudhury, Trevor E. Carlson et al.CCS 2025 · 1 citation
