tests/kernel/mem_protect/stackprot failure in frdm_k64f due to limited privilege stack size #13783
Labels
area: ARM
ARM (32-bit) Architecture
area: Memory Protection
bug
The issue is a bug, or the PR is fixing a bug
priority: medium
Medium impact/importance bug
Describe the bug
stackprot test does not run properly on frdm_k64f, triggering a BusFault
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Test should pass.
Logs
Additional context
The test started failing after (45631c3). This commit forced the test to run on user mode. Alone, this is not a reason for the test to fail, but:
CONFIG_STACK_CANARIES=y
, which, forces the compiler to embed more stuff into the stack frame(s).Therefore, we are running out of privileged stack space, when re-programming the MPU, which causes a BusFault on accessing the Guard area.
Workaround:
Setting
CONFIG_PRIVILEGED_STACK_SIZE=1024
makes the test pass.While we do need to decrease the stack usage of MPU re-programming in ARM builds with User-mode, I believe, it is ok to have an increased size for privileged stack areas, when compiling with support for CANARIES, since, itself, that feature adds to the stack usage. That is, I propose:
The text was updated successfully, but these errors were encountered: