Research map / Large language models / Agents, code and math
MigGPT: Harnessing Large Language Models for Automated Migration of Out-of-Tree Linux Kernel Patches Across Versions
Read the paperCheck your idea against 108,967 papers
AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Proposes MigGPT, a two-step LLM framework using a Code Fingerprint structure and three augmentation modules to migrate out-of-tree Linux kernel patches across kernel versions, evaluated on a new 135-example benchmark.
Problem
Automating migration of out-of-tree Linux kernel patches to new kernel versions, where vanilla LLMs struggle with incomplete code context and inaccurate migration point identification.
Approach
A lightweight Code Fingerprint (CFP) sequential structure records per-line statement types, scopes, and function calls; it feeds structure prompts (function signatures), alignment prompts (first/last anchor lines), associated-function retrieval, and location prompts (migration points from old vs. patched old diff) to LLMs in a two-step retrieve-then-migrate pipeline.
Key results
- MigGPT achieves 74.07% average human-match migration accuracy across 135 examples, up 45.92% over vanilla LLMs (average query count 2.26).
- With GPT-4-turbo, MigGPT retrieval human match on Type 1 reaches 96.25% vs 65.00% vanilla.
- MigGPT requires about 2.08% of the average time taken by human experts (0.25-0.27 days vs 10.89-14.15 days).
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| Use MigGPT instead of vanilla LLMs | Evaluated LLMs on out-of-tree kernel migration · Out-of-tree kernel migration, All (135) | Human Match: 28.15% -> 74.07%; +45.92% | Helped |
| Use MigGPT instead of vanilla LLMs | Evaluated LLMs on target code retrieval · Out-of-tree kernel retrieval, All (135) | Semantic Match: 64.02% -> 84.55%; +20.53% | Helped |
| Use MigGPT with DeepSeek-V3 instead of vanilla DeepSeek-V3 | DeepSeek-V3 · CVE patch backporting | Semantic Match accuracy: 87.12% -> 92.59% | Helped |
| Use MigGPT instead of vanilla LLM | GPT-4-turbo and DeepSeek-V3 · Out-of-tree kernel migration | Compilation success rate: 16.30% -> 66.67%; 31.85% -> 79.26% | Helped |
| Split migration into retrieval and migration steps rather than one direct generation step | Vanilla LLMs · Out-of-tree kernel migration, All sample types | Migration accuracy: 3.33% -> 12.22%; +8.89% | Helped |
| Use two-step strategy with CFP instead of one-step strategy with CFP (ablation) | MigGPT · Out-of-tree kernel migration, All (135) | Semantic Match: 42.96% -> 80.00% | Helped |
| Remove or ablate one of the four units: CFP, Retrieval Augmentation, Retrieval Alignment, or Migration Augmentation (ablation) | MigGPT · Out-of-tree kernel migration benchmark | Performance | Hurt |
| Vary the retrieval query limit m; m=3 is reported as suitable (ablation) | MigGPT with GPT-4-turbo · Type 1 and Type 2 migration examples | Performance | Mixed |
Surprising findings
- Two-step decomposition outperforms one-step prompting even when one-step is given the same CFP information (62.96% vs 38.52% best match for one-step+CFP).
- Llama-3.1-8B with MigGPT still underperforms the other models, showing the framework depends on base model capability.
Limitations
- Failure modes include incomplete retrieval for large code snippets (over 150 lines) and difficulty fusing divergent Type 2 changes.
- Benchmark is relatively small (135 migration examples) and drawn from three projects.
- Gains are smaller for weaker base models such as Llama-3.1-8B.
Experimental setup
Datasets: RT-PREEMPT Raspberry Pi Linux HAOC FixMorph CVE patch backporting benchmark
Benchmarks: out-of-tree kernel patch migration benchmark (135 examples) FixMorph CVE backporting benchmark (350 instances) Linux driver migration (24 samples) Python migration (31 samples)
Metrics: best match semantic match (CodeBLEU >= 0.9) human match compilation success rate line edit distance query times time cost
Baselines: GPT-3.5 GPT-4-turbo OpenAI-o1 DeepSeek-V2.5 DeepSeek-V3 DeepSeek-R1 Llama-3.1-8B Llama-3.1-70B-Instruct FixMorph TSBPORT PPatHF
Builds on: FixMorph TSBPORT PPatHF CodeBLEU
Closest papers by meaning
- kGym: A Platform and Dataset to Benchmark Large Language Models on Linux Kernel Crash Resolution (NeurIPS 2024 · similarity 0.88)
- Outrunning LLM Cutoffs: A Live Kernel Crash Resolution Benchmark for All (ICML 2026 · similarity 0.86)
- Co-PatcheR: Collaborative Software Patching with Component-specific Small Reasoning Models (NeurIPS 2025 · similarity 0.84)
- EvoCodeBench: An Evolving Code Generation Benchmark with Domain-Specific Evaluations (NeurIPS 2024 · similarity 0.83)
- Scratchpad Patching: Decoupling Compute from Patch Size in Byte-Level Language Models (NeurIPS 2026 · similarity 0.82)
- LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Code (ICLR 2025 · similarity 0.82)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.
