]> git.ipfire.org Git - people/arne_f/kernel.git/commit
powerpc/fsl: Flush the branch predictor at each kernel entry (32 bit)
authorDiana Craciun <diana.craciun@nxp.com>
Thu, 11 Apr 2019 11:46:24 +0000 (21:46 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Apr 2019 06:36:43 +0000 (08:36 +0200)
commite1152947cea025cc832df454be283f5cb99baa81
treeead9254198c3f8ffe739f5331b77cb652c5997f8
parentdd8bf94d03d1f35c8792760d9d67428f2abc3fb1
powerpc/fsl: Flush the branch predictor at each kernel entry (32 bit)

commit 7fef436295bf6c05effe682c8797dfcb0deb112a 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/head_booke.h
arch/powerpc/kernel/head_fsl_booke.S