linux/arch/mips
James Hogan e523f289fe MIPS: c-r4k: Fix sigtramp SMP call to use kmap
Fix r4k_flush_cache_sigtramp() and local_r4k_flush_cache_sigtramp() to
flush the delay slot emulation trampoline cacheline through a kmap
rather than directly when the active_mm doesn't match that of the task
initiating the flush, a bit like local_r4k_flush_cache_page() does.

This would fix a corner case on SMP systems without hardware globalized
hit cache ops, where a migration to another CPU after the flush, where
that CPU did not have the same mm active at the time of the flush, could
result in stale icache content being executed instead of the trampoline,
e.g. from a previous delay slot emulation with a similar stack pointer.

This case was artificially triggered by replacing the icache flush with
a full indexed flush (not globalized on CM systems) and forcing the SMP
call to take place, with a test program that alternated two FPU delay
slots with a parent process repeatedly changing scheduler affinity.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/13797/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2016-07-29 10:19:29 +02:00
..
alchemy Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2016-05-19 10:02:26 -07:00
ar7 MIPS: ar7: use gpiochip data pointer 2016-02-19 09:51:43 +01:00
ath25
ath79 TTY and Serial driver update for 4.7-rc1 2016-05-20 20:57:27 -07:00
bcm47xx MIPS: BCM47xx: Move SPROM driver to drivers/firmware/ 2016-05-13 14:01:43 +02:00
bcm63xx Merge branch 'ib-mfd-regulator-gpio-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd into devel 2016-03-09 17:40:37 +07:00
bmips MIPS: BMIPS: Add support for BCM63268 2016-05-13 14:02:09 +02:00
boot MIPS: devicetree: fix cpu interrupt controller node-names 2016-05-28 12:35:12 +02:00
cavium-octeon MIPS: SMP: Update cpu_foreign_map on CPU disable 2016-07-29 10:19:28 +02:00
cobalt
configs MIPS: Add default configuration for ath25 2016-07-24 12:45:59 +02:00
dec MIPS: DEC: Export `ioasic_ssr_lock' to modules 2016-05-17 11:03:54 +02:00
emma
fw MIPS: Fix misspellings in comments. 2016-04-03 12:32:09 +02:00
include MIPS: c-r4k: Fix protected_writeback_scache_line for EVA 2016-07-29 10:19:29 +02:00
jazz
jz4740 MTD updates for v4.7: 2016-05-24 11:00:20 -07:00
kernel MIPS: SMP: Drop stop_this_cpu() cpu_foreign_map hack 2016-07-29 10:19:28 +02:00
kvm MIPS: KVM: Fix CACHE triggered exception emulation 2016-06-14 10:59:45 +02:00
lantiq MIPS: Lantiq: Use the real EXIN count 2016-07-24 12:31:58 +02:00
lasat MIPS: Lasat: A couple off by one bugs in picvue_proc.c 2016-05-28 12:35:06 +02:00
lib MIPS: lib: Mark intrinsics notrace 2016-05-28 12:35:11 +02:00
loongson32 MIPS: Loongson1B: Some updates/fixes for LS1B 2016-05-13 14:02:05 +02:00
loongson64 MIPS: SMP: Update cpu_foreign_map on CPU disable 2016-07-29 10:19:28 +02:00
math-emu MIPS: math-emu: Fix typo 2016-05-28 12:35:09 +02:00
mm MIPS: c-r4k: Fix sigtramp SMP call to use kmap 2016-07-29 10:19:29 +02:00
mti-malta MIPS: malta-time: Take seconds into account 2016-05-13 15:30:25 +02:00
mti-sead3 MIPS: Introduce plat_get_fdt a platform API to retrieve the FDT 2016-05-13 14:02:03 +02:00
net
netlogic MIPS: Define & use CP0_EBase bit definitions 2016-05-13 15:30:25 +02:00
oprofile MIPS: oprofile: Fix typo 2016-05-28 12:35:09 +02:00
paravirt
pci MIPS: IP27: Fix typo 2016-05-28 12:35:07 +02:00
pic32 Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2016-05-19 10:02:26 -07:00
pistachio MIPS: Pistachio: Remove plat_setup_iocoherency 2016-07-24 12:41:22 +02:00
pmcs-msp71xx MIPS: MSP71xx: Use __flush_cache_all instead of flush_cache_all. 2016-05-13 14:01:38 +02:00
pnx833x MIPS: make PCI_DMA_BUS_IS_PHYS=1 constant 2016-05-13 14:02:17 +02:00
power
ralink MIPS: ralink: add MT7628 EPHY LEDs pinmux support 2016-05-28 12:35:05 +02:00
rb532 MIPS: rb532: use gpiochip data pointer 2016-02-19 09:51:44 +01:00
sgi-ip22
sgi-ip27 MIPS: Spelling fix lets -> let's 2016-05-28 12:35:09 +02:00
sgi-ip32
sibyte MIPS: Sibyte: Fix Kconfig dependencies of SIBYTE_BUS_WATCHER 2016-05-09 12:00:03 +02:00
sni MIPS: Spelling fix lets -> let's 2016-05-28 12:35:09 +02:00
txx9 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2016-03-19 10:05:34 -07:00
vdso MIPS: Build microMIPS VDSO for microMIPS kernels 2016-05-28 12:35:12 +02:00
vr41xx MIPS: VR41xx: Fix typo 2016-05-28 12:35:09 +02:00
xilfpga
Kbuild
Kbuild.platforms MIPS: Add support for PIC32MZDA platform 2016-01-24 02:53:28 +01:00
Kconfig MIPS: Pistachio: Remove plat_setup_iocoherency 2016-07-24 12:41:22 +02:00
Kconfig.debug
Makefile MIPS: Fix VZ probe gas errors with binutils <2.24 2016-05-17 11:06:04 +02:00