linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 5/5] arm: Enable IRQs before attempting to read user space in __und_usr
Date: Thu, 21 Nov 2013 10:29:23 +0000	[thread overview]
Message-ID: <20131121102923.GV16735@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <loom.20131121T102616-386@post.gmane.org>

On Thu, Nov 21, 2013 at 09:35:34AM +0000, Alexey Ignatov wrote:
> Catalin Marinas <catalin.marinas <at> arm.com> writes:
> 
> > The Undef abort handler in the kernel reads the undefined instruction
> > from user space. If the page table was modified from another CPU, the
> > user access could fail and do_page_fault() will be executed with
> > interrupts disabled. This can potentially deadlock on ARM11MPCore or on
> > Cortex-A15 with erratum 798181 workaround enabled (both implying IPI for
> > TLB maintenance with page table lock held).
> > 
> > This patch enables the IRQs in __und_usr before attempting to read the
> > instruction from user space.
> 
> This patch moves enable_irq call from do_fpe directly to __und_usr handler,
> but __und_svc handler also calls do_fpe (via call_fpe), so now this codepath
> runs with disabled irqs. This behavior change doesn't look good for me.

However, you're not executing FPA instructions in the kernel as a general
rule, so it doesn't matter.

  reply	other threads:[~2013-11-21 10:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-28 11:34 [PATCH 0/5] arm: Early IRQ enabling in the Undef user handler Catalin Marinas
2013-08-28 11:34 ` [PATCH 1/5] arm: Move asm macro get_thread_info to asm/assembler.h Catalin Marinas
2013-08-28 11:34 ` [PATCH 2/5] arm: Add {inc,dec}_preempt_count asm macros Catalin Marinas
2013-08-28 11:34 ` [PATCH 3/5] arm: Disable preemption in iwmmxt_task_enable() Catalin Marinas
2013-08-28 11:34 ` [PATCH 4/5] arm: Disable preemption in crunch_task_enable() Catalin Marinas
2013-08-28 11:34 ` [PATCH 5/5] arm: Enable IRQs before attempting to read user space in __und_usr Catalin Marinas
2013-11-21  9:35   ` Alexey Ignatov
2013-11-21 10:29     ` Russell King - ARM Linux [this message]
2013-11-22  9:47       ` Alexey Ignatov
2014-03-31  4:11 ` [PATCH 0/5] arm: Early IRQ enabling in the Undef user handler Yang Zhang
  -- strict thread matches above, loose matches on Subject: below --
2014-03-13 18:15 Catalin Marinas
2014-03-13 18:15 ` [PATCH 5/5] arm: Enable IRQs before attempting to read user space in __und_usr Catalin Marinas
2014-04-01 12:24   ` Arun KS
2014-04-01 14:48     ` Russell King - ARM Linux
2014-04-04 11:29       ` Arun KS
2014-04-04 15:42         ` Catalin Marinas

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=20131121102923.GV16735@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).