Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

kho: document kexec-metadata tracking feature

Add documentation for the kexec-metadata feature that tracks the previous
kernel version and kexec boot count across kexec reboots. This helps
diagnose bugs that only reproduce when kexecing from specific kernel
versions.

Link: https://lore.kernel.org/20260316-kho-v9-6-ed6dcd951988@debian.org
Signed-off-by: Breno Leitao <leitao@debian.org>
Suggested-by: Mike Rapoport <rppt@kernel.org>
Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Reviewed-by: Pratyush Yadav <pratyush@kernel.org>
Cc: Alexander Graf <graf@amazon.com>
Cc: David Hildenbrand <david@kernel.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: "Liam R. Howlett" <Liam.Howlett@oracle.com>
Cc: Lorenzo Stoakes <ljs@kernel.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Pasha Tatashin <pasha.tatashin@soleen.com>
Cc: SeongJae Park <sj@kernel.org>
Cc: Shuah Khan <skhan@linuxfoundation.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Vlastimil Babka <vbabka@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Breno Leitao and committed by
Andrew Morton
e524feaa 76aa46b9

+39
+39
Documentation/admin-guide/mm/kho.rst
··· 42 42 an early memory reservation, the new kernel will have that memory at the 43 43 same physical address as the old kernel. 44 44 45 + Kexec Metadata 46 + ============== 47 + 48 + KHO automatically tracks metadata about the kexec chain, passing information 49 + about the previous kernel to the next kernel. This feature helps diagnose 50 + bugs that only reproduce when kexecing from specific kernel versions. 51 + 52 + On each KHO kexec, the kernel logs the previous kernel's version and the 53 + number of kexec reboots since the last cold boot:: 54 + 55 + [ 0.000000] KHO: exec from: 6.19.0-rc4-next-20260107 (count 1) 56 + 57 + The metadata includes: 58 + 59 + ``previous_release`` 60 + The kernel version string (from ``uname -r``) of the kernel that 61 + initiated the kexec. 62 + 63 + ``kexec_count`` 64 + The number of kexec boots since the last cold boot. On cold boot, 65 + this counter starts at 0 and increments with each kexec. This helps 66 + identify issues that only manifest after multiple consecutive kexec 67 + reboots. 68 + 69 + Use Cases 70 + --------- 71 + 72 + This metadata is particularly useful for debugging kexec transition bugs, 73 + where a buggy kernel kexecs into a new kernel and the bug manifests only 74 + in the second kernel. Examples of such bugs include: 75 + 76 + - Memory corruption from the previous kernel affecting the new kernel 77 + - Incorrect hardware state left by the previous kernel 78 + - Firmware/ACPI state issues that only appear in kexec scenarios 79 + 80 + At scale, correlating crashes to the previous kernel version enables 81 + faster root cause analysis when issues only occur in specific kernel 82 + transition scenarios. 83 + 45 84 debugfs Interfaces 46 85 ================== 47 86