Hello !
I have FreeRTOS tasks on non secure side what running with user privileges.
Sometimes the should use cmse_nonsecure_entry calls to secure side and it is not so clear with what privilege this call appears on secure side.
I think call with user privilege on nonsecure side should be with user privilege on secure side as well.
Or some escalation of privileges can happens or can be done ?
Regards,
Eugene
Hi,
Please check the following link and let me know if this helps,
Have a great day,
Sol
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hi soledad !
It is non clear set anywhere. But let's assume MPU configured on secure side and some code/data privileged and some are not.
Does privilege on nonsecure side call have effect for privileges protection on secure side ?
Or any call via NSC ares are privileged automatically ?
Regards,
Eugene
I think you can do something like:
#include <arm_cmse.h> void __attribute__((cmse_nonsecure_entry)) entry_func(int val) { int state = cmse_nonsecure_caller(); if (state) { // called from non-secure // do non-secure work ... } else { // called from within secure // do secure work ... } }
Hi !
I mean if NS side call CMSE functions with user or privileged rights.
I can't call NS printf from rtos task with user privileges.
So what is caller rights for call function via NSC ?
Should caller on NS side be privileged or nonprivileged is also OK ?
Regards,
Eugene