]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: unaligned: Prevent EVA instructions on kernel unaligned accesses
authorMarkos Chandras <markos.chandras@imgtec.com>
Mon, 9 Mar 2015 14:54:50 +0000 (14:54 +0000)
committerRalf Baechle <ralf@linux-mips.org>
Fri, 10 Apr 2015 13:41:44 +0000 (15:41 +0200)
commit66df0b34e3f06f658d597b4dd4e5bf2e22f23ad4
treee5d34952dce301ed1095b54997958dede5cec80f
parent503a2c71e5c1869fcaab6fc8928f7237f344e358
MIPS: unaligned: Prevent EVA instructions on kernel unaligned accesses

Commit 04fb8cbac052 ("MIPS: kernel: unaligned: Handle unaligned
accesses for EVA") allowed unaligned accesses to be emulated for
EVA. However, when emulating regular load/store unaligned accesses,
we need to use the appropriate "address space" instructions for that.
Previously, an unaligned load/store instruction in kernel space would
have used the corresponding EVA instructions to emulate it which led to
segmentation faults because of the address translation that happens
with EVA instructions. This is now fixed by using the EVA instruction
only when emulating EVA unaligned accesses.

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Fixes: 04fb8cbac052 ("MIPS: kernel: unaligned: Handle unaligned accesses for EVA")
Cc: <stable@vger.kernel.org> # v3.15+
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/9501/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/unaligned.c