Stack_seal_mitigation: Secure harden the Main Stack Pointer (MSP)
Seal the MSP_S for both IPC mode and Library mode with the recommended
stack seal value during runtime. Check the comments in the header
file for more details.
Change-Id: Icc36f318d5416aa2c3df8b4d647d892caddd20c3
Signed-off-by: Ken Liu <ken.liu@arm.com>
diff --git a/secure_fw/spm/cmsis_func/main.c b/secure_fw/spm/cmsis_func/main.c
index f22dfbf..920d0f5 100644
--- a/secure_fw/spm/cmsis_func/main.c
+++ b/secure_fw/spm/cmsis_func/main.c
@@ -120,8 +120,9 @@
int main(void)
{
/* set Main Stack Pointer limit */
- tfm_arch_set_msplim((uint32_t)®ION_NAME(Image$$, ARM_LIB_STACK_MSP,
- $$ZI$$Base));
+ tfm_arch_init_secure_msp((uint32_t)®ION_NAME(Image$$,
+ ARM_LIB_STACK_MSP,
+ $$ZI$$Base));
if (tfm_core_init() != TFM_SUCCESS) {
tfm_core_panic();