summaryrefslogtreecommitdiff
path: root/virt/kvm
diff options
context:
space:
mode:
authorMarc Zyngier <marc.zyngier@arm.com>2018-01-19 15:42:09 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-02-16 20:22:53 +0100
commit9107ac4ea3da68af722d1b6820f90cf0c119b134 (patch)
tree4b61e700c21741403a3848fc04f73f15bdd0756f /virt/kvm
parent5bee81c980297f3f5486539881ab4241c5f0dea3 (diff)
arm64: Move BP hardening to check_and_switch_context
Commit a8e4c0a919ae upstream. We call arm64_apply_bp_hardening() from post_ttbr_update_workaround, which has the unexpected consequence of being triggered on every exception return to userspace when ARM64_SW_TTBR0_PAN is selected, even if no context switch actually occured. This is a bit suboptimal, and it would be more logical to only invalidate the branch predictor when we actually switch to a different mm. In order to solve this, move the call to arm64_apply_bp_hardening() into check_and_switch_context(), where we're guaranteed to pick a different mm context. Acked-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'virt/kvm')
0 files changed, 0 insertions, 0 deletions