From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Xie Yuanbin <xieyuanbin1@huawei.com>
Cc: linux@armlinux.org.uk, rmk+kernel@armlinux.org.uk,
clrkwllms@kernel.org, rostedt@goodmis.org, linusw@kernel.org,
arnd@arndb.de, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-rt-devel@lists.linux.dev,
liaohua4@huawei.com, lilinjie8@huawei.com
Subject: Re: [PATCH] ARM: enable interrupts when arm_notify_die() is handling user mode errors
Date: Mon, 29 Jun 2026 09:57:26 +0200 [thread overview]
Message-ID: <20260629075726.McX9yWi1@linutronix.de> (raw)
In-Reply-To: <20260626082953.47503-1-xieyuanbin1@huawei.com>
On 2026-06-26 16:29:53 [+0800], Xie Yuanbin wrote:
> My personal view is as follows: First, an Unhandled kernel fault indicates
> that the kernel has encountered an error, which is different from an
> Unhandled user fault. An Unhandled user fault can be artificially
> constructed by user programs, whereas a healthy kernel, in theory, should
> not trigger an Unhandled kernel fault.
correct.
> When a kernel has already encountered a fault, I think that printing fault
> information is more meaningful than improving the kernel's real-time
> performance. Imagine this: The interrupts enable here, and at the same
> time an interrupt arrives, and then another kernel error is triggered
> within the interrupt context. The log would be a disaster.
The problem is actually hitting that "error" spot before oops_enter().
In oops_enter() not only interrupts are disabled but also the emergency
mode of the console is enabled. That means all console output is written
via the atomic_write interface to the console as it the output happens.
At this point, your real-time guarantees are gone. There is no need to
worry about anything here since everything is lost.
> But no matter what, the above are merely my personal views,
> and I respect the maintainer's opinions.
Restricting it to user context is reasonable: Here you kill the task and
need enabled interrupts in order to send the signal.
For kernel threads it is not needed because the "printing" happens with
disabled interrupts anyway and without any buffering. Should this event
not end with panic() then it will kill the kernel thread and enable
interrupts before doing so.
Sebastian
next prev parent reply other threads:[~2026-06-29 7:57 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-25 7:35 [PATCH] ARM: enable interrupts when arm_notify_die() is handling user mode errors Xie Yuanbin
2026-06-25 8:50 ` Sebastian Andrzej Siewior
2026-06-25 9:05 ` Russell King
2026-06-25 9:30 ` Sebastian Andrzej Siewior
2026-06-25 10:20 ` Russell King
2026-06-25 12:08 ` Sebastian Andrzej Siewior
2026-06-25 10:00 ` Xie Yuanbin
2026-06-25 10:23 ` Russell King
2026-06-25 12:26 ` Xie Yuanbin
2026-06-25 15:21 ` Sebastian Andrzej Siewior
2026-06-26 8:29 ` Xie Yuanbin
2026-06-29 7:57 ` Sebastian Andrzej Siewior [this message]
2026-06-29 8:31 ` Xie Yuanbin
2026-06-29 9:40 ` Sebastian Andrzej Siewior
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=20260629075726.McX9yWi1@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=arnd@arndb.de \
--cc=clrkwllms@kernel.org \
--cc=liaohua4@huawei.com \
--cc=lilinjie8@huawei.com \
--cc=linusw@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-devel@lists.linux.dev \
--cc=linux@armlinux.org.uk \
--cc=rmk+kernel@armlinux.org.uk \
--cc=rostedt@goodmis.org \
--cc=xieyuanbin1@huawei.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