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

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Dang, Pucheng, Huang, Di, Li, Dong, Chen, Kang, Wen, Yuanbo, Guo, Qi, Hu, Xing
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866909925123293184
author Dang, Pucheng
Huang, Di
Li, Dong
Chen, Kang
Wen, Yuanbo
Guo, Qi
Hu, Xing
author_facet Dang, Pucheng
Huang, Di
Li, Dong
Chen, Kang
Wen, Yuanbo
Guo, Qi
Hu, Xing
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2504_09474
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle MigGPT: Harnessing Large Language Models for Automated Migration of Out-of-Tree Linux Kernel Patches Across Versions
Dang, Pucheng
Huang, Di
Li, Dong
Chen, Kang
Wen, Yuanbo
Guo, Qi
Hu, Xing
Software Engineering
Artificial Intelligence
Operating Systems
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.
title MigGPT: Harnessing Large Language Models for Automated Migration of Out-of-Tree Linux Kernel Patches Across Versions
topic Software Engineering
Artificial Intelligence
Operating Systems
url https://arxiv.org/abs/2504.09474