alistair23-linux/arch/arm/mm
Marc Zyngier ae120d9edf ARM: 7767/1: let the ASID allocator handle suspended animation
When a CPU is running a process, the ASID for that process is
held in a per-CPU variable (the "active ASIDs" array). When
the ASID allocator handles a rollover, it copies the active
ASIDs into a "reserved ASIDs" array to ensure that a process
currently running on another CPU will continue to run unaffected.
The active array is zero-ed to indicate that a rollover occurred.

Because of this mechanism, a reserved ASID is only remembered for
a single rollover. A subsequent rollover will completely refill
the reserved ASIDs array.

In a severely oversubscribed environment where a CPU can be
prevented from running for extended periods of time (think virtual
machines), the above has a horrible side effect:

[P{a} denotes process P running with ASID a]

	CPU-0		CPU-1

	A{x}				[active = <x 0>]

	[suspended]	runs B{y}	[active = <x y>]

					[rollover:
					 active = <0 0>
					 reserved = <x y>]

			runs B{y}	[active = <0 y>
					 reserved = <x y>]

					[rollover:
					 active = <0 0>
					 reserved = <0 y>]

			runs C{x}	[active = <0 x>]

	[resumes]

	runs A{x}

At that stage, both A and C have the same ASID, with deadly
consequences.

The fix is to preserve reserved ASIDs across rollovers if
the CPU doesn't have an active ASID when the rollover occurs.

Cc: <stable@vger.kernel.org> # 3.9
Acked-by: Will Deacon <will.deacon@arm.com>
Acked-by: Catalin Carinas <catalin.marinas@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2013-06-24 15:24:54 +01:00
..
abort-ev4.S
abort-ev4t.S
abort-ev5t.S
abort-ev5tj.S
abort-ev6.S
abort-ev7.S
abort-lv4t.S
abort-macro.S
abort-nommu.S
alignment.c Merge branch 'for-next' of git://git.pengutronix.de/git/ukl/linux into devel-stable 2013-03-09 15:49:32 +00:00
cache-aurora-l2.h
cache-fa.S
cache-feroceon-l2.c ARM: 7696/1: Fix kexec by setting outer_cache.inv_all for Feroceon 2013-04-17 16:53:27 +01:00
cache-l2x0.c ARM: 7716/1: bcm281xx: Add L2 support for Rev A2 chips 2013-05-15 19:39:27 +01:00
cache-tauros2.c
cache-v4.S ARM: mm: remove broken condition check for v4 flushing 2013-03-26 09:55:34 +00:00
cache-v4wb.S
cache-v4wt.S
cache-v6.S
cache-v7.S arm: Add v7_invalidate_l1 to cache-v7.S 2013-02-11 19:37:24 -08:00
cache-xsc3l2.c
context.c ARM: 7767/1: let the ASID allocator handle suspended animation 2013-06-24 15:24:54 +01:00
copypage-fa.c
copypage-feroceon.c
copypage-v4mc.c
copypage-v4wb.c
copypage-v4wt.c
copypage-v6.c
copypage-xsc3.c
copypage-xscale.c
dma-mapping.c ARM: 7730/1: DMA-mapping: mark all !DMA_TO_DEVICE pages in unmapping as clean 2013-05-23 00:09:45 +01:00
extable.c
fault-armv.c
fault.c
fault.h
flush.c ARM: 7746/1: mm: lazy cache flushing on non-mapped pages 2013-06-05 23:37:32 +01:00
fsr-2level.c
fsr-3level.c
highmem.c
idmap.c ARM: KVM: move to a KVM provided HYP idmap 2013-04-28 22:23:08 -07:00
init.c mm/ARM: use free_highmem_page() to free highmem pages into buddy system 2013-04-29 15:54:31 -07:00
iomap.c
ioremap.c ARM: 7728/1: mm: Use phys_addr_t properly for ioremap functions 2013-05-23 00:09:44 +01:00
Kconfig Merge branches 'devel-stable', 'entry', 'fixes', 'mach-types', 'misc' and 'smp-hotplug' into for-linus 2013-05-02 21:30:36 +01:00
Makefile ARM: cache: remove ARMv3 support code 2013-03-26 09:55:23 +00:00
mm.h ARM: 7645/1: ioremap: introduce an infrastructure for static mapped area 2013-02-16 17:54:22 +00:00
mmap.c
mmu.c Merge branches 'devel-stable', 'entry', 'fixes', 'mach-types', 'misc' and 'smp-hotplug' into for-linus 2013-05-02 21:30:36 +01:00
nommu.c ARM: 7728/1: mm: Use phys_addr_t properly for ioremap functions 2013-05-23 00:09:44 +01:00
pabort-legacy.S
pabort-v6.S
pabort-v7.S
pgd.c
proc-arm7tdmi.S
proc-arm9tdmi.S
proc-arm720.S
proc-arm740.S ARM: mm: fix numerous hideous errors in proc-arm740.S 2013-03-26 09:55:33 +00:00
proc-arm920.S ARM: Do 15e0d9e37c (ARM: pm: let platforms select cpu_suspend support) properly 2013-04-08 12:00:38 +01:00
proc-arm922.S
proc-arm925.S
proc-arm926.S ARM: Do 15e0d9e37c (ARM: pm: let platforms select cpu_suspend support) properly 2013-04-08 12:00:38 +01:00
proc-arm940.S
proc-arm946.S
proc-arm1020.S
proc-arm1020e.S
proc-arm1022.S
proc-arm1026.S
proc-fa526.S
proc-feroceon.S
proc-macros.S ARM: 7649/1: mm: mm->context.id fix for big-endian 2013-02-16 17:54:26 +00:00
proc-mohawk.S ARM: Do 15e0d9e37c (ARM: pm: let platforms select cpu_suspend support) properly 2013-04-08 12:00:38 +01:00
proc-sa110.S
proc-sa1100.S ARM: Do 15e0d9e37c (ARM: pm: let platforms select cpu_suspend support) properly 2013-04-08 12:00:38 +01:00
proc-syms.c ARM: modules: don't export cpu_set_pte_ext when !MMU 2013-03-26 09:55:34 +00:00
proc-v6.S Merge branches 'devel-stable', 'entry', 'fixes', 'mach-types', 'misc' and 'smp-hotplug' into for-linus 2013-05-02 21:30:36 +01:00
proc-v7-2level.S ARM: 7691/1: mm: kill unused TLB_CAN_READ_FROM_L1_CACHE and use ALT_SMP instead 2013-04-03 17:39:07 +01:00
proc-v7-3level.S ARM: 7691/1: mm: kill unused TLB_CAN_READ_FROM_L1_CACHE and use ALT_SMP instead 2013-04-03 17:39:07 +01:00
proc-v7.S Merge branches 'devel-stable', 'entry', 'fixes', 'mach-types', 'misc' and 'smp-hotplug' into for-linus 2013-05-02 21:30:36 +01:00
proc-xsc3.S ARM: Do 15e0d9e37c (ARM: pm: let platforms select cpu_suspend support) properly 2013-04-08 12:00:38 +01:00
proc-xscale.S ARM: Do 15e0d9e37c (ARM: pm: let platforms select cpu_suspend support) properly 2013-04-08 12:00:38 +01:00
tcm.h ARM: 7694/1: ARM, TCM: initialize TCM in paging_init(), instead of setup_arch() 2013-04-17 16:53:24 +01:00
tlb-fa.S
tlb-v4.S
tlb-v4wb.S
tlb-v4wbi.S
tlb-v6.S
tlb-v7.S