MigGPT: Harnessing Large Language Models for Automated Migration of Out-of-Tree Linux Kernel Patches Across Versions

📅 2025-04-13
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
Manual cross-version migration of out-of-tree Linux kernel patches is labor-intensive and costly. Method: We propose the first LLM-driven automated migration framework for real-world scenarios, featuring (i) a semantics-preserving code fingerprint encoding scheme; (ii) a tri-module collaborative architecture integrating context-aware retrieval, precise migration-point localization, and patch rewriting generation; and (iii) KernelPatchBench—the first real-world benchmark for out-of-tree patch migration. Results: On authentic out-of-tree patches, our framework achieves a 72.59% average migration success rate, outperforming baseline LLMs by 50.74%. It significantly improves robustness and accuracy under incomplete context and complex kernel evolution scenarios, demonstrating substantial practical viability for industrial-scale kernel maintenance.

Technology Category

Application Category

📝 Abstract
Out-of-tree kernel patches are essential for adapting the Linux kernel to new hardware or enabling specific functionalities. Maintaining and updating these patches across different kernel versions demands significant effort from experienced engineers. Large language models (LLMs) have shown remarkable progress across various domains, suggesting their potential for automating out-of-tree kernel patch migration. However, our findings reveal that LLMs, while promising, struggle with incomplete code context understanding and inaccurate migration point identification. In this work, we propose MigGPT, a framework that employs a novel code fingerprint structure to retain code snippet information and incorporates three meticulously designed modules to improve the migration accuracy and efficiency of out-of-tree kernel patches. Furthermore, we establish a robust benchmark using real-world out-of-tree kernel patch projects to evaluate LLM capabilities. Evaluations show that MigGPT significantly outperforms the direct application of vanilla LLMs, achieving an average completion rate of 72.59% (50.74% improvement) for migration tasks.
Problem

Research questions and friction points this paper is trying to address.

Automating migration of out-of-tree Linux kernel patches
Improving LLM accuracy in patch migration tasks
Addressing incomplete code context understanding in LLMs
Innovation

Methods, ideas, or system contributions that make the work stand out.

Uses code fingerprint for snippet retention
Incorporates three modules for accuracy
Establishes benchmark for LLM evaluation
🔎 Similar Papers
No similar papers found.
Pucheng Dang
Pucheng Dang
University of Chinese Academy of Sciences
Privacy ProtectionDNN security
D
Di Huang
State Key Lab of Processors, Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China
D
Dong Li
State Key Lab of Processors, Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China
K
Kang Chen
Tsinghua University
Yuanbo Wen
Yuanbo Wen
Institute of Computing Technology, Chinese Academy of Sciences
Machine Learning System
Q
Qi Guo
State Key Lab of Processors, Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China
X
Xing Hu
Shanghai Innovation Center for Processor Technologies, SHIC
N
Ninghui Sun
State Key Lab of Processors, Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China