linux/arch/mips/mm
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
..
Makefile MIPS: Allow L2 prefetch to be configured via debugfs 2015-10-26 09:49:42 +01:00
c-octeon.c
c-r3k.c
c-r4k.c MIPS: c-r4k: Fix sigtramp SMP call to use kmap 2016-07-29 10:19:29 +02:00
c-tx39.c MIPS: tlb-r3k: Move CP0.Wired register initialisation to `tlb_init' 2015-06-21 21:52:41 +02:00
cache.c MIPS: Sync icache & dcache in set_pte_at 2016-05-13 14:01:58 +02:00
cerr-sb1.c
cex-gen.S
cex-oct.S
cex-sb1.S
dma-default.c MIPS: dma-default: Defend against NULL dev in massage_gfp_flags 2016-05-09 12:00:04 +02:00
extable.c
fault.c MIPS: Set trap_no field in thread_struct on exception. 2015-09-03 12:08:04 +02:00
gup.c Merge branch 'mm-pkeys-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-03-20 19:08:56 -07:00
highmem.c kmap_atomic_to_page() has no users, remove it 2015-11-09 15:11:24 -08:00
hugetlbpage.c mm/hugetlb: reduce arch dependent code about huge_pmd_unshare 2015-06-24 17:49:41 -07:00
init.c MIPS: mm: Don't do MTHC0 if XPA not present 2016-05-13 15:30:25 +02:00
ioremap.c MIPS: Replace use of phys_t with phys_addr_t. 2014-11-24 22:47:31 +01:00
mmap.c mm: ASLR: use get_random_long() 2016-02-27 10:28:52 -08:00
page-funcs.S
page.c MIPS: Loongson-3: Introduce CONFIG_LOONGSON3_ENHANCEMENT 2016-05-13 14:02:15 +02:00
pgtable-32.c
pgtable-64.c mips, thp: remove infrastructure for handling splitting PMDs 2016-01-15 17:56:32 -08:00
sc-debugfs.c MIPS: Allow L2 prefetch to be configured via debugfs 2015-10-26 09:49:42 +01:00
sc-ip22.c MIPS: Fix misspellings in comments. 2016-04-03 12:32:09 +02:00
sc-mips.c MIPS: Add P6600 cases to CPU switch statements 2016-05-13 14:01:52 +02:00
sc-r5k.c MIPS: Remove useless parentheses 2014-11-24 07:44:49 +01:00
sc-rm7k.c
tlb-funcs.S
tlb-r3k.c MIPS: Retrieve ASID masks using function accepting struct cpuinfo_mips 2016-05-13 14:02:20 +02:00
tlb-r4k.c Merge branch 'akpm' (patches from Andrew) 2016-05-19 20:00:06 -07:00
tlb-r8k.c MIPS: Retrieve ASID masks using function accepting struct cpuinfo_mips 2016-05-13 14:02:20 +02:00
tlbex-fault.S
tlbex.c MIPS: tlbex: Avoid duplicated single_insn_swpd 2016-07-24 13:16:00 +02:00
uasm-micromips.c MIPS: mm: Remove dead macro definitions 2015-02-20 23:42:00 +01:00
uasm-mips.c MIPS: Loongson-3: Fast TLB refill handler 2016-05-13 14:02:15 +02:00
uasm.c MIPS: uasm: Handle low values in uasm_in_compat_space_p() 2016-07-24 13:15:28 +02:00