aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Liu <ken.liu@arm.com>2020-07-25 22:58:00 +0800
committerSoby Mathew <soby.mathew@arm.com>2020-09-30 18:07:06 +0100
commit275f9dde43df710f46f8280988f4135bbee3b57f (patch)
tree4a8d77c2d4b3a54e8f0be73e86d14e5634ea5dc6
parent248690474506f6abdab7497ab9e1aa5bbbad59d1 (diff)
downloadtrusted-firmware-m-TF-Mv1.1-stack-seal-mitigation.tar.gz
SPM: Add a panic after NS jumpingTF-Mv1.1-stack-seal-mitigation
In general the NS jumping should never return. Add a panic after jump in case a failed jumping would run to random places. Change-Id: I55106d2f9168518b491cc00ddd9bb2b3c771618b Signed-off-by: Ken Liu <ken.liu@arm.com>
-rw-r--r--secure_fw/spm/runtime/tfm_spm_services.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/secure_fw/spm/runtime/tfm_spm_services.c b/secure_fw/spm/runtime/tfm_spm_services.c
index 25c65141b..63d88e009 100644
--- a/secure_fw/spm/runtime/tfm_spm_services.c
+++ b/secure_fw/spm/runtime/tfm_spm_services.c
@@ -21,6 +21,8 @@ void jump_to_ns_code(void)
{
/* Calls the non-secure Reset_Handler to jump to the non-secure binary */
ns_entry();
+
+ tfm_core_panic();
}
__attribute__((naked))