From: Petr Mladek <pmladek@suse.com>
To: Bradley Morgan <include@grrlz.net>
Cc: akpm@linux-foundation.org, baoquan.he@linux.dev,
feng.tang@linux.alibaba.com, gregkh@linuxfoundation.org,
arnd@arndb.de, corbet@lwn.net, rdunlap@infradead.org,
gpiccoli@igalia.com, kexec@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 1/4] panic: add a pre kdump notifier list
Date: Fri, 17 Jul 2026 15:06:14 +0200 [thread overview]
Message-ID: <alooxg8FoExekPKZ@pathway.suse.cz> (raw)
In-Reply-To: <20260711002253.1115-2-include@grrlz.net>
On Sat 2026-07-11 00:22:50, Bradley Morgan wrote:
> When a crash kernel is loaded, panic() jumps to it before the panic
> notifiers run. A hypervisor or firmware therefore never learns that
> the guest panicked: the Hyper-V host never receives the crash
> registers, a Google gsmi firmware log entry is dropped, a pvpanic
> device never signals the host, and an AMD SEV-SNP guest skips the
> firmware and IOMMU shutdown. Fleet alerting, availability tracking,
> and crash logging all miss the event.
>
> The only escape hatch today is crash_kexec_post_notifiers, but it runs
> the entire legacy notifier list before the kdump. That list carries
> slow callbacks, IPMI being the obvious one because it talks to a BMC,
> so enabling it delays every crash dump on the machine. Hyper-V forces
> it on anyway and penalizes every kdump for the sake of one upcall;
> this series also removes the forcing that SEV-SNP added for the same
> reason, giving SNP hosts the normal early crash kexec back.
>
> Add a small dedicated list that always runs before crash kexec. The
> list head stays private and registration goes through a function,
> because the callbacks on this list have a strict contract and an API
> is how you enforce one. The list lives in its own file, not in panic.c,
> so the contract can carry a MAINTAINERS entry and the existing panic
> code does not have to move.
>
> Priorities order the list like any atomic notifier chain. The header
> documents that they are reserved for callbacks that must run last, for
> example because they may not return or because they tear down a
> transport that other callbacks still need.
>
> The notify path walks the chain by hand and names each callback on the
> console before invoking it. Running anything before the crash kexec is
> a reliability trade, if an upcall hangs or faults and costs us the
> crash dump, the console identifies the culprit instead of leaving a
> machine that silently never rebooted into the kdump kernel. Callback
> return values are deliberately ignored, and a nested panic resumes the
> walk after the callback that was running instead of refaulting on it.
This is a long blob of text. I refuse to find the details there.
I miss a clear summary how this list is different from
atomic_notifier_chain and why we need it.
My understanting is that there two "main" differences. The new list:
+ ignores errors. But this might be achieved by requesting
that panic() notifiers should always return 0.
+ skips already proceed notifiers during a nested panic.
But this is a rather theoretical corner case.
IMHO, it not worth the effort.
Did I miss anything, please?
Best Regards,
Petr
next prev parent reply other threads:[~2026-07-17 13:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-11 0:22 [RFC PATCH 0/4] panic: a pre kdump notifier list for hypervisor upcalls Bradley Morgan
2026-07-11 0:22 ` [RFC PATCH 1/4] panic: add a pre kdump notifier list Bradley Morgan
2026-07-17 13:06 ` Petr Mladek [this message]
2026-07-11 0:22 ` [RFC PATCH 2/4] panic: run the pre kdump list before crash kexec Bradley Morgan
2026-07-11 0:22 ` [RFC PATCH 3/4] misc/pvpanic: notify the host on the pre kdump list Bradley Morgan
2026-07-11 0:22 ` [RFC PATCH 4/4] MAINTAINERS: add an entry for the pre kdump notifier list Bradley Morgan
2026-07-17 12:56 ` [RFC PATCH 0/4] panic: a pre kdump notifier list for hypervisor upcalls Petr Mladek
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=alooxg8FoExekPKZ@pathway.suse.cz \
--to=pmladek@suse.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=baoquan.he@linux.dev \
--cc=corbet@lwn.net \
--cc=feng.tang@linux.alibaba.com \
--cc=gpiccoli@igalia.com \
--cc=gregkh@linuxfoundation.org \
--cc=include@grrlz.net \
--cc=kexec@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rdunlap@infradead.org \
/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