]> 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>
Fri, 29 Mar 2019 11:26:13 +0000 (22:26 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Apr 2019 04:25:14 +0000 (06:25 +0200)
commita6942e23076de4d5f81e9c396de841d494c83399
tree4619bed42b372ab5a115080e101df7f5e2e4028a
parent36f75b15da9da072688711be8296e57e4523150c
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/kernel/entry_64.S
arch/powerpc/kernel/exceptions-64e.S
arch/powerpc/mm/tlb_low_64e.S