From: John Ogness <john.ogness@linutronix.de>
To: Breno Leitao <leitao@debian.org>, Petr Mladek <pmladek@suse.com>
Cc: Ryan Roberts <ryan.roberts@arm.com>,
Andrew Morton <akpm@linux-foundation.org>,
Steven Rostedt <rostedt@goodmis.org>,
Sergey Senozhatsky <senozhatsky@chromium.org>,
Rio <rioo.tsukatsukii@gmail.com>,
linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH v1] panic: Flush unsafe consoles before panic reboot
Date: Tue, 27 Oct 2026 19:07:30 +0106 [thread overview]
Message-ID: <87v76n2fb9.fsf@jogness.linutronix.de> (raw)
In-Reply-To: <auDibpMWv7mkdRTW@gmail.com>
On 2026-10-27, Breno Leitao <leitao@debian.org> wrote:
> On Tue, Oct 27, 2026 at 09:12:09AM -0700, Breno Leitao wrote:
>> So netconsole, or any CON_NBCON_ATOMIC_UNSAFE console, prints nothing
>> on kdump hosts.
>
> For flushing unsafe on nbcon on hosts with kdump environment, this seems
> to do the work, but, maybe this is too unsafe !?
For the general case, it is certainly too unsafe. As I suggested [0] we
need a way to allows users to make this decision. nbcon was designed to
allow for printing policies, but we have not yet provided the interfaces
for the user specify such policies nor the mechanism to enforce the
policies.
Perhaps we need to begin by identifying all the sites where the current
kernel is ending (whether reboot, shutdown, panic, kexec, hang).
> diff --git a/kernel/crash_core.c b/kernel/crash_core.c
> index d0bd2d0cf8990b..9f1a89e301ff01 100644
> --- a/kernel/crash_core.c
> +++ b/kernel/crash_core.c
> @@ -140,6 +140,8 @@ void __noclone __crash_kexec(struct pt_regs *regs)
>
> crash_setup_regs(&fixed_regs, regs);
> crash_save_vmcoreinfo();
> + /* Flush consoles with an unsafe write_atomic(), e.g. netconsole. */
> + nbcon_atomic_flush_unsafe();
I am guessing that the CPU is _always_ in emergency state here?
Otherwise the flushing problem exists for all atomic consoles.
> machine_crash_shutdown(&fixed_regs);
> crash_cma_clear_pending_dma();
> machine_kexec(kexec_crash_image);
>
John
[0] https://lore.kernel.org/lkml/87bj8kkfwk.fsf@jogness.linutronix.de/
prev parent reply other threads:[~2026-10-27 18:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-15 10:01 Ryan Roberts
2026-09-15 10:06 ` Ryan Roberts
2026-09-15 18:49 ` Bradley Morgan
2026-09-16 7:44 ` Ryan Roberts
2026-09-16 14:58 ` Bradley Morgan
2026-09-16 13:08 ` Petr Mladek
2026-10-22 20:35 ` Gustavo Luiz Duarte
2026-10-23 7:57 ` John Ogness
2026-10-23 10:36 ` Petr Mladek
2026-10-27 16:12 ` Breno Leitao
2026-10-27 17:43 ` Breno Leitao
2026-10-27 18:01 ` John Ogness [this message]
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=87v76n2fb9.fsf@jogness.linutronix.de \
--to=john.ogness@linutronix.de \
--cc=akpm@linux-foundation.org \
--cc=leitao@debian.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pmladek@suse.com \
--cc=rioo.tsukatsukii@gmail.com \
--cc=rostedt@goodmis.org \
--cc=ryan.roberts@arm.com \
--cc=senozhatsky@chromium.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
all inboxes | Powered by JetHome®