From: Breno Leitao <leitao@debian.org>
To: Pratyush Yadav <pratyush@kernel.org>
Cc: Alexander Graf <graf@amazon.com>, Mike Rapoport <rppt@kernel.org>,
Pasha Tatashin <pasha.tatashin@soleen.com>,
linux-kernel@vger.kernel.org, kexec@lists.infradead.org,
linux-mm@kvack.org, usamaarif642@gmail.com, rmikey@meta.com,
clm@fb.com, riel@surriel.com, kernel-team@meta.com
Subject: Re: [PATCH v2 1/2] kexec: history: track previous kernel version
Date: Mon, 5 Jan 2026 02:47:39 -0800 [thread overview]
Message-ID: <josgeh3zd55a5sjmclidj53v7hoekzvb63ah45aocvgwh6ajxk@rnzjabyqkojz> (raw)
In-Reply-To: <86secn7ors.fsf@kernel.org>
Hello Pratyush,
On Fri, Jan 02, 2026 at 09:17:27PM +0100, Pratyush Yadav wrote:
> > Subject: [PATCH v2 1/2] kexec: history: track previous kernel version
>
> Nit: please use the prefix "kho: " for KHO patches.
ack.
> On Fri, Jan 02 2026, Breno Leitao wrote:
> > Add CONFIG_KEXEC_HISTORY to store and display the kernel version from
> > the previous kexec boot.
> >
> > When enabled, the current kernel's release string is saved to the
> > "previous-release" property in the KHO device tree before kexec. On
> > the next boot, if this property exists, the previous kernel version
> > is retrieved and printed during early boot.
> >
> > This helps diagnose bugs that only manifest when kexecing from
> > specific kernel versions, making it easier to correlate crashes with
> > the kernel that initiated the kexec.
>
> Why can't you use journalctl to figure out which kernel was running
> previously?
This is a good question, this is why this doesn't work for me:
1) in some cases you cannot rely on systemd infrastructure.
- This is very common when you have linux as the boot loader, which
basically boot linux (UEFI -> Bootloader/linux -> kexec -> target linux)
- In these cases, the bootloader doesn't have write access to the
filesyste/journal
- This is becoming more and more common. For instance, at Meta, Linux
is the default bootloader.
2) in some of the bugs I've listed earlier, the machine doesn't even get
to userspace before the crash. For instance, in the bug fixed by
commit 77d48d39e991 ("efistub/tpm: Use ACPI reclaim memory for event
log to avoid corruption"), the kernel was not reach userspace/init,
thus, it would not be possible to run journalctl.
Thanks for the review,
--breno
next prev parent reply other threads:[~2026-01-05 10:47 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-02 14:53 [PATCH v2 0/2] kexec: history: track previous kernel version and kexec boot count Breno Leitao
2026-01-02 14:53 ` [PATCH v2 1/2] kexec: history: track previous kernel version Breno Leitao
2026-01-02 15:02 ` Usama Arif
2026-01-02 15:14 ` Breno Leitao
2026-01-02 15:33 ` Usama Arif
2026-01-02 16:18 ` Pasha Tatashin
2026-01-02 20:17 ` Pratyush Yadav
2026-01-05 10:47 ` Breno Leitao [this message]
2026-01-02 14:53 ` [PATCH v2 2/2] kexec: history: track kexec boot counter Breno Leitao
2026-01-02 15:09 ` Usama Arif
2026-01-02 15:24 ` Breno Leitao
2026-01-02 15:31 ` Usama Arif
2026-01-02 16:20 ` Pasha Tatashin
2026-01-02 20:23 ` Pratyush Yadav
2026-01-06 11:04 ` Breno Leitao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=josgeh3zd55a5sjmclidj53v7hoekzvb63ah45aocvgwh6ajxk@rnzjabyqkojz \
--to=leitao@debian.org \
--cc=clm@fb.com \
--cc=graf@amazon.com \
--cc=kernel-team@meta.com \
--cc=kexec@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=pasha.tatashin@soleen.com \
--cc=pratyush@kernel.org \
--cc=riel@surriel.com \
--cc=rmikey@meta.com \
--cc=rppt@kernel.org \
--cc=usamaarif642@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox