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_psa/spm_ipc.c b/secure_fw/spm/cmsis_psa/spm_ipc.c
index 66626c9..deebf3d 100644
--- a/secure_fw/spm/cmsis_psa/spm_ipc.c
+++ b/secure_fw/spm/cmsis_psa/spm_ipc.c
@@ -941,7 +941,7 @@
*/
stacked_ctx_pos = (uintptr_t)p_ctx +
sizeof(struct tfm_state_context_t) +
- TFM_VENEER_STACK_GUARD_SIZE;
+ TFM_STACK_SEALED_SIZE;
if (is_stack_alloc_fp_space(exc_return)) {
#if defined (__FPU_USED) && (__FPU_USED == 1U)