Re: [PATCH] ARM: enable interrupts when arm_notify_die() is handling user mode errors

From: Xie Yuanbin

Date: Mon Jun 29 2026 - 04:34:01 EST


On Mon, 29 Jun 2026 09:57:26 +0200, Sebastian Andrzej Siewior wrote:
> 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.
>
> 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.

Thanks. So, can I take it that you agree with the first one?

On Thu, 25 Jun 2026 20:26:12 +0800, Xie Yuanbin wrote:
> ```c
> if (!inf->fn(addr, ifsr | FSR_LNX_PF, regs))
> return;
>
> if (likely(user_mode(regs)))
> local_irq_enable();
>
> pr_alert("8<--- cut here ---\n");
> ```
> or
> ```c
> if (!inf->fn(addr, ifsr | FSR_LNX_PF, regs))
> return;
>
> if (likely(interrupts_enabled(regs)))
> local_irq_enable();
>
> pr_alert("8<--- cut here ---\n");
> ```