All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] ABI updates
@ 2014-07-04 19:51 Russell King - ARM Linux
  2014-07-04 19:52 ` [PATCH 1/4] ARM: alignment: save last kernel aligned fault location Russell King
                   ` (6 more replies)
  0 siblings, 7 replies; 27+ messages in thread
From: Russell King - ARM Linux @ 2014-07-04 19:51 UTC (permalink / raw)
  To: linux-arm-kernel

As a result of the recent discussions about android, several issues
have been identified with existing kernels:

1. HWCAP_SWP does not properly reflect whether the SWP instruction
   should be used.  Turn HWCAP_SWP off on ARMv6+ where the exclusives
   are available.

2. SWP is unsafe when running on a SMP CPU; there is no bus locking
   between the read and write parts of the instruction execution.
   Force SWP emulation on ARMv7+ where we can disable the SWP
   instruction.

3. Reporting of alignment faults - kernel mode faults are silent due to
   the requirements of the network stack, but we can note where the
   last one occurs.

Testing reveals that at least my OMAP4430 userspace (supplied from TI)
executes lots of SWP instructions, which is something that wasn't known
before this patch.

Many systems today are not configured with SWP emulation enabled on SMP.
This means that the SWP instruction is available, but unsafe.

 arch/arm/kernel/setup.c       | 29 ++++++++++++++++++++++-------
 arch/arm/kernel/swp_emulate.c |  4 ++++
 arch/arm/mm/Kconfig           |  2 +-
 arch/arm/mm/alignment.c       |  4 +++-
 4 files changed, 30 insertions(+), 9 deletions(-)

-- 
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly
improving, and getting towards what was expected from it.

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

end of thread, other threads:[~2014-07-07 17:50 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-04 19:51 [PATCH 0/4] ABI updates Russell King - ARM Linux
2014-07-04 19:52 ` [PATCH 1/4] ARM: alignment: save last kernel aligned fault location Russell King
2014-07-04 19:52 ` [PATCH 2/4] ARM: SWP emulation: always enable when SMP is enabled Russell King
2014-07-04 19:52 ` [PATCH 3/4] ARM: SWP emulation: only initialise on ARMv7 CPUs Russell King
2014-07-04 19:52 ` [PATCH 4/4] ARM: hwcap: disable HWCAP_SWP if the CPU advertises it has exclusives Russell King
2014-07-04 20:11   ` Arnd Bergmann
2014-07-04 20:51     ` Russell King - ARM Linux
2014-07-04 20:58       ` Arnd Bergmann
2014-07-04 21:48         ` Russell King - ARM Linux
2014-07-05 18:46           ` Arnd Bergmann
2014-07-07 11:02         ` Catalin Marinas
2014-07-07 11:17           ` Russell King - ARM Linux
2014-07-07 12:05             ` Catalin Marinas
2014-07-07 13:13               ` Russell King - ARM Linux
2014-07-07 13:46                 ` Catalin Marinas
2014-07-07 15:31                   ` Russell King - ARM Linux
2014-07-07 15:59                     ` Catalin Marinas
2014-07-07 16:31                       ` Russell King - ARM Linux
2014-07-07 17:50                         ` Catalin Marinas
2014-07-07  9:34       ` Will Deacon
2014-07-07  9:41         ` Russell King - ARM Linux
2014-07-07  9:51           ` Will Deacon
2014-07-04 20:12 ` [PATCH 0/4] ABI updates Arnd Bergmann
2014-07-07 11:19 ` Tony Lindgren
2014-07-07 11:23   ` Russell King - ARM Linux
2014-07-07 13:23     ` Tony Lindgren
2014-07-07 13:52 ` Catalin Marinas

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.