zephyr/tests/kernel/mem_protect/userspace
Stephen Smalley e3fe3ebb3f tests/kernel/mem_protect/userspace: test access to other thread stack
Add tests of the ability to read or write the stack of another thread.
Use semaphores for explicit synchronization of the start and end of the
other thread to ensure that the attempted stack access occurs while the
thread is alive.  This ensures that the MMU/MPU has been configured at
least once to allow userspace access to the stack, and that any
removal of access upon thread termination has not yet occurred.  This
therefore should exercise changing the MMU/MPU configuration to remove
access to the other thread's stack when switching back to our
thread.

Tested on qemu_x86 (pass) and on frdm_k64f (with and without the ARM
userspace patches; with them, the tests pass; without, they fail as
expected).  Also, as with most of the other tests, if you replace
ztest_user_unit_test() with ztest_unit_test(), then the tests fail as
expected.

Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2017-12-14 09:08:19 -08:00
..
src tests/kernel/mem_protect/userspace: test access to other thread stack 2017-12-14 09:08:19 -08:00
CMakeLists.txt tests/kernel/mem_protect/userspace: Add userspace protection tests 2017-11-28 12:29:13 -05:00
prj.conf tests/kernel/mem_protect/userspace: Add userspace protection tests 2017-11-28 12:29:13 -05:00
testcase.yaml tests/samples: fixed yaml syntax 2017-12-11 14:47:08 -05:00