From: sashiko-bot@kernel.org
To: "Mete Durlu" <meted@linux.ibm.com>
Cc: linux-s390@vger.kernel.org, "Heiko Carstens" <hca@linux.ibm.com>,
"Vasily Gorbik" <gor@linux.ibm.com>,
"Alexander Gordeev" <agordeev@linux.ibm.com>
Subject: Re: [PATCH v4 1/3] panic: Introduce arch_do_panic
Date: Wed, 05 Aug 2026 10:00:32 +0000 [thread overview]
Message-ID: <20260805100033.1709E1F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260805-arch_do_panic-v4-1-af4a36f99414@linux.ibm.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The newly introduced `arch_do_panic()` hook is placed before the explicit console flushes. On architectures that halt indefinitely within this hook (e.g., s390), the final 'end Kernel panic' message and any deferred NMI logs will be lost because the required explicit flush is never executed.
--
--- Patch [1]: [PATCH v4 1/3] panic: Introduce arch_do_panic ---
commit 6fe8c46d4a07969ba51a615fab55e7ba7120f254
Author: Mete Durlu <meted@linux.ibm.com>
panic: Introduce arch_do_panic
This patch introduces a weak hook for architectures to provide their
specific panic handlers. This aims to help clean up architecture specific
ifdef checks in the panic path.
> diff --git a/kernel/panic.c b/kernel/panic.c
> --- a/kernel/panic.c
> +++ b/kernel/panic.c
[ ... ]
> @@ -756,6 +758,7 @@ void vpanic(const char *fmt, va_list args)
> #endif
> pr_emerg("---[ end Kernel panic - not syncing: %s ]---\n", buf);
>
> + arch_do_panic();
[Severity: Medium]
If an architecture implements this hook and halts indefinitely, will this
bypass the final explicit console flushes?
The final explicit flush happens shortly after this addition:
vpanic() {
...
pr_emerg("---[ end Kernel panic - not syncing: %s ]---\n", buf);
arch_do_panic();
suppress_printk = 1;
console_flush_on_panic(CONSOLE_FLUSH_PENDING);
nbcon_atomic_flush_unsafe();
...
}
Could this cause deferred log messages, such as NMI backtraces or the final
panic banner, to be lost because the required explicit flush is never executed?
> /* Do not scroll important messages printed above */
> suppress_printk = 1;
>
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260805-arch_do_panic-v4-0-af4a36f99414@linux.ibm.com?part=1
next prev parent reply other threads:[~2026-08-05 10:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-05 9:48 [PATCH v4 0/3] Introduce arch_do_panic Mete Durlu
2026-08-05 9:48 ` [PATCH v4 1/3] panic: " Mete Durlu
2026-08-05 10:00 ` sashiko-bot [this message]
2026-08-05 9:48 ` [PATCH v4 2/3] s390: Implement arch_do_panic() Mete Durlu
2026-08-05 9:56 ` sashiko-bot
2026-08-05 10:06 ` Heiko Carstens
2026-08-05 10:11 ` Mete Durlu
2026-08-05 9:48 ` [PATCH v4 3/3] sparc: Implement arch_do_panic Mete Durlu
2026-08-05 9:56 ` 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=20260805100033.1709E1F00A3A@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=agordeev@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=linux-s390@vger.kernel.org \
--cc=meted@linux.ibm.com \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.