]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: entry: Place an SB sequence following an ERET instruction
authorWill Deacon <will.deacon@arm.com>
Thu, 14 Jun 2018 10:23:38 +0000 (11:23 +0100)
committerWill Deacon <will.deacon@arm.com>
Thu, 6 Dec 2018 16:47:05 +0000 (16:47 +0000)
commit6099cf8f82dcc64aa92697a7f4eebe78a4fa8e1f
tree99b7df12e3d5dbdb4d14cd0fe317b643ee7a1444
parentfb4f76251f9c73d646865605d5c49c7120e3ff74
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>
arch/arm64/kernel/entry.S
arch/arm64/kvm/hyp/entry.S
arch/arm64/kvm/hyp/hyp-entry.S