arm-trusted-firmware/lib
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
..
aarch32 Replace ASM signed tests with unsigned 2017-03-20 10:38:43 +00:00
aarch64 Replace ASM signed tests with unsigned 2017-03-20 10:38:43 +00:00
cpus Merge pull request #870 from douglas-raillard-arm/dr/remove_asm_signed_test 2017-03-29 09:58:20 +01:00
el3_runtime Replace some memset call by zeromem 2017-02-06 17:01:39 +00:00
libfdt libfdt: Replace v1.4.1 by v1.4.2 2017-01-16 17:26:04 +00:00
locks AArch32: Fix normal memory bakery compilation 2017-03-02 15:43:17 +00:00
pmf Add Performance Measurement Framework(PMF) 2016-06-16 08:31:42 +01:00
psci PSCI: Optimize call paths if all participants are cache-coherent 2017-03-02 11:00:20 +00:00
semihosting AArch32: Common changes needed for BL1/BL2 2016-09-21 16:27:15 +01:00
stack_protector Add support for GCC stack protection 2017-03-31 13:58:48 +01:00
stdlib stdlib: Import timingsafe_bcmp() from FreeBSD 2017-01-24 14:42:12 +00:00
xlat_tables Add support to change xlat_tables to non-cacheable 2017-03-28 10:32:17 +01:00
xlat_tables_v2 Add support to change xlat_tables to non-cacheable 2017-03-28 10:32:17 +01:00