zephyr/arch/arm
Leandro Pereira b007b64d30 kernel: Add option to ensure writable pages are not executable
This adds CONFIG_EXECUTE_XOR_WRITE, which is enabled by default on
systems that support controlling whether a page can contain executable
code.  This is also known as W^X[1].

Trying to add a memory domain with a page that is both executable and
writable, either for supervisor mode threads, or for user mode threads,
will result in a kernel panic.

There are few cases where a writable page should also be executable
(JIT compilers, which are most likely out of scope for Zephyr), so an
option is provided to disable the check.

Since the memory domain APIs are executed in supervisor mode, a
determined person could bypass these checks with ease.  This is seen
more as a way to avoid people shooting themselves in the foot.

[1] https://en.wikipedia.org/wiki/W%5EX

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-11-02 13:40:50 -07:00
..
core kernel: Add option to ensure writable pages are not executable 2017-11-02 13:40:50 -07:00
include doc: Fix misspellings in header/doxygen comments 2017-10-17 19:40:29 -04:00
soc drivers: Rename random to entropy 2017-11-01 08:26:29 -04:00
defconfig arm: systick: Some SoCs do not have systick 2016-11-27 19:39:26 +00:00
Kbuild soc: arm: add Makefiles one level up 2016-04-22 21:33:26 +00:00
Kconfig license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
Makefile build: move qemu definitions to boards 2017-01-10 20:20:47 +00:00