Please sign in to comment.
arch: arm: userspace: don't use the default stack in z_arm_do_syscall
z_arm_do_syscall is executing in privileged mode. This implies that we shall not be allowed to use the thread's default unprivileged stack, (i.e push to or pop from it), to avoid any possible stack corruptions. Note that since we execute in PRIV mode and no MPU guard or PSPLIM register is guarding the end of the default stack, we won't be able to detect any stack overflows. This commit implement the above change, by forcing z_arm_do_syscall() to FIRST switch to privileged stack and then do all the preparations to execute the system call. Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
- Loading branch information...