arXiv:2504.09474cs.SEcs.AI2025-04NeurIPS被引 2

用大模型自动迁移内核补丁,准确率提升至74%。

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

  • 设计代码指纹结构,保留补丁片段信息
  • 通过三个模块提升迁移准确率,达74.07%
  • 基于真实项目构建评测基准,适合内核开发者

外联内核补丁对适配新硬件或实现特定功能至关重要,但跨版本维护需大量人力。尽管大语言模型在多领域表现优异,但在代码上下文理解不全和迁移点识别不准方面仍存不足。本文提出MigGPT框架,采用新型代码指纹结构保留补丁信息,并引入三个精心设计模块,显著提升外联内核补丁的迁移准确率与效率。我们还基于真实项目构建了稳健的评估基准。实验表明,MigGPT显著优于直接使用原始LLMs,迁移任务平均完成率达74.07%。

原文摘要 · Abstract (English)

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 74.07 for migration tasks.

内核补丁大模型自动化代码迁移

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。