]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
powerpc/fsl: Flush the branch predictor at each kernel entry (64bit)
authorDiana Craciun <diana.craciun@nxp.com>
Thu, 11 Apr 2019 11:46:23 +0000 (21:46 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Apr 2019 06:36:43 +0000 (08:36 +0200)
commitdd8bf94d03d1f35c8792760d9d67428f2abc3fb1
tree3ce2dfb584393d888eac9c4e92c7b91a5e6f19ca
parent7133df4c86d9e853e12469a3a5c363fb75981429
powerpc/fsl: Flush the branch predictor at each kernel entry (64bit)

commit 10c5e83afd4a3f01712d97d3bb1ae34d5b74a185 upstream.

In order to protect against speculation attacks on
indirect branches, the branch predictor is flushed at
kernel entry to protect for the following situations:
- userspace process attacking another userspace process
- userspace process attacking the kernel
Basically when the privillege level change (i.e. the
kernel is entered), the branch predictor state is flushed.

Signed-off-by: Diana Craciun <diana.craciun@nxp.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/kernel/entry_64.S
arch/powerpc/kernel/exceptions-64e.S
arch/powerpc/mm/tlb_low_64e.S