Commit graph

209 commits

Author SHA1 Message Date
Jonas 'Sortie' Termansen
7c6e6ef317 Fix kernel string copy from user-space. 2015-10-09 16:17:52 +02:00
Jonas 'Sortie' Termansen
2727d9fb50 Fix pipe destruction race condition. 2015-10-09 16:17:52 +02:00
Jonas 'Sortie' Termansen
12b5044bc7 Fix signal delivery during context switch. 2015-10-09 16:17:52 +02:00
Jonas 'Sortie' Termansen
875ce1adf7 Fix faccessat(2) not reporting correct permissions. 2015-10-01 22:50:51 +02:00
Jonas 'Sortie' Termansen
4c2a93ea02 Fix munmap(2) shrink from right logic.
This fixes a rather nasty issue where gcc's garbage collection triggered a
munmap call with the effect that it began unmapping huge amounts of kernel
data until the system triple faulted.
2015-10-01 22:50:51 +02:00
Jonas 'Sortie' Termansen
40c2fd12dc Fix logterminal TERMMODE_UNICODE checking. 2015-10-01 22:49:02 +02:00
Jonas 'Sortie' Termansen
6725972e11 Fix LinkInodeInDir return value.
The callers expected it to return an int different than 0 on failure. The
link method returns different than 0 on failure. This actually worked by
lucky coincidence. Change the return type to int and 0 on success, and -1
on failure per popular demand.

Thanks to Meisaka Yukara for spotting this.
2015-09-25 15:01:20 +02:00
Jonas 'Sortie' Termansen
275541383c Fix dtable return value type errors and missing input validation.
Update to current coding conventions while here.

