On Tue, Dec 30, 2025 at 9:13 AM Breno Leitao <[email protected]> wrote:
>
> Introduce a new Kconfig option, CONFIG_KEXEC_SHOW_PREVIOUS_RELEASE,
I don't think we need a config for this. Let's just show the previous
kernel version unconditionally when KHO is enabled.
> which enables the storage and display of the previous kernel's release
> version across kexec boots when using Kexec Handover (KHO).
>
> Motivation
> ==========
>
> Kernel bugs that depend on the version of the previously running kernel
> are not uncommon, especially in scenarios where a buggy kernel kexecs
> into a new one and the issue only manifests in the subsequent kernel.
>
> Recent examples include:
>
> * eb2266312507 ("x86/boot: Fix page table access in 5-level to 4-level
> paging transition")
> * 77d48d39e991 ("efistub/tpm: Use ACPI reclaim memory for event log to avoid
> corruption")
> * 64b45dd46e15 ("x86/efi: skip memattr table on kexec boot")
>
> As kexec-based reboots become more widespread among Linux users, these
> issues are becoming increasingly prominent.
>
> When such crashes occur, correlating them to the previous kernel version
> is challenging, especially at scale, where the problem may only appear in
> specific cases and it is hard to correlate.
>
> With the introduction of Kexec Handover (KHO), we now have a reliable
> mechanism to pass information between kernels. This presents an
> opportunity to address the problem by carrying the previous kernel's
> release version to the next kernel and printing it at boot time.
LUO added the number of times a machine has been live updated to help
debugging problems that are related to live update, perhaps, in
addition to the previous kernel version, we should also add a number
of times the machine has been kexec'd. It is useful when a bug
manifests only after a number of kexec's which is also sometimes a
case.
Pasha