Linux virtualization list
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Zack Rusin" <zack.rusin@broadcom.com>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Petr Mladek" <pmladek@suse.com>,
	"Baoquan He" <baoquan.he@linux.dev>,
	"Mike Rapoport" <rppt@kernel.org>,
	"Pasha Tatashin" <pasha.tatashin@soleen.com>,
	"Pratyush Yadav" <pratyush@kernel.org>,
	"Dave Young" <ruirui.yang@linux.dev>
Cc: "Borislav Petkov" <bp@alien8.de>,
	"Ajay Kaher" <ajay.kaher@broadcom.com>,
	"Alexey Makhalov" <alexey.makhalov@broadcom.com>,
	x86@kernel.org, "Joel Granados" <joel.granados@kernel.org>,
	"Thomas Gleixner" <tglx@kernel.org>,
	"Ingo Molnar" <mingo@redhat.com>,
	"Dave Hansen" <dave.hansen@linux.intel.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	virtualization@lists.linux.dev,
	bcm-kernel-feedback-list@broadcom.com,
	"John Ogness" <john.ogness@linutronix.de>,
	"Steven Rostedt" <rostedt@goodmis.org>,
	"Sergey Senozhatsky" <senozhatsky@chromium.org>,
	"Kees Cook" <kees@kernel.org>, "Jonathan Corbet" <corbet@lwn.net>,
	"Bo Gan" <bo.gan@broadcom.com>,
	"Brennan Lamoreaux" <brennan.lamoreaux@broadcom.com>,
	kexec@lists.infradead.org,
	"Guilherme G. Piccoli" <gpiccoli@igalia.com>,
	"Maaz Mombasawala" <maaz.mombasawala@broadcom.com>,
	"Shuah Khan" <skhan@linuxfoundation.org>,
	"Randy Dunlap" <rdunlap@infradead.org>,
	"Stephen Brennan" <stephen.s.brennan@oracle.com>,
	"Michael Kelley" <mhklinux@outlook.com>,
	"Ian Forbes" <ian.forbes@broadcom.com>,
	"Bradley Morgan" <brads@mainlining.org>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Eugenio Perez" <eperezma@redhat.com>
Subject: Re: [PATCH v3 1/4] panic: Add a platform panic notifier list
Date: Mon, 09 Nov 2026 05:58:16 +0000	[thread overview]
Message-ID: <sashiko-outbox-204467@kernel.org> (raw)
In-Reply-To: <42090fa4453561ebc35f35cc563ec79933eebe75.1794201807.git.zack.rusin@broadcom.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] crash: kexec_trylock() held across panic_notify_platform()
  breaks kdump
--

commit 27b42ef2d74e73a1aad7b08a71b2e46383b32891
Author: Zack Rusin <zack.rusin@broadcom.com>

panic: Add a platform panic notifier list

This commit adds a platform panic notifier list (panic_notifiers_platform_list)
that runs early in vpanic() and in __crash_kexec(), along with a kernel
parameter to disable it.

Link: https://lore.kernel.org/r/ateYxCu63pRY9EGq@pathway.suse.cz

> diff --git a/kernel/crash_core.c b/kernel/crash_core.c
> index d0bd2d0cf8990..10b4384294c2b 100644
> --- a/kernel/crash_core.c
> +++ b/kernel/crash_core.c
[ ... ]
> @@ -139,6 +140,8 @@ void __noclone __crash_kexec(struct pt_regs *regs)
>  			struct pt_regs fixed_regs;
>  
>  			crash_setup_regs(&fixed_regs, regs);
> +			/* For crash paths that bypass panic() */
> +			panic_notify_platform();
>  			crash_save_vmcoreinfo();
>  			machine_crash_shutdown(&fixed_regs);
>  			crash_cma_clear_pending_dma();

[Severity: Medium]
Can calling panic_notify_platform() while kexec_trylock() is held prevent
kdump from running if a platform notifier callback panics?

panic_notify_platform() sets done = true before invoking the notifier
chain so that a callback that panics will not re-run the list when it
enters vpanic().  However, when __crash_kexec() is entered directly on a
crash path that bypasses panic() (such as oops_end() -> crash_kexec()),
__kexec_lock is already held:

  crash_kexec()
    __crash_kexec(regs)
      kexec_trylock()
      panic_notify_platform()
        <callback panics>
          vpanic()
            __crash_kexec(NULL)
              kexec_trylock()  <-- fails, skips kdump

Because vpanic() never returns to the outer __crash_kexec() frame,
machine_kexec() is never reached and the crash dump is lost.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1794201807.git.zack.rusin@broadcom.com?part=1

  reply	other threads:[~2026-11-09  5:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-09  5:47 [PATCH v3 0/4] panic, x86/vmware: Preserve crash logs before kdump Zack Rusin
2026-11-09  5:47 ` [PATCH v3 1/4] panic: Add a platform panic notifier list Zack Rusin
2026-11-09  5:58   ` sashiko-bot [this message]
2026-11-09  5:47 ` [PATCH v3 2/4] x86/vmware: Add a bounded panic log sender Zack Rusin
2026-11-09  5:57   ` sashiko-bot
2026-11-09  5:47 ` [PATCH v3 3/4] x86/vmware: Add the vmware_record_panic_msg sysctl Zack Rusin
2026-11-09  5:55   ` sashiko-bot
2026-11-09  5:47 ` [PATCH v3 4/4] x86/vmware: Report guest crashes after kmsg dumpers Zack Rusin
2026-11-09  5:52   ` sashiko-bot

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=sashiko-outbox-204467@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=ajay.kaher@broadcom.com \
    --cc=akpm@linux-foundation.org \
    --cc=alexey.makhalov@broadcom.com \
    --cc=baoquan.he@linux.dev \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=bo.gan@broadcom.com \
    --cc=bp@alien8.de \
    --cc=brads@mainlining.org \
    --cc=brennan.lamoreaux@broadcom.com \
    --cc=corbet@lwn.net \
    --cc=dave.hansen@linux.intel.com \
    --cc=eperezma@redhat.com \
    --cc=gpiccoli@igalia.com \
    --cc=hpa@zytor.com \
    --cc=ian.forbes@broadcom.com \
    --cc=joel.granados@kernel.org \
    --cc=john.ogness@linutronix.de \
    --cc=kees@kernel.org \
    --cc=kexec@lists.infradead.org \
    --cc=maaz.mombasawala@broadcom.com \
    --cc=mhklinux@outlook.com \
    --cc=mingo@redhat.com \
    --cc=mst@redhat.com \
    --cc=pasha.tatashin@soleen.com \
    --cc=pmladek@suse.com \
    --cc=pratyush@kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=rppt@kernel.org \
    --cc=ruirui.yang@linux.dev \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=senozhatsky@chromium.org \
    --cc=skhan@linuxfoundation.org \
    --cc=stephen.s.brennan@oracle.com \
    --cc=tglx@kernel.org \
    --cc=virtualization@lists.linux.dev \
    --cc=x86@kernel.org \
    --cc=zack.rusin@broadcom.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