arm-trusted-firmware/plat
Anthony Steinhauser f461fe346b Prevent speculative execution past ERET
Even though ERET always causes a jump to another address, aarch64 CPUs
speculatively execute following instructions as if the ERET
instruction was not a jump instruction.
The speculative execution does not cross privilege-levels (to the jump
target as one would expect), but it continues on the kernel privilege
level as if the ERET instruction did not change the control flow -
thus execution anything that is accidentally linked after the ERET
instruction. Later, the results of this speculative execution are
always architecturally discarded, however they can leak data using
microarchitectural side channels. This speculative execution is very
reliable (seems to be unconditional) and it manages to complete even
relatively performance-heavy operations (e.g. multiple dependent
fetches from uncached memory).

This was fixed in Linux, FreeBSD, OpenBSD and Optee OS:
679db70801
29fb48ace4
3a08873ece
abfd092aa1

It is demonstrated in a SafeSide example:
https://github.com/google/safeside/blob/master/demos/eret_hvc_smc_wrapper.cc
https://github.com/google/safeside/blob/master/kernel_modules/kmod_eret_hvc_smc/eret_hvc_smc_module.c

Signed-off-by: Anthony Steinhauser <asteinhauser@google.com>
Change-Id: Iead39b0b9fb4b8d8b5609daaa8be81497ba63a0f
2020-01-22 21:42:51 +00:00
..
allwinner allwinner: Clean up MMU setup 2020-01-20 22:47:20 +00:00
amlogic Merge changes from topic "amlogic-g12a" into integration 2019-09-27 09:53:40 +00:00
arm Merge "Unify type of "cpu_idx" across PSCI module." into integration 2020-01-10 19:39:17 +00:00
common Merge "Unify type of "cpu_idx" across PSCI module." into integration 2020-01-10 19:39:17 +00:00
hisilicon hikey: fix to load FIP by partition table. 2019-09-18 18:18:57 +08:00
imx Merge changes Ib1ed9786,I6c4855c8 into integration 2020-01-21 09:06:47 +00:00
intel/soc Merge "plat: intel: Fix UEFI decompression issue" into integration 2020-01-15 16:11:56 +00:00
layerscape Enable -Wshadow always 2019-11-19 08:53:16 -06:00
marvell a8k: Implement platform specific power off 2020-01-15 07:31:43 +01:00
mediatek Remove redundant declarations. 2020-01-08 18:00:25 -06:00
nvidia/tegra Tegra194: platform handler for entering CPU standby state 2020-01-17 10:31:54 +00:00
qemu qemu/qemu_sbsa: Adding memory mapping for both FLASH0/FLASH1 2019-10-01 17:24:06 +02:00
renesas/rcar Prevent speculative execution past ERET 2020-01-22 21:42:51 +00:00
rockchip Remove redundant declarations. 2020-01-08 18:00:25 -06:00
rpi Merge "rpi3/4: Add support for offlining CPUs" into integration 2020-01-20 22:16:43 +00:00
socionext Merge "uniphier: call uniphier_scp_is_running() only when on-chip STM is supported" into integration 2020-01-14 22:00:41 +00:00
st stm32mp1: Add support for SPI-NOR boot device 2020-01-20 11:32:59 +01:00
ti/k3 ti: k3: common: Add PIE support 2019-10-29 14:27:11 +00:00
xilinx plat: xilinx: Move pm_client.h to common directory 2020-01-15 11:04:15 -08:00