linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] arm: Early IRQ enabling in the Undef user handler
@ 2014-03-13 18:15 Catalin Marinas
  2014-03-13 18:15 ` [PATCH 1/5] arm: Move asm macro get_thread_info to asm/assembler.h Catalin Marinas
                   ` (5 more replies)
  0 siblings, 6 replies; 19+ messages in thread
From: Catalin Marinas @ 2014-03-13 18:15 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Russell,

I've had this series in my repo for a long time with some follow-ups on
the list but without any conclusive ACK or NAK. If there are no
objections, I plan to send it to the patch system.

The only change is rebasing to 3.14-rc6 and adding some Cc for the
crunch bits.

The __und_usr handler accesses the user space to read the opcode of the
faulting instruction. This is currently done with interrupts disabled
but it could potentially cause a data abort of the page table was
modified from another CPU. The data abort with interrupts disabled
triggers a might_sleep() warning in do_page_fault() or, worse, deadlock
on the pte lock when TLB ops broadcasting is enabled (ARM11MPCore or A15
together with workaround for erratum 798181).

Catalin Marinas (5):
  arm: Move asm macro get_thread_info to asm/assembler.h
  arm: Add {inc,dec}_preempt_count asm macros
  arm: Disable preemption in iwmmxt_task_enable()
  arm: Disable preemption in crunch_task_enable()
  arm: Enable IRQs before attempting to read user space in __und_usr

 arch/arm/include/asm/assembler.h   | 42 ++++++++++++++++++++++++++++++++++++++
 arch/arm/kernel/entry-armv.S       | 11 ++++++----
 arch/arm/kernel/entry-header.S     | 11 ----------
 arch/arm/kernel/iwmmxt.S           | 15 ++++++++++----
 arch/arm/mach-ep93xx/crunch-bits.S | 13 +++++++++---
 arch/arm/vfp/entry.S               | 28 ++++++++-----------------
 arch/arm/vfp/vfphw.S               | 19 ++++++-----------
 7 files changed, 84 insertions(+), 55 deletions(-)

^ permalink raw reply	[flat|nested] 19+ messages in thread
* [PATCH 0/5] arm: Early IRQ enabling in the Undef user handler
@ 2013-08-28 11:34 Catalin Marinas
  2013-08-28 11:34 ` [PATCH 5/5] arm: Enable IRQs before attempting to read user space in __und_usr Catalin Marinas
  0 siblings, 1 reply; 19+ messages in thread
From: Catalin Marinas @ 2013-08-28 11:34 UTC (permalink / raw)
  To: linux-arm-kernel

The __und_usr handler accesses the user space to read the opcode of the
faulting instruction. This is currently done with interrupts disabled
but it could potentially cause a data abort of the page table was
modified from another CPU. The data abort with interrupts disabled
triggers a might_sleep() warning in do_page_fault() or, worse, deadlock
on the pte lock when TLB ops broadcasting is enabled (ARM11MPCore or A15
together with workaround for erratum 798181).

To enable interrupts earlier, the preemption needs to be disabled in the
crunch and iwmmxt handlers. The series needs testing on such hardware.

(an alternative simpler patch would be to enable the interrupts only
around the user access instructions in __und_usr and disable them
afterwards, so I would rather do it as in this series).

Catalin Marinas (5):
  arm: Move asm macro get_thread_info to asm/assembler.h
  arm: Add {inc,dec}_preempt_count asm macros
  arm: Disable preemption in iwmmxt_task_enable()
  arm: Disable preemption in crunch_task_enable()
  arm: Enable IRQs before attempting to read user space in __und_usr

 arch/arm/include/asm/assembler.h   | 42 ++++++++++++++++++++++++++++++++++++++
 arch/arm/kernel/entry-armv.S       | 11 ++++++----
 arch/arm/kernel/entry-header.S     | 11 ----------
 arch/arm/kernel/iwmmxt.S           | 15 ++++++++++----
 arch/arm/mach-ep93xx/crunch-bits.S | 13 +++++++++---
 arch/arm/vfp/entry.S               | 28 ++++++++-----------------
 arch/arm/vfp/vfphw.S               | 19 ++++++-----------
 7 files changed, 84 insertions(+), 55 deletions(-)

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2014-04-10  9:14 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-13 18:15 [PATCH 0/5] arm: Early IRQ enabling in the Undef user handler Catalin Marinas
2014-03-13 18:15 ` [PATCH 1/5] arm: Move asm macro get_thread_info to asm/assembler.h Catalin Marinas
2014-03-13 18:15 ` [PATCH 2/5] arm: Add {inc,dec}_preempt_count asm macros Catalin Marinas
2014-03-13 18:15 ` [PATCH 3/5] arm: Disable preemption in iwmmxt_task_enable() Catalin Marinas
2014-04-10  9:14   ` Russell King - ARM Linux
2014-03-13 18:15 ` [PATCH 4/5] arm: Disable preemption in crunch_task_enable() Catalin Marinas
2014-04-10  9:14   ` Russell King - ARM Linux
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
2014-04-01 12:03 ` [PATCH 0/5] arm: Early IRQ enabling in the Undef user handler Arun KS
2014-04-01 15:41   ` Catalin Marinas
2014-04-02  4:03     ` Arun KS
  -- strict thread matches above, loose matches on Subject: below --
2013-08-28 11:34 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
2013-11-22  9:47       ` Alexey Ignatov

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).