Reverse Debugging of Kernel Failures in Deployed Systems
Xinyang Ge, Ben Niu, Weidong Cui
Abstract
Post-mortem diagnosis of kernel failures is crucial for operating system vendors because kernel failures impact the reliability and security of the whole system. However, debugging kernel failures in deployed systems remains a challenge because developers have to speculate the conditions leading to the failure based on limited information such as memory dumps. In this paper, we present Kernel REPT, the first practical reverse debugging solution for kernel failures that is highly efficient, imposes small memory footprint and requires no extra software layer. To meet this goal, Kernel REPT employs efficient hardware tracing to record the kernel’s control flow on each processor, recognizes the control flow of each software thread based on the context switch history, and recovers its data flow by emulating machine instructions and hardware events such as interrupts and exceptions. We design, implement, and deploy Kernel REPT on Microsoft Windows. We show that developers can use Kernel REPT to do interactive reverse debugging and find the root cause of real-world kernel failures. Kernel REPT also enables automatic root-cause analysis for certain kernel failures that were hard to debug even manually. Furthermore, Kernel REPT can proactively identify kernel bugs by checking the reconstructed execution history against a set of predetermined invariants.
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 8bd03d1f-02e8-4ee9-8ca0-4edb996aaf38Cited by top-tier papers13
- Automated Bug Hunting With Data-Driven Symbolic Root Cause AnalysisCarter Yagemann, Simon P. Chung, Brendan Saltaformaggio, Wenke LeeCCS 2021 · 17 citations
- ECMO: Peripheral Transplantation to Rehost Embedded Linux KernelsMuhui Jiang, Lin Ma, Yajin Zhou, Qiang Liu et al.CCS 2021 · 11 citations
- HyperDbg: Reinventing Hardware-Assisted DebuggingMohammad Sina Karvandi, MohammadHosein Gholamrezaei, Saleh Khalaj Monfared, Soroush Meghdadi Zanjani et al.CCS 2022 · 10 citations
- R3: Record-Replay-Retroaction for Database-Backed ApplicationsQian Li, Peter Kraft, Michael J. Cafarella, Çagatay Demiralp et al.VLDB 2023 · 10 citations
- HyperFuzzer: An Efficient Hybrid Fuzzer for Virtual CPUsXinyang Ge, Ben Niu, Robert Brotzman, Yaohui Chen et al.CCS 2021 · 9 citations
Related papers
- KRR: Efficient and Scalable Kernel Record ReplayTianren Zhang, Sishuai Gong, Pedro FonsecaOSDI 2025 · 1 citation
- Postmortem Program Analysis with Hardware-Enhanced Post-Crash ArtifactsJun Xu, Dongliang Mu, Xinyu Xing, Peng Liu et al.USENIX Security 2017 · 55 citations
- Alligator in Vest: A Practical Failure-Diagnosis Framework via Arm Hardware FeaturesYiming Zhang, Yuxin Hu, Haonan Li, Wenxuan Shi et al.ISSTA 2023 · 4 citations
- Raven: a novel kernel debugging tool on RISC-VHongyi Lu, Fengwei ZhangDAC 2022 · 4 citations
- KernelRCA: Facilitating Root Cause Analysis of Memory Corruptions in Linux Kernel with Contextual Causality ChainKangzheng Gu, Yifan Zhang, Yuan Zhang, Min YangUSENIX Security 2026
