Core: Manipulate clients connection handle
The 'psa_handle_t' allocated inside SPM for working is a secure
memory, returning this value to clients exposes secure memory
information. Manipulate this psa_handle_t before returning to
clients in 'psa_connect' and covert it back at 'psa_call' and
'psa_close' entry for further working. This avoids exposing
secure memory to clients directly.
Change-Id: I08af9d016db518b52e31dc4153610267fccc7760
Signed-off-by: Summer Qin <summer.qin@arm.com>
diff --git a/secure_fw/spm/spm_api.h b/secure_fw/spm/spm_api.h
index 6162b2e..fa0a02d 100644
--- a/secure_fw/spm/spm_api.h
+++ b/secure_fw/spm/spm_api.h
@@ -956,6 +956,11 @@
*/
void tfm_spm_psa_panic(void);
+/**
+ * \brief Converts a user handle into a corresponded handle instance.
+ */
+struct tfm_conn_handle_t *tfm_spm_to_handle_instance(psa_handle_t user_handle);
+
#endif /* defined(TFM_PSA_API) */
#endif /*__SPM_API_H__ */