sortix-mirror/kernel/x86-family
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
..
cmos.cpp Optimize reading the CMOS real time clock. 2014-11-25 19:42:28 +01:00
cmos.h Rename Sortix kernel directory to kernel. 2014-03-01 14:37:39 +01:00
float.cpp Refactor kernel interrupt and thread register support. 2014-11-18 20:33:21 +01:00
float.h Refactor kernel interrupt and thread register support. 2014-11-18 20:33:21 +01:00
gdt.cpp Remove __BEGIN_DECLS and __END_DECLS. 2015-08-26 14:52:44 +02:00
gdt.h Initialize the GDT in the bootstrap assembly. 2015-08-21 21:25:00 +02:00
idt.cpp Implement signals. 2014-07-22 13:25:39 +02:00
idt.h Refactor i386 and x86_64 interrupt support. 2014-03-17 19:22:13 +01:00
interrupt.cpp Refactor interrupt handler registration. 2014-12-02 21:30:39 +01:00
ioport.cpp Fix PCI code. 2015-02-08 22:58:32 +01:00
memorymanagement.cpp Add paging no-execute and write protection support. 2016-01-25 17:39:57 +01:00
memorymanagement.h Add paging no-execute and write protection support. 2016-01-25 17:39:57 +01:00
mtrr.cpp Refactor kernel PAT, MTRR, and MSR usage. 2014-03-17 19:22:13 +01:00
pat.cpp Refactor kernel PAT, MTRR, and MSR usage. 2014-03-17 19:22:13 +01:00
pic.cpp Relocate kernel IO port functions to <sortix/kernel/ioport.h>. 2014-11-18 18:10:22 +01:00
pic.h Refactor i386 and x86_64 interrupt support. 2014-03-17 19:22:13 +01:00
ps2.cpp Add PS/2 controller driver. 2016-01-23 00:50:53 +01:00
ps2.h Add PS/2 controller driver. 2016-01-23 00:50:53 +01:00
time.cpp Implement CLOCK_THREAD_CPUTIME_ID and CLOCK_THREAD_SYSTIME_ID. 2016-01-09 02:28:44 +01:00
x86-family.cpp Initialize system call table at compile time. 2014-12-03 14:19:49 +01:00