boot/arm-trusted-firmware: add SSP option
authorSergey Matyukevich <geomatsi@gmail.com>
Fri, 25 Jun 2021 19:33:14 +0000 (22:33 +0300)
committerYann E. MORIN <yann.morin.1998@free.fr>
Sat, 26 Jun 2021 15:10:25 +0000 (17:10 +0200)
commitcf176128ec4ad60c29c8828cab1887f69edb9473
tree5d6f18aa12d36c282658e76c6ef71d39b47a3c1c
parent78f477d1367a3f1a557d5d780051e4163c4aa3e3
boot/arm-trusted-firmware: add SSP option

Buildroot sets appropriate ENABLE_STACK_PROTECTOR build flag value based
on the toolchain global BR2_SSP_* options, and all packages are built
with that setting.

However it might not be always convenient to automatically infer TF-A
stack protection from the toolchain features. For instance, secure
memory constraints may become an issue and all the extra TF-A features
need to be tuned or disabled in order to shrink TF-A firmware image.

Besides, for any value other than "none", TF-A platform specific hook
'plat_get_stack_protector_canary' must be implemented. However this hook
is not implemented by all the platforms supported by TF-A. For instance,
Allwinner currently does not provide such a hook.

Add an new option that a user can toggle to enable or disable SSP in
their ATF build. If enabled, the SSP level is automatically inherited
from the global setting.

Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
[yann.morin.1998@free.fr: simplify logic with a single boolean]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
boot/arm-trusted-firmware/Config.in
boot/arm-trusted-firmware/arm-trusted-firmware.mk