arm-trusted-firmware/bl32/tsp
Douglas Raillard 51faada71a Add support for GCC stack protection
Introduce new build option ENABLE_STACK_PROTECTOR. It enables
compilation of all BL images with one of the GCC -fstack-protector-*
options.

A new platform function plat_get_stack_protector_canary() is introduced.
It returns a value that is used to initialize the canary for stack
corruption detection. Returning a random value will prevent an attacker
from predicting the value and greatly increase the effectiveness of the
protection.

A message is printed at the ERROR level when a stack corruption is
detected.

To be effective, the global data must be stored at an address
lower than the base of the stacks. Failure to do so would allow an
attacker to overwrite the canary as part of an attack which would void
the protection.

FVP implementation of plat_get_stack_protector_canary is weak as
there is no real source of entropy on the FVP. It therefore relies on a
timer's value, which could be predictable.

Change-Id: Icaaee96392733b721fa7c86a81d03660d3c1bc06
Signed-off-by: Douglas Raillard <douglas.raillard@arm.com>
2017-03-31 13:58:48 +01:00
..
aarch64 Add support for GCC stack protection 2017-03-31 13:58:48 +01:00
tsp.ld.S Introduce unified API to zero memory 2017-02-06 17:01:39 +00:00
tsp.mk Move spinlock library code to AArch64 folder 2016-08-09 17:33:57 +01:00
tsp_interrupt.c Enable use of FIQs and IRQs as TSP interrupts 2015-12-04 12:02:12 +00:00
tsp_main.c Abort preempted TSP STD SMC after PSCI CPU suspend 2016-12-23 10:46:32 +00:00
tsp_private.h Enable use of FIQs and IRQs as TSP interrupts 2015-12-04 12:02:12 +00:00
tsp_timer.c PSCI: Migrate SPDs and TSP to the new platform and framework API 2015-08-13 23:48:07 +01:00