sortix--sortix/kernel
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
..
fs
gpu/bga
include/sortix
kb
mouse
net
x64 Add paging no-execute and write protection support. 2016-01-25 17:39:57 +01:00
x86 Add paging no-execute and write protection support. 2016-01-25 17:39:57 +01:00
x86-family Add paging no-execute and write protection support. 2016-01-25 17:39:57 +01:00
.gitignore
Makefile
addralloc.cpp
alarm.cpp
ata.cpp
ata.h
clock.cpp
com.cpp
com.h
copy.cpp
crc32.cpp
debugger.cpp
descriptor.cpp
dtable.cpp
elf.cpp Add paging no-execute and write protection support. 2016-01-25 17:39:57 +01:00
end.cpp
fcache.cpp
fsfunc.cpp
hostname.cpp
identity.cpp
initrd.cpp Add paging no-execute and write protection support. 2016-01-25 17:39:57 +01:00
initrd.h
inode.cpp
interlock.cpp
interrupt.cpp
io.cpp
ioctx.cpp
kernel.cpp
kernelinfo.cpp
kthread.cpp
lfbtextbuffer.cpp
lfbtextbuffer.h
linebuffer.cpp
linebuffer.h
log.cpp
logterminal.cpp
logterminal.h
memorymanagement.cpp Add paging no-execute and write protection support. 2016-01-25 17:39:57 +01:00
mtable.cpp
multiboot.h
op-new.cpp
panic.cpp
partition.cpp
partition.h
pci-mmio.cpp
pci.cpp
pipe.cpp
poll.cpp
process.cpp Add paging no-execute and write protection support. 2016-01-25 17:39:57 +01:00
psctl.cpp
ptable.cpp
random.cpp
refcount.cpp
registers.cpp
resource.cpp
scheduler.cpp
segment.cpp
signal.cpp
sockopt.cpp
string.cpp
symbol.cpp
syscall.cpp
textbuffer.cpp
textterminal.cpp
textterminal.h
thread.cpp
time.cpp
timer.cpp
uart.cpp
uart.h
user-timer.cpp
vga.cpp
vga.h
vgafont.f16
vgatextbuffer.cpp
vgatextbuffer.h
video.cpp
vnode.cpp
worker.cpp