Thanks to Meisaka Yukara for spotting the return value type errors.
2015-09-25 15:01:20 +02:00
Jonas 'Sortie' Termansen
3501b1e701 Fix console margin not having color of nearest neighbour. 2015-09-25 15:01:19 +02:00
Jonas 'Sortie' Termansen
ac6f016748 Fix partition reads and writes at end. 2015-09-25 14:59:04 +02:00
Jonas 'Sortie' Termansen
6813a26196 Fix box drawing character ninth column rendering. 2015-09-25 14:59:04 +02:00
Jonas 'Sortie' Termansen
73a182f80c Add interface to get 32-bit pages. 2015-08-28 15:24:54 +02:00
Jonas 'Sortie' Termansen
eb11613da6 Add interface to wait for IO port changes. 2015-08-28 15:24:54 +02:00
Jonas 'Sortie' Termansen
39d8894fc0 Write newline when closing the kernel debugger. 2015-08-27 22:12:45 +02:00
Jonas 'Sortie' Termansen
34a832dbf3 Add tcgetblob and statvfs support to kramfs. 2015-08-26 23:12:45 +02:00
Jonas 'Sortie' Termansen
ae1ed0c13c Replace strtok_r uses with strsep. 2015-08-26 17:49:28 +02:00
Jonas 'Sortie' Termansen
0fc3d70716 Clear registers after system calls. 2015-08-26 16:29:18 +02:00
Jonas 'Sortie' Termansen
a79aeed0c1 Remove __BEGIN_DECLS and __END_DECLS. 2015-08-26 14:52:44 +02:00
Jonas 'Sortie' Termansen
5915e2cd14 Add closefrom(2). 2015-08-26 14:01:25 +02:00
Jonas 'Sortie' Termansen
aa09f8cecc Simplify kernel PrepareLookup. 2015-08-22 01:29:38 +02:00
Jonas 'Sortie' Termansen
75cf34cb8e Add random device. 2015-08-22 01:04:58 +02:00
Jonas 'Sortie' Termansen
6405e2ea6e Add arc4random support to the kernel. 2015-08-22 01:04:58 +02:00
Jonas 'Sortie' Termansen
20698b35c7 Refactor kernel log. 2015-08-21 21:25:01 +02:00
Jonas 'Sortie' Termansen
77467b7768 Detect physical memory before initializing the kernel log. 2015-08-21 21:25:00 +02:00
Jonas 'Sortie' Termansen
218875eb79 Initialize paging before KernelInit. 2015-08-21 21:25:00 +02:00
Jonas 'Sortie' Termansen
a422c394b8 Initialize the GDT in the bootstrap assembly. 2015-08-21 21:25:00 +02:00
Jonas 'Sortie' Termansen
cf55531aae Make nfds_t size_t. 2015-08-21 21:25:00 +02:00
Jonas 'Sortie' Termansen
ef45218660 Add S_ISGID and S_ISUID.
I originally left them out because Sortix doesn't have setuid and setgid
executable support, but this created considerable compatibility issues and
it is better to supply them as the mode bits still exist and can be set.
2015-08-21 21:25:00 +02:00
Jonas 'Sortie' Termansen
a5eacdbdcc Fix log terminal write insecure copying. 2015-08-21 20:41:33 +02:00
Jonas 'Sortie' Termansen
6cf07034d5 Fix missing parenthesizes in <sys/wait.h> macros. 2015-08-14 17:26:07 +02:00
Jonas 'Sortie' Termansen
158716f96a Fix ctype invocations with wrong domain. 2015-08-11 15:57:56 +02:00
Jonas 'Sortie' Termansen
1dee12e58e Fix typo in initrd extraction failure panic. 2015-07-28 22:01:44 +02:00
Jonas 'Sortie' Termansen
fffefeba8f Fix execve(2) keeping program descriptors open. 2015-07-09 19:20:49 +02:00
Jonas 'Sortie' Termansen
d235251139 Fix AbstractInode::statvfs not setting f_favail. 2015-06-27 17:06:43 +02:00
Jonas 'Sortie' Termansen
779bbe19dd Fix vulnerability if p_filesz exceeds p_memsz in ELF loader. 2015-06-27 17:06:43 +02:00
Jonas 'Sortie' Termansen
2291076f19 Fix poll zero timeout not being instant wakeup. 2015-06-27 17:06:43 +02:00
Jonas 'Sortie' Termansen
9acc74de28 Fix read-only mmap with backing store. 2015-06-27 17:06:33 +02:00
Jonas 'Sortie' Termansen
d068a352f7 Fix missing lock in kernel descriptor fork. 2015-06-27 17:06:32 +02:00
Jonas 'Sortie' Termansen
5589085084 Fix unlinkat potentially following paths twice. 2015-06-27 17:06:32 +02:00
Jonas 'Sortie' Termansen
86c5bc52b3 Fix PipeNode destructor not being virtual. 2015-05-15 16:18:19 +02:00
Jonas 'Sortie' Termansen
e259e8ae52 Use standard compiler environment variables. 2015-05-10 16:56:22 +02:00
Jonas 'Sortie' Termansen
2874495111 Remove per-architecture exec-prefixes from filesystem hierarchy. 2015-04-23 20:02:03 +02:00
Jonas 'Sortie' Termansen
1144a7bd99 Fix unmount double unref. 2015-04-05 01:18:25 +02:00
Jonas 'Sortie' Termansen
d383ada0d8 Fix fake kernel entropy being entirely static. 2015-03-11 14:27:43 +01:00
Jonas 'Sortie' Termansen
d511bfb75b Fix partition inode type and stat method. 2015-03-11 14:27:43 +01:00
Jonas 'Sortie' Termansen
472e31a9a1 Fix exit_thread(2) passing unaligned sizes to UnmapMemory. 2015-03-11 14:27:43 +01:00
Jonas 'Sortie' Termansen
0806a9dfb1 Fix typo in kernel multiboot compliance check. 2015-03-11 14:27:42 +01:00
Jonas 'Sortie' Termansen
825029a24a Fix kernel Makefile cleaning root directory files if CPU is unset. 2015-02-11 17:47:18 +01:00
Jonas 'Sortie' Termansen
ebb75f656c Honor O_EXCL only if O_CREAT. 2015-02-08 22:58:32 +01:00
Jonas 'Sortie' Termansen
4f7c5ebdd3 Fix PCI code. 2015-02-08 22:58:32 +01:00