All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org,
	Clark Williams <clrkwllms@kernel.org>,
	linux-rt-devel@lists.linux.dev,
	Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [PATCH 1/6] ARM: ensure interrupts are enabled in __do_user_fault()
Date: Mon, 2 Mar 2026 11:33:19 +0100	[thread overview]
Message-ID: <20260302103319.VI_GSa_5@linutronix.de> (raw)
In-Reply-To: <E1vvzcS-0000000Awnu-1u0H@rmk-PC.armlinux.org.uk>

On 2026-02-27 15:19:08 [+0000], Russell King (Oracle) wrote:
> __do_user_fault() may be called from fault handling paths where the
> interrupts are enabled or disabled. E.g. do_page_fault() calls this
> with interrupts enabled, whereas do_sect_fault()->do_bad_area()
> will call this with interrupts disabled. Since this is a userspace
> fault, we know that interrupts were enabled in the parent context,
> so call local_irq_enable() here to give a consistent interrupt state.
> 
> This is necessary for force_sig_info() when PREEMPT_RT is enabled.

Reported-by: Yadi.hu <yadi.hu@windriver.com
Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
> ---
>  arch/arm/mm/fault.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
> index ed4330cc3f4e..6c27ebd49093 100644
> --- a/arch/arm/mm/fault.c
> +++ b/arch/arm/mm/fault.c
> @@ -190,7 +190,8 @@ __do_kernel_fault(struct mm_struct *mm, unsigned long addr, unsigned int fsr,
>  
>  /*
>   * Something tried to access memory that isn't in our memory map..
> - * User mode accesses just cause a SIGSEGV
> + * User mode accesses just cause a SIGSEGV. Ensure interrupts are enabled
> + * for preempt RT.
          PREEMPT_RT.
>   */
>  static void
>  __do_user_fault(unsigned long addr, unsigned int fsr, unsigned int sig,

Sebastian


  reply	other threads:[~2026-03-02 10:33 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-27 15:18 [PATCH 0/6] ARM: cleanup fault handling Russell King (Oracle)
2026-02-27 15:19 ` [PATCH 1/6] ARM: ensure interrupts are enabled in __do_user_fault() Russell King (Oracle)
2026-03-02 10:33   ` Sebastian Andrzej Siewior [this message]
2026-02-27 15:19 ` [PATCH 2/6] ARM: move vmalloc() lazy-page table population Russell King (Oracle)
2026-03-02 10:43   ` Sebastian Andrzej Siewior
2026-03-02 10:57     ` Russell King (Oracle)
2026-03-02 11:00       ` Sebastian Andrzej Siewior
2026-03-02 11:19         ` Russell King (Oracle)
2026-03-02 11:51           ` Sebastian Andrzej Siewior
2026-02-27 15:19 ` [PATCH 3/6] ARM: move is_permission_fault() and is_translation_fault() to fault.h Russell King (Oracle)
2026-03-02 10:45   ` Sebastian Andrzej Siewior
2026-02-27 15:19 ` [PATCH 4/6] ARM: use BIT() and GENMASK() for fault status register fields Russell King (Oracle)
2026-03-02 10:50   ` Sebastian Andrzej Siewior
2026-02-27 15:19 ` [PATCH 5/6] ARM: move FSR fault status definitions before fsr_fs() Russell King (Oracle)
2026-03-02 10:51   ` Sebastian Andrzej Siewior
2026-02-27 15:19 ` [PATCH 6/6] ARM: provide individual is_translation_fault() and is_permission_fault() Russell King (Oracle)
2026-03-02 10:54   ` Sebastian Andrzej Siewior
2026-03-02 10:57 ` [PATCH 0/6] ARM: cleanup fault handling Sebastian Andrzej Siewior
2026-03-19 15:37   ` 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=20260302103319.VI_GSa_5@linutronix.de \
    --to=bigeasy@linutronix.de \
    --cc=clrkwllms@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-rt-devel@lists.linux.dev \
    --cc=rmk+kernel@armlinux.org.uk \
    --cc=rostedt@goodmis.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 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.