MIPS: Flush RPS on kernel entry with EVA
authorJames Hogan <james.hogan@imgtec.com>
Fri, 31 Jul 2015 15:29:38 +0000 (16:29 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Mon, 3 Aug 2015 08:29:11 +0000 (10:29 +0200)
commit3aff47c062b944a5e1f9af56a37a23f5295628fc
tree3e06f91bc72e2c9b99927b0435d44344dfdd1780
parent247bfb65d731350093f5d1a0a8b3d65e49c17baa
MIPS: Flush RPS on kernel entry with EVA

When EVA is enabled, flush the Return Prediction Stack (RPS) present on
some MIPS cores on entry to the kernel from user mode.

This is important specifically for interAptiv with EVA enabled,
otherwise kernel mode RPS mispredicts may trigger speculative fetches of
user return addresses, which may be sensitive in the kernel address
space due to EVA's overlapping user/kernel address spaces.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Markos Chandras <markos.chandras@imgtec.com>
Cc: Leonid Yegoshin <leonid.yegoshin@imgtec.com>
Cc: linux-mips@linux-mips.org
Cc: <stable@vger.kernel.org> # 3.15.x-
Patchwork: https://patchwork.linux-mips.org/patch/10812/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/include/asm/stackframe.h