mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
arm64:place an SB sequence following an ERET instruction
Some CPUs(eg: ampere-emag) 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. Signed-off-by: Bin Lu <bin.lu@arm.com>
This commit is contained in:
@@ -27,7 +27,9 @@
|
||||
|
||||
// ERET returns using the ELR and SPSR for the current exception level.
|
||||
#define ERET() \
|
||||
WORD $0xd69f03e0
|
||||
WORD $0xd69f03e0; \
|
||||
DSB $7; \
|
||||
ISB $15;
|
||||
|
||||
// RSV_REG is a register that holds el1 information temporarily.
|
||||
#define RSV_REG R18_PLATFORM
|
||||
|
||||
Reference in New Issue
Block a user