arm-trusted-firmware/make_helpers
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
..
tbbr Replace fip_create with fiptool 2016-07-29 10:38:46 +01:00
build_env.mk Fix incorrect copyright notices 2016-12-14 14:31:32 +00:00
build_macros.mk Introduce locking primitives using CAS instruction 2017-02-14 09:26:11 +00:00
cygwin.mk Make:Allow for extension in tool names. 2016-04-01 12:33:09 +01:00
defaults.mk Add support for GCC stack protection 2017-03-31 13:58:48 +01:00
msys.mk Make:Allow for extension in tool names. 2016-04-01 12:33:09 +01:00
plat_helpers.mk Make:Remove calls to shell from makefiles. 2016-04-01 12:33:09 +01:00
unix.mk Make:Make shell commands more portable 2016-04-01 12:33:09 +01:00
windows.mk Build: exclude -c flag from TF_CFLAGS 2017-01-05 11:25:13 +09:00