Jonas 'Sortie' Termansen
065a51cb00
Fix user-space filesystem st_dev values being non-unique.
2016-02-17 23:49:19 +01:00
Jonas 'Sortie' Termansen
16c5738a20
Fix typo in PS/2 error string.
...
Discovered by Alexandros Alexandrou.
2016-02-13 20:07:47 +01:00
Jonas 'Sortie' Termansen
bab21ae7dd
Add tar and tix initrd support.
2016-02-07 14:48:28 +01:00
Jonas 'Sortie' Termansen
475bd7c26e
Add support for multiple initrds.
2016-02-07 14:48:27 +01:00
Jonas 'Sortie' Termansen
9fe234d4d8
Rewrite init(8).
2016-02-06 17:29:42 +01:00
Jonas 'Sortie' Termansen
398eee1a8b
Add AHCI driver.
2016-02-02 22:47:49 +01:00
Jonas 'Sortie' Termansen
79e01c2eba
Rewrite ATA driver.
2016-02-02 22:47:49 +01:00
Jonas 'Sortie' Termansen
b0bbf1e013
Fix fsm_mountat(2) error handling.
2016-01-27 21:36:04 +01:00
Jonas 'Sortie' Termansen
2e4b15daed
Simplify directory reading.
2016-01-26 18:42:54 +01:00
Jonas 'Sortie' Termansen
fe067c5150
Refactor boot page availability testing.
2016-01-26 17:51:25 +01:00
Jonas 'Sortie' Termansen
cfb9dd6045
Remove poorly implemented kernel symbol loading.
2016-01-26 17:45:06 +01:00
Jonas 'Sortie' Termansen
08bac6e3f6
Add kernelinfo firmware string.
2016-01-26 17:45:06 +01:00
Jonas 'Sortie' Termansen
4b1079510b
Execute only programs with an executable bit set.
2016-01-25 17:39:57 +01:00
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
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
dc07435002
Fix closefrom(2) infinite loop.
2016-01-22 20:01:32 +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
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
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
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
22351d7f72
Fix untimely delivery of signals during userfs reference count messages.
2016-01-07 19:08:43 +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
f60b2c6ec4
Add keyboard layout support to kernel.
2015-12-19 02:44:15 +01:00
Jonas 'Sortie' Termansen
7da84494ab
Add kblayout-compiler(1).
2015-12-19 02:21:15 +01:00
Jonas 'Sortie' Termansen
4b6b06bbc8
Add scram(2).
2015-12-12 22:53:07 +01:00
Jonas 'Sortie' Termansen
f2eb347e9f
Fix PS2Keyboard memcpy(dest, NULL, 0) undefined behavior.
2015-12-12 22:53:07 +01:00
Jonas 'Sortie' Termansen
ab27c85948
Implement sigaction(2) SA_RESETHAND.
2015-12-12 19:28:08 +01:00
Jonas 'Sortie' Termansen
802c12e64a
Implement ppoll(2) timeouts.
2015-12-12 19:28:08 +01:00
Jonas 'Sortie' Termansen
0045f18c81
Remove kernel Scheduler::Init().
2015-12-12 19:28:07 +01:00
Jonas 'Sortie' Termansen
cee24359d8
Add psctl(2).
2015-12-12 19:28:07 +01:00
Jonas 'Sortie' Termansen
716ac0dceb
Fix logterminal TERMMODE_LINEBUFFER checking.
2015-12-12 19:28:07 +01:00
Jonas 'Sortie' Termansen
24cf8f42b8
Silence maybe initialized warning in sigsuspend.
2015-12-12 16:53:42 +01:00
Jonas 'Sortie' Termansen
32feba2709
Fix memcpy(dest, NULL, 0) undefined behavior.
2015-12-12 16:53:42 +01:00
Jonas 'Sortie' Termansen
1acf16dea0
Fix kernel makefile finding crtbegin.o and crtend.o when not needed.
2015-12-12 16:53:42 +01:00
Jonas 'Sortie' Termansen
f4995c24f4
Add kernel --init option.
2015-10-28 19:36:33 +01:00
Jonas 'Sortie' Termansen
62b5d45a78
Add kernel command line support.
2015-10-28 19:36:33 +01:00
Jonas 'Sortie' Termansen
fc637c8880
Prevent orphan processes from becoming zombies.
2015-10-28 19:36:33 +01:00
Jonas 'Sortie' Termansen
44d4807fc4
Add ENOMOUNT.
2015-10-28 19:36:33 +01:00
Jonas 'Sortie' Termansen
bae08f13ef
Fix fsmarshall not handling users and groups.
...
This is an incompatible ABI change.
2015-10-28 16:07:36 +01:00
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
Jonas 'Sortie' Termansen
bb70eef85b
Replace system call array types with pointers.
2015-01-23 14:52:51 +01:00
Jonas 'Sortie' Termansen
31023c263b
Fix style issues in kernel system call header.
2015-01-22 03:37:37 +01:00
Jonas 'Sortie' Termansen
9e67c78271
Add unicode replacement character onto VGA font.
2014-12-28 20:18:58 +01:00
Jonas 'Sortie' Termansen
524a028a4f
Forward compatibility with future rename of _start to __start.
2014-12-28 20:18:58 +01:00
Jonas 'Sortie' Termansen
ab66b91086
Fix NOTO typo.
2014-12-28 20:18:58 +01:00
Jonas 'Sortie' Termansen
d890d3082d
Add umount(2) and unmountat(2).
2014-12-26 21:45:29 +01:00
Jonas 'Sortie' Termansen
bbf454e164
Rewrite program loader.
2014-12-04 16:14:17 +01:00
Jonas 'Sortie' Termansen
5143f01b0a
Remove sbrk(2).
...
Note: This is an incompatible ABI change.
2014-12-03 23:55:55 +01:00
Jonas 'Sortie' Termansen
dd950fc996
Add AT_EACCESS support to faccessat(2).
2014-12-03 14:19:58 +01:00
Jonas 'Sortie' Termansen
ae4534aae1
Update kernel/descriptor.cpp to current coding conventions.
2014-12-03 14:19:58 +01:00
Jonas 'Sortie' Termansen
ba1e0882ec
Initialize system call table at compile time.
2014-12-03 14:19:49 +01:00
Jonas 'Sortie' Termansen
67cbc0715c
Clean up COM driver.
2014-12-03 14:04:53 +01:00
Jonas 'Sortie' Termansen
3ad7ab4fc3
Add gethostname(2) and sethostname(2).
2014-12-03 13:58:29 +01:00
Jonas 'Sortie' Termansen
59262f6bf2
Refactor interrupt handler registration.
2014-12-02 21:30:39 +01:00
Jonas 'Sortie' Termansen
ede6d8f800
Optimize pipe transfers using scheduler yield hints.
2014-12-02 21:17:14 +01:00
Jonas 'Sortie' Termansen
6a14b67feb
Optimize userfs using scheduler yield hints.
2014-12-02 21:17:10 +01:00
Jonas 'Sortie' Termansen
4c78239721
Implement yielding a timeslice to another thread.
2014-12-02 21:15:08 +01:00
Jonas 'Sortie' Termansen
78d9620b0f
Clean up kernel attribute packed use.
2014-12-02 19:36:20 +01:00
Jonas 'Sortie' Termansen
bb3f591057
Add symbolic links.
2014-12-02 17:36:36 +01:00
Jonas 'Sortie' Termansen
2586685061
Ongoing build system maintainance.
2014-12-02 17:09:28 +01:00
Jonas 'Sortie' Termansen
2ecd4c9086
Update kramfs to current coding conventions.
2014-12-02 15:44:05 +01:00
Jonas 'Sortie' Termansen
fbefc30229
Securely copy to and from user-space.
2014-12-02 15:35:50 +01:00
Jonas 'Sortie' Termansen
156e73d441
Optimize file descriptor allocation.
2014-12-01 22:51:07 +01:00
Jonas 'Sortie' Termansen
49000d3bee
Upgrade to latest upstream multiboot header.
...
Tabs were converted to spaces as the original file was inconsistently
indented. The non-standard multiboot_uintx_t types were replaced with the
standard ones from <stdint.h>.
2014-12-01 22:51:07 +01:00
Jonas 'Sortie' Termansen
ec7e0cc9a6
Add cbprintf(3) and vcbprintf(3).
...
Thanks to Owen Shepherd of the Public Domain C Library for helping design
and formalize these interfaces.
2014-12-01 21:39:05 +01:00
Jonas 'Sortie' Termansen
536d7a06f5
Add fcntl(F_PREVFD) and fcntl(F_NEXTFD).
2014-12-01 21:39:05 +01:00
Jonas 'Sortie' Termansen
35708fa900
Retire calltrace support in favor of the kernel debugger.
2014-12-01 21:38:06 +01:00
Jonas 'Sortie' Termansen
b6b19c88fd
Use the word invalid instead of illegal.
2014-11-30 19:53:42 +01:00
Jonas 'Sortie' Termansen
76bf0eb30c
Remove String::Combine kernel function.
...
This function has followed me through a few projects for many years. It's
time to retire it. It's not too terribly well-written and it's mostly
replaced by the standard asprintf call. It's not even used in Sortix at the
moment.
2014-11-30 19:53:42 +01:00
Jonas 'Sortie' Termansen
58c7070134
Support \e[39m and \e[49m in the console.
2014-11-28 15:30:39 +01:00
Jonas 'Sortie' Termansen
e460be7a72
Add getentropy(2).
2014-11-28 13:35:51 +01:00
Jonas 'Sortie' Termansen
577f2f700b
Add shutdown(2).
2014-11-27 01:39:53 +01:00
Jonas 'Sortie' Termansen
a8a8154adc
Add getpeername(2) and getsockname(2).
2014-11-27 01:39:11 +01:00
Jonas 'Sortie' Termansen
ad8d025c32
Rename <sortix/syscallnum.h> to <sortix/syscall.h>.
2014-11-27 01:18:58 +01:00
Jonas 'Sortie' Termansen
bb84370c34
Add type limits and print/scan specifiers to <sys/types.h>.
2014-11-26 23:34:14 +01:00
Jonas 'Sortie' Termansen
ba12c1d246
Store loaded programs in special allocations rather than the kernel heap.
2014-11-26 22:27:57 +01:00
Jonas 'Sortie' Termansen
749d123331
Maintain counts of physical frames used for particular purposes.
2014-11-26 22:27:04 +01:00
Jonas 'Sortie' Termansen
6971cc59b0
Maintain count of used blocks in the filesystem cache.
2014-11-26 22:25:37 +01:00
Jonas 'Sortie' Termansen
36d2dcb745
Slightly improve addralloc virtual address space leaking.
2014-11-26 22:25:37 +01:00
Jonas 'Sortie' Termansen
f8c5adf20f
Add #! support to execve(2).
2014-11-26 21:14:13 +01:00
Jonas 'Sortie' Termansen
f44e46cde5
Flatten initrd symbolic links to hardlinks inside the same directory.
2014-11-25 22:49:19 +01:00
Jonas 'Sortie' Termansen
ca70f03be8
Display progress bar during initrd extraction.
2014-11-25 20:57:45 +01:00
Jonas 'Sortie' Termansen
c1af231897
Optimize reading the CMOS real time clock.
2014-11-25 19:42:28 +01:00
Jonas 'Sortie' Termansen
ae73391a10
Clean up initrd extraction code.
2014-11-25 19:42:28 +01:00
Jonas 'Sortie' Termansen
01402052f6
Add tcgetblob(2) and tcsetblob(2).
2014-11-25 18:40:50 +01:00
Jonas 'Sortie' Termansen
20b8a3c639
Add support for \e[9xm and \e[10xm escape sequences.
2014-11-25 17:19:32 +01:00
Jonas 'Sortie' Termansen
2ff72426ec
Implement SO_RCVBUF and SO_SNDBUF for filesystem sockets.
2014-11-25 17:14:46 +01:00
Jonas 'Sortie' Termansen
feea0786fc
Increase default pipe buffer size to 64 KiB.
2014-11-24 22:32:57 +01:00
Jonas 'Sortie' Termansen
152d768112
Memory efficiently extract the initrd.
2014-11-24 22:32:57 +01:00
Jonas 'Sortie' Termansen
dc11b9f837
Add unicode support to kernel terminal and console.
2014-11-24 17:41:26 +01:00