zephyr/include/arch
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
..
arc cleanup: rename fiber/task -> thread 2017-10-30 18:41:15 -04:00
arm kernel: Add option to ensure writable pages are not executable 2017-11-02 13:40:50 -07:00
nios2 nios2: asm_inline_gcc: fix includes 2017-11-02 13:25:01 -07:00
riscv32 k_thread_abort(): assert if abort essential thread 2017-09-07 16:35:16 -07:00
x86 x86: apic: don't include headers we don't need 2017-11-02 13:25:01 -07:00
xtensa k_thread_abort(): assert if abort essential thread 2017-09-07 16:35:16 -07:00
cpu.h Xtensa port: Added support in arch/cpu.h for Xtensa cores. 2017-02-13 08:04:27 -08:00