diff options
author | James Hogan <james.hogan@imgtec.com> | 2016-07-13 13:12:48 (GMT) |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2016-07-29 08:19:29 (GMT) |
commit | e523f289fe4d18d509f8827f8a293e8c5e4f51a1 (patch) | |
tree | afb5e942b5eabb7c34b84453b23fcb8c57aac233 /crypto | |
parent | 0758b116b4080d9a2a2a715bec6eee2cbd828215 (diff) | |
download | linux-e523f289fe4d18d509f8827f8a293e8c5e4f51a1.tar.xz |
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>
Diffstat (limited to 'crypto')
0 files changed, 0 insertions, 0 deletions