]> git.karo-electronics.de Git - karo-tx-linux.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>
Wed, 25 Mar 2015 12:48:06 +0000 (13:48 +0100)
commit29c7ad2c7d9a43d5bb62461f5231534cbe53e912
treef0f03e076eebd60e1142da9e3a459540a9add1bb
parent42307a641f8910e412924b4ebd6e97547913188c
MIPS: unaligned: Prevent EVA instructions on kernel unaligned accesses

Commit c1771216ab48 ("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: c1771216ab48 ("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