diff options
author | Will Deacon <will.deacon@arm.com> | 2018-06-14 11:23:38 +0100 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2018-12-06 16:47:05 +0000 |
commit | 679db70801da9fda91d26caf13bf5b5ccc74e8e8 (patch) | |
tree | 99b7df12e3d5dbdb4d14cd0fe317b643ee7a1444 /arch/arm64/kvm/hyp/entry.S | |
parent | bd4fb6d270bc423a9a4098108784f7f9254c4e6d (diff) | |
download | linux-next-679db70801da9fda91d26caf13bf5b5ccc74e8e8.tar.gz |
arm64: entry: Place an SB sequence following an ERET instruction
Some CPUs can speculate past an ERET instruction and potentially perform
speculative accesses to memory before processing the exception return.
Since the register state is often controlled by a lower privilege level
at the point of an ERET, this could potentially be used as part of a
side-channel attack.
This patch emits an SB sequence after each ERET so that speculation is
held up on exception return.
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64/kvm/hyp/entry.S')
-rw-r--r-- | arch/arm64/kvm/hyp/entry.S | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm64/kvm/hyp/entry.S b/arch/arm64/kvm/hyp/entry.S index fad1e164fe48..675fdc186e3b 100644 --- a/arch/arm64/kvm/hyp/entry.S +++ b/arch/arm64/kvm/hyp/entry.S @@ -83,6 +83,7 @@ ENTRY(__guest_enter) // Do not touch any register after this! eret + sb ENDPROC(__guest_enter) ENTRY(__guest_exit) |