sortix-mirror/kernel/x64
Jonas 'Sortie' Termansen 2e3d7c45af Add paging no-execute and write protection support.
Enable the NX bit on x86_64 and set if not PROT_EXEC and enable the write
protection mode (CR0.WP) that disables the default behavior where the kernel
is able to write to read-only memory. Fix kernel broken assumptions it can
access read-only memory and take care to never set PROT_KWRITE on user-space
pages unless PROT_WRITE is also set, otherwise user-space will be able to
write to read-only memory.

This achieves X^W in the whole system except for the core kernel itself as
it is currently don't know the purpose of pages when identity mapping the
first 4 MiB.
2016-01-25 17:39:57 +01:00
..
boot.S Add paging no-execute and write protection support. 2016-01-25 17:39:57 +01:00
crti.S Preprocess assembly files with the C preprocessor. 2014-03-01 14:37:40 +01:00
crtn.S Preprocess assembly files with the C preprocessor. 2014-03-01 14:37:40 +01:00
interrupt.S Fix x86 Alignment Check and Security Exception handlers. 2016-01-07 19:17:04 +01:00
kthread.S Preprocess assembly files with the C preprocessor. 2014-03-01 14:37:40 +01:00
memorymanagement.cpp Initialize paging before KernelInit. 2015-08-21 21:25:00 +02:00
memorymanagement.h Update kernel memory management to current coding conventions. 2014-03-01 14:37:40 +01:00
syscall.S Clear registers after system calls. 2015-08-26 16:29:18 +02:00