]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/fsl: Flush the branch predictor at each kernel entry (64bit)
authorDiana Craciun <diana.craciun@nxp.com>
Wed, 12 Dec 2018 14:03:05 +0000 (16:03 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 20 Dec 2018 11:59:03 +0000 (22:59 +1100)
commitbf547e33b62442d2566cb0634f92fbd7c5db9ee3
tree19f032a9630407a6b0d0bbfe13c44cb4573f57f1
parent9332068148120353c1e138b324dc23e8cc1c3eba
powerpc/fsl: Flush the branch predictor at each kernel entry (64bit)

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>
arch/powerpc/kernel/entry_64.S
arch/powerpc/kernel/exceptions-64e.S
arch/powerpc/mm/tlb_low_64e.S