diff options
author | Marc Zyngier <[email protected]> | 2018-01-19 15:42:09 +0000 |
---|---|---|
committer | Catalin Marinas <[email protected]> | 2018-01-23 15:40:29 +0000 |
commit | a8e4c0a919ae310944ed2c9ace11cf3ccd8a609b (patch) | |
tree | 018cd8a8a9d560355830d94407d33d96355bb5d9 /net/unix/sysctl_net_unix.c | |
parent | e9eaa8052fe71b95f4fea6072fa3e0b2cf0b620f (diff) |
arm64: Move BP hardening to check_and_switch_context
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 <[email protected]>
Signed-off-by: Marc Zyngier <[email protected]>
Signed-off-by: Catalin Marinas <[email protected]>
Diffstat (limited to 'net/unix/sysctl_net_unix.c')
0 files changed, 0 insertions, 0 deletions