Free · Daily brief + weekly playbookDaily 60-sec AI Voice Brief + Weekly Production AI Agent PlaybookGet the brief →
ReleaseInsight · On RadarX: @superalesha→ original

A 74 KB AI Hypervisor Repairs a Crashing Linux Kernel on the Fly: 97.54% Correct Patches Across 122 Crashes

A 74 KB hypervisor runs beneath Linux and catches the kernel at the moment of a panic, such as a write to the null address. A 2-billion-parameter model replaces 11 faulty bytes with NOPs ("do nothing") in 11.1 seconds, and the system keeps running without a reboot. On 122 new crash scenarios, the fine-tuned model produced a correct patch on the first attempt in 97.54% of cases, compared with 16.39% for the base model. This is the author's demo, and it is far from production.

AI-processed from X: @superalesha; edited by Hamidun News
A 74 KB AI Hypervisor Repairs a Crashing Linux Kernel on the Fly: 97.54% Correct Patches Across 122 Crashes
Source: X: @superalesha. Collage: Hamidun News.
Listen to article
Article Fact Sheet & Key Figures
ParameterDetails
Primary sourceX: @superalesha ↗
Editor-in-Chief
Key metric #1Dangerous crashes such as spinlock failures are ones the model refuses to patch: 0 harmful patches
Key metric #2The NASM and C code is open source under MIT, and the binary is 75,424 bytes
Key metric #3Computation runs on 24 AVX2 cores with no host OS or libc

A kernel panic is an emergency halt of the Linux kernel: the server goes down, uptime resets, and services restart. Developer @superalesha demonstrated an experiment in which the crash is intercepted not by the system itself but by a tiny 74 KB hypervisor that runs one level below Linux. At the moment of the crash, it freezes the system, asks a local 2-billion-parameter language model to fix the broken machine code directly in RAM, and then returns control to Linux. On 122 new crash scenarios, the model produced a correct patch on the first attempt in 97.54% of cases, while the base version without fine-tuning managed only 16.39%.

An important caveat: this is a personal project and a proof of concept. The figures come from the author's post, and there is no independent verification yet. But the design is unusual, and engineers will have plenty to discuss.

How the kernel "surgery" works

The Type 1 hypervisor is written for AMD processors with SVM virtualization, in NASM assembly and C without a standard library. It has no host operating system, and the entire binary is 75,424 bytes. Linux boots as a guest, while the hypervisor runs below the kernel, in so-called Ring -1.

For testing, the author wrote a small module, /proc/surgeon_crash, that triggers controlled kernel crashes. The simplest example is a write to the null address: (u32 )0 = 0xDEADBEEF. In ordinary Linux, that line brings the system down instantly. Under the hypervisor, something else happens. It freezes the guest before the kernel can declare a panic, and runs the model on 24 AVX2-enabled cores. In 11.1 seconds, the model identifies the 11 bytes of the instruction that causes the fault. The hypervisor replaces them with 11 NOP instructions (0x90, "do nothing") through nested page tables (NPT) and calls VMRUN, returning the guest to work.

According to the author's description, Linux prints SURVIVED NULL-DEREF!, and the system uptime does not reset. Put simply, the doctor stopped the patient mid-seizure, cut out the affected tissue, and woke the patient up without resuscitation.

Which model was used and how it was tested

Instead of a huge cloud neural network, the setup uses MiniCPM5-2B quantized to Q4_K_M. This compact 2-billion-parameter model fits in ordinary memory and runs on a CPU. It was fine-tuned with GRPO, a reinforcement learning method in which the model is rewarded for correct results.

Testing used 122 new crash scenarios that the model had not seen during training. Among them are dangerous cases, such as crashes involving unsafe spinlocks (kernel locks), where an automatic fix could corrupt system state. In such situations, the model is supposed to refuse to patch. According to the author, the fine-tuned version solved 97.54% of tasks on the first attempt (pass@1) and produced no dangerous patches. The base model solved only 16.39% of tasks. In raw numbers, that is roughly 119 successful cases out of 122, versus 20.

