Re: [RFC PATCH v2 2/2] ARM/mm/fault: Enable interrupts before sending signal

Sebastian Andrzej Siewior
2025-11-27T14:49:16Z

On 2025-11-27 22:01:09 [+0800], Xie Yuanbin wrote:
> --- a/arch/arm/mm/fault.c
> +++ b/arch/arm/mm/fault.c
> @@ -184,10 +184,13 @@ __do_user_fault(unsigned long addr, unsigned int fsr, unsigned int sig,
> struct task_struct *tsk = current;
>
> if (addr > TASK_SIZE)
> harden_branch_predictor();
>
> + if (IS_ENABLED(CONFIG_PREEMPT_RT))
> + local_irq_enable();

This shouldn't be limited to CONFIG_PREEMPT_RT. There is nothing wrong
with enabling it unconditionally.

> #ifdef CONFIG_DEBUG_USER
> if (((user_debug & UDBG_SEGV) && (sig == SIGSEGV)) ||
> ((user_debug & UDBG_BUS) && (sig == SIGBUS))) {
> pr_err("8<--- cut here ---\n");
> pr_err("%s: unhandled page fault (%d) at 0x%08lx, code 0x%03x\n",

Sebastian