arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2504.09474cs.SEcs.AIcs.OS
收藏

MigGPT:利用大语言模型实现跨版本的Linux内核非官方补丁自动化迁移

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

State Key Lab of Processors, Institute of Computing Technology, CAS(处理器国家重点实验室,计算技术研究所,中国科学院);University of Chinese Academy of Sciences(中国科学院大学);Zhongguancun Laboratory(中关村实验室);Tsinghua University(清华大学)

Pucheng Dang, Di Huang, Dong Li, Kang Chen, Yuanbo Wen, Qi Guo, Xing Hu

AI总结:

MigGPT通过新颖的代码指纹结构和三个精心设计的模块,提高非官方内核补丁迁移的准确性和效率,平均完成率达74.07。

摘要:

非官方内核补丁对于适应新的硬件或启用特定功能至关重要。在不同内核版本之间维护和更新这些补丁需要经验丰富的工程师付出大量努力。大语言模型(LLMs)在各个领域都取得了显著进展,表明其有潜力自动化非官方内核补丁迁移。然而,我们的发现表明,尽管LLMs有潜力,但它们在不完整代码上下文理解和不准确迁移点识别方面存在困难。在本工作中,我们提出了MigGPT,该框架采用新颖的代码指纹结构来保留代码片段信息,并结合三个精心设计的模块来提高非官方内核补丁的迁移准确性和效率。此外,我们建立了一个稳健的基准,利用真实世界的非官方内核补丁项目来评估LLM的能力。评估显示,MigGPT在迁移任务中显著优于直接应用普通LLM,平均完成率为74.07。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