The author also mentions a separate project: a 24,252-byte operating system written in pure x86-64 assembly with the Qwen3-0.6B model inside, with no Linux, Windows, C, Rust, or libc. He claims it runs up to 54% faster than native llama.cpp on Linux. The measurement conditions are not disclosed in the post, so the figure should be treated with caution.

What this means in practice

First, the project shows an interesting pattern for reliable systems: AI works not as a chat assistant but as an automatic emergency mechanism with strict constraints. The model does not have to guess everything; it is allowed to refuse, and the hypervisor accepts only narrow fixes.

Second, a 2-billion-parameter model can sit alongside code measuring tens of kilobytes and solve a narrow task without the cloud. For embedded systems and isolated environments, that is an important signal.

The limitations are also clear. Replacing faulty instructions with NOPs does not fix the root cause: the program may keep running with incorrect data. The test used artificial crashes in a special module, not real driver bugs. The 11.1-second response time is far too long for servers where milliseconds matter. Finally, the project targets AMD processors with SVM.

The code is published under the MIT license in the llm.asm repository. For security engineers and kernel developers, it is a good reason to experiment: as a research prototype the idea works, but it is still far from industrial use.

Story

Key Questions Answered

How the kernel "surgery" works?

The Type 1 hypervisor is written for AMD processors with SVM virtualization, in NASM assembly and C without a standard library. It has no host operating system, and the entire binary is 75,424 bytes. Linux boots as a guest, while the hypervisor runs below the kernel, in so-called Ring -1. For testing, the author wrote a small module, /proc/surgeon_crash, that triggers controlled kernel crashes. The simplest example is a write to the null address: (u32 )0 = 0xDEADBEEF.

Which model was used and how it was tested?

Instead of a huge cloud neural network, the setup uses MiniCPM5-2B quantized to Q4_K_M. This compact 2-billion-parameter model fits in ordinary memory and runs on a CPU. It was fine-tuned with GRPO, a reinforcement learning method in which the model is rewarded for correct results. Testing used 122 new crash scenarios that the model had not seen during training. Among them are dangerous cases, such as crashes involving unsafe spinlocks (kernel locks), where an automatic fix could corrupt system state.

What this means in practice?

First, the project shows an interesting pattern for reliable systems: AI works not as a chat assistant but as an automatic emergency mechanism with strict constraints. The model does not have to guess everything; it is allowed to refuse, and the hypervisor accepts only narrow fixes. Second, a 2-billion-parameter model can sit alongside code measuring tens of kilobytes and solve a narrow task without the cloud. For embedded systems and isolated environments, that is an important signal.

ZK
Zhemal Khamidun — Head of AI at Alpina Digital · MIPT (academic supervisor of the Tech Entrepreneurship department). Building AI products since 2019. Hamidun News is a pet project that grew into a production aggregator with 6,000+ readers.
✦ Unified AI Workspace · Nomad

Test Frontier LLMs & Autonomous Agents in One Workspace

Run Claude Opus 5.5, GPT-6, Gemini 3.1, and DeepSeek side-by-side in Nomad AI (nomadnet.ai) — unified model routing, deep research, and multimodal workflows under one subscription.

Try Nomad AI →Launch Nomad Agent
Jemal Hamidun

Editor-in-chief · Cite this analysis

Jemal Hamidun

Head of AI at Alpina Digital · Academic Supervisor of the Tech Entrepreneurship Department at MIPT

Head of AI & CPO of AlpinaGPT at Alpina Digital, Academic Lead of Tech Entrepreneurship at MIPT. Founder of Hamidun News and Vibe Academy.

Ready-to-paste citation for journalists, blogs and Telegram channels

Source: Hamidun News — A 74 KB AI Hypervisor Repairs a Crashing Linux Kernel on the Fly: 97.54% Correct Patches Across 122 Crashes https://news.hamidun.com/en/news/18597/a-74-kb-ai-hypervisor-repairs-a-crashing-linux-kernel-on-the

What do you think?
Loading comments…