Linux is getting a tool that crashes your system on purpose

Linux is getting a tool that crashes your system on purpose

Published Nov 13, 2026, 5:23 PM EST Tyler Cross is an author for How-To Geek who reports on a wide range of cybersecurity stories. Before this, he spent 5 years creating cybersecurity articles under the Kape brand, including both short- and long-form blog posts. He also has 2+ years of experience creating news articles, YouTube scripts, and product reviews for a wide range of VPNs, antivirus software, password managers, and more. Outside of work, I am an avid tabletop gamer and enjoy writing my own TTRPG systems and campaign modules. Sign in to your How-To Geek account The Linux 7.5 source tree will introduce a new tool called hwpoison-panic that deliberately induces certain memory issues in your computer to cause a crash. Developers can use the tool to test the Linux kernel and ensure it crashes when expected According to the release notes on the Linux Kernel Archives, hwpoison-panic "picks a kernel-owned PFN and writes its physical address to hard_offline_page. Three page kinds are selectable with -k: rodata (default), slab or pgtable. In all cases, the host should panic. It tests that the vm.panic_on_unrecoverable_memory_failure properly triggers an immediate kernel panic when certain types of kernel memory suffer an unrecoverable error. Developers can inject these errors to test the response without waiting for an actual hardware failure. "The hwpoison-panic tool to intentionally trigger the kernel panic injects a hardware poison error on a kernel owned page with the ability to target the kernel read-only data "rodata" range, a slab page, or a page-table page. Successfully running the tool will crash the running kernel and thus the --yes-panic-my-kernel argument is also needed to avoid accidentally triggering this tool," Phoronix explains. The reason you'd use this tool is that continuing to use your computer after hardware failure can be much worse than a simple crash. If damaged memory holds any essential kernel data, it can cause the system to behave unexpectedly or corrupt your data. A kernel panic is a crash response that stops your computer from performing any functions that could continue to corrupt your data. A crash can also provide important diagnostic data to help isolate the underlying problems, depending on your setup. How to use hwpoison-panic The Linux Kernel Archives provides an example of what the tool looks like in action. "Example: # ./hwpoison-panic -k slab --yes-panic-my-kernel injecting hwpoison at phys 0x100032000 (pfn 0x100032, kind=slab) expecting kernel panic: 'Memory failure: : unrecoverable page' In dmesg," it said. "You will see: Memory failure: 0x100032: unhandlable page. Memory failure: 0x100032: recovery action for reserved kernel page: Ignored Kernel panic — not syncing: Memory failure: 0x100032: unrecoverable page. This lives in tools/mm rather than selftests/mm because every successful run crashes the machine, which is not something to run from CI. In plainer English, this means you use a command to run the tool and select a kernel memory to target. It will then simulate a memory failure (the longer hexadecimal numbers mark the location of the faulty memory). After this, you should get results that indicate an unrecoverable memory failure, followed by a kernel panic. If the system crashes, it generally means the test worked. Because the tool brings down your entire system, developers should avoid using it as part of regular routine tests. Instead, developers use this niche tool for specific memory failure tests. It's mainly used to test virtual machines, where devs can record diagnostic messages to confirm that the kernel crashed. Developers can rerun the test whenever Linux updates to check that their system still stops when these memory errors occur. Source: Phoronix via The Linux Kernel Archives.org

Original Source

Read the full article at Howtogeek →

KhanList aggregates and links to publicly available news content. We do not host full articles from third-party sources. Always verify important information with original sources.