arch: arm: cortex_r: Do not use user stack in svc/isr modes
The user thread cannot be trusted so do not use the stack pointer it passes in. Use the thread's privilege stack when in privileged modes to make sure a user thread does not trick the svc/isr handlers into writing to memory it should not. Signed-off-by: Bradley Bolen <bbolen@lexmark.com>
This commit is contained in:
parent
e0bed3b989
commit
65dcab81d0
8 changed files with 183 additions and 68 deletions
|
@ -121,6 +121,10 @@ struct _thread_arch {
|
|||
|
||||
#if defined(CONFIG_USERSPACE)
|
||||
uint32_t priv_stack_start;
|
||||
#if defined(CONFIG_CPU_CORTEX_R)
|
||||
uint32_t priv_stack_end;
|
||||
uint32_t sp_usr;
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue