1
0
Fork 0
mirror of https://gitlab.com/sortix/sortix.git synced 2023-02-13 20:55:38 -05:00
sortix--sortix/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
crtn.S
interrupt.S Fix x86 Alignment Check and Security Exception handlers. 2016-01-07 19:17:04 +01:00
kthread.S
memorymanagement.cpp Initialize paging before KernelInit. 2015-08-21 21:25:00 +02:00
memorymanagement.h
syscall.S Clear registers after system calls. 2015-08-26 16:29:18 +02:00