Commit Graph

2051 Commits

Author SHA1 Message Date
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
Jonas 'Sortie' Termansen c8bbd6e0aa Restore terminal when games quit. 2016-01-25 16:30:43 +01:00
Jonas 'Sortie' Termansen bff1265d62 Add termios(2). 2016-01-25 15:47:40 +01:00
Jonas 'Sortie' Termansen 8f233b4a10 Add console backspace bold and underline support.
Combine textbuffer char and attr concepts while here.
2016-01-23 01:02:50 +01:00
Jonas 'Sortie' Termansen 9297ff2a20 Add PS/2 mouse driver. 2016-01-23 00:50:53 +01:00
Jonas 'Sortie' Termansen 306709fc4a Add PS/2 controller driver. 2016-01-23 00:50:53 +01:00
Meisaka Yukara 3d48c7f658 Fix firing of absolute clocks. 2016-01-22 21:17:05 +01:00
Jonas 'Sortie' Termansen dbe6b32b1f Fix scanf integer parsing. 2016-01-22 20:01:33 +01:00
Jonas 'Sortie' Termansen 2e9153cdb9 Fix inet_addr and inet_ntoa not being part of _SORTIX_SOURCE. 2016-01-22 20:01:33 +01:00
Jonas 'Sortie' Termansen dc07435002 Fix closefrom(2) infinite loop. 2016-01-22 20:01:32 +01:00
Jonas 'Sortie' Termansen 9a59ef2313 Fix select(2) conformance issues. 2016-01-22 20:01:32 +01:00
Jonas 'Sortie' Termansen b2f78fb4e1 Fix trianglix buffer underflow. 2016-01-22 20:01:32 +01:00
Jonas 'Sortie' Termansen fbfe159046 Add crypt_checkpass(3) and crypt_newhash(3). 2016-01-09 02:54:51 +01:00
Jonas 'Sortie' Termansen 53711549af Add bcrypt_checkhash(3) and bcrypt_newhash(3). 2016-01-09 02:54:51 +01:00
Jonas 'Sortie' Termansen ff8b2be515 Implement CLOCK_THREAD_CPUTIME_ID and CLOCK_THREAD_SYSTIME_ID. 2016-01-09 02:28:44 +01:00
Jonas 'Sortie' Termansen af9cc8ed05 Schedule full console redraw after user-space framebuffer write. 2016-01-08 19:56:11 +01:00
Jonas 'Sortie' Termansen dad5c57f33 Allow bootloader bitmap framebuffer modesetting. 2016-01-08 19:56:11 +01:00
Jonas 'Sortie' Termansen 8c7c6fa59f Center ascii cat on boot. 2016-01-08 19:56:11 +01:00
Jonas 'Sortie' Termansen f58c70d081 Init keyboard layout from /etc/kblayout. 2016-01-08 18:47:30 +01:00
Jonas 'Sortie' Termansen 9d3aecfa07 Work around sync on close bottleneck. 2016-01-08 01:25:10 +01:00
Jonas 'Sortie' Termansen 74fe008001 Silence static analysis warnings. 2016-01-08 00:48:01 +01:00
Jonas 'Sortie' Termansen f3e3c98084 Fix ls realloc loop. 2016-01-08 00:47:14 +01:00
Jonas 'Sortie' Termansen 8b52c0d818 Fix wrong type in calloc sizeof. 2016-01-08 00:46:44 +01:00
Jonas 'Sortie' Termansen a45b93785c Fix program loading bugs. 2016-01-08 00:41:20 +01:00
Jonas 'Sortie' Termansen 48c6ccdf06 Fix MapPCIBAR potential overflow. 2016-01-08 00:39:13 +01:00
Jonas 'Sortie' Termansen 055f502c02 Fix dup3(2) O_CLOEXEC and O_CLOFORK handling. 2016-01-08 00:36:14 +01:00
Jonas 'Sortie' Termansen ee9ec2eda1 Add aquatinspitz support to trianglix. 2016-01-07 20:47:36 +01:00
Jonas 'Sortie' Termansen 0eeb9d1e56 Fix pow and powf undefined behavior in libm. 2016-01-07 19:17:04 +01:00
Jonas 'Sortie' Termansen a43c89650f Fix typo in porting guide. 2016-01-07 19:17:04 +01:00
Jonas 'Sortie' Termansen fad73ab3e1 Fix broken unknown short option reporting. 2016-01-07 19:17:04 +01:00
Jonas 'Sortie' Termansen ffe59b9c7c Fix mbrtowc decoding surrogates. 2016-01-07 19:17:04 +01:00
Jonas 'Sortie' Termansen 8fabfc5f7b Fix kernel console rendering U+007F. 2016-01-07 19:17:04 +01:00
Jonas 'Sortie' Termansen 3e068bc88f Fix x86 Alignment Check and Security Exception handlers.
The processor pushes an error code when delivering these exception.

Discovered by Alexandros Alexandrou.
2016-01-07 19:17:04 +01:00
Jonas 'Sortie' Termansen e3e32ca3cf Fix linecount target being out of sync. 2016-01-07 19:17:04 +01:00
Jonas 'Sortie' Termansen 7a3b4f06c5 Fix trianglix file creation permissions. 2016-01-07 19:17:04 +01:00
Jonas 'Sortie' Termansen 8f1353eb94 Fix getaddrinfo error reporting. 2016-01-07 19:08:43 +01:00
Jonas 'Sortie' Termansen 22351d7f72 Fix untimely delivery of signals during userfs reference count messages. 2016-01-07 19:08:43 +01:00
Jonas 'Sortie' Termansen 8e86952abf Add aquatinspitz(1). 2016-01-07 17:22:35 +01:00
Jonas 'Sortie' Termansen 559857b97e Fix features.h inclusions not yet changed to sys/cdefs.h. 2015-12-23 17:49:59 +01:00
Jonas 'Sortie' Termansen 1e7bbace90 Fix uninitialized variable in chvideomode option parsing. 2015-12-23 17:22:41 +01:00
Jonas 'Sortie' Termansen 8274981a81 Add chkblayout(1). 2015-12-19 02:49:37 +01:00
Jonas 'Sortie' Termansen f60b2c6ec4 Add keyboard layout support to kernel. 2015-12-19 02:44:15 +01:00
Jonas 'Sortie' Termansen 98ed222c8e Add keyboard layout collection. 2015-12-19 02:21:15 +01:00
Jonas 'Sortie' Termansen 7da84494ab Add kblayout-compiler(1). 2015-12-19 02:21:15 +01:00
Jonas 'Sortie' Termansen 02f95d6c1c Add in6addr_any and in6addr_loopback. 2015-12-18 01:34:37 +01:00
Jonas 'Sortie' Termansen 610b60fa0d Import public domain <netinet/in.h> macros from musl. 2015-12-18 01:24:42 +01:00
Jonas 'Sortie' Termansen 75808c637d Add regex(3). 2015-12-17 23:32:43 +01:00
Jonas 'Sortie' Termansen 5a3e181975 Add stack smash protection support. 2015-12-12 22:53:07 +01:00
Jonas 'Sortie' Termansen 9b6d60d9d2 Add undefined behavior sanitizer support. 2015-12-12 22:53:07 +01:00
Jonas 'Sortie' Termansen 4b6b06bbc8 Add scram(2). 2015-12-12 22:53:07 +01:00