KPocBench: Benchmarking and Measuring Code Reasoning of Language Models in Linux Kernel

Ziyi Guo, Kexin Pei, Yan Chen


Abstract
Large Language Model (LLM) agents increasingly act by generating, executing, and revising code, making code reasoning essential for understanding program state, diagnosing failures, and repairing behavior. Existing evaluations often measure end-to-end software engineering outcomes, obscuring which reasoning capabilities limit agents in complex, execution-grounded systems. We study this problem through Proof-of-Concept (PoC) generation, where an agent synthesizes an executable trigger that reproduces a reported crash or sanitizer failure. We instantiate this task in the Linux kernel, whose scale, statefulness, pointer-heavy value flow, memory layout, and concurrency stress long-horizon code reasoning. We decompose kernel PoC generation into four capabilities: state-machine reasoning, dynamic memory layout reasoning, value-flow reasoning, and concurrency reasoning. We build KPocInfra to emit branch-level execution telemetry and curate kPocBench, a benchmark of 181 reproducible Linux kernel KASAN cases from Syzbot. On kPocBench, state-machine and value-flow reasoning explain most failures, while capability-scaffolded evidence improves the best success rate from 50% to 61% and moves 29 unsolved attempts deeper along vulnerable execution paths. These results position kernel PoC generation as a practical stress test for LLM code reasoning in large-scale systems software.
Anthology ID:
2026.emnlp-main.1853
Volume:
Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing
Month:
October
Year:
2026
Address:
Budapest, Hungary
Editors:
Hung-Yi Lee, Sunipa Dev, Jessy Li, Desmond Elliott
Venue:
EMNLP
SIG:
SIGDAT
Publisher:
Association for Computational Linguistics
Note:
Pages:
42131–42145
Language:
URL:
https://aclanthology.org/2026.emnlp-main.1853/
DOI:
Bibkey:
Cite (ACL):
Ziyi Guo, Kexin Pei, and Yan Chen. 2026. KPocBench: Benchmarking and Measuring Code Reasoning of Language Models in Linux Kernel. In Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing, pages 42131–42145, Budapest, Hungary. Association for Computational Linguistics.
Cite (Informal):
KPocBench: Benchmarking and Measuring Code Reasoning of Language Models in Linux Kernel (Guo et al., EMNLP 2026)
Copy Citation:
PDF:
https://aclanthology.org/2026.emnlp-main.1853.pdf