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
Jonas 'Sortie' Termansen
9e6148f6ff
Refactor default compiler options logic.
2014-11-24 17:10:50 +01:00
Jonas 'Sortie' Termansen
12eaf46873
Let kernel debugger know how it was invoked.
2014-11-21 00:12:46 +01:00
Jonas 'Sortie' Termansen
5dbd89d2aa
Delay heap initialization until first heap expansion.
2014-11-20 21:09:14 +01:00
Jonas 'Sortie' Termansen
81ad72ae89
Fix renegade graphical console rendering thread.
...
The console rendering thread doesn't get shut down as the lfbtextbuffer did
not think it had a rendering thread. This causes corruptions to occur when a
subsequent resolution change destroys the lfbtextbuffer class instance, but
the thread continues to use the class. Lots of undefined behavior occurs as
the memory gets reallocated for other purposes.
2014-11-20 17:04:45 +01:00
Jonas 'Sortie' Termansen
ee13ffa715
Refactor kernel graphics support.
2014-11-19 00:08:49 +01:00
Jonas 'Sortie' Termansen
8f7c72abc1
Add utility functions for mapping PCI memory areas.
2014-11-18 23:14:49 +01:00
Jonas 'Sortie' Termansen
50ee8ca323
Implement searching for multiple PCI devices matching a pattern.
2014-11-18 22:00:29 +01:00
Jonas 'Sortie' Termansen
400eb2238f
Refactor process id allocation and accounting.
2014-11-18 20:33:21 +01:00
Jonas 'Sortie' Termansen
25e07a9083
Refactor kernel interrupt and thread register support.
2014-11-18 20:33:21 +01:00
Jonas 'Sortie' Termansen
25b4125840
Relocate kernel IO port functions to <sortix/kernel/ioport.h>.
2014-11-18 18:10:22 +01:00
Jonas 'Sortie' Termansen
7b3e2fa229
Clean up kernel thread creation code.
2014-11-18 18:10:22 +01:00
Jonas 'Sortie' Termansen
a24ecf4b83
Add getsockopt(2) and setsockopt(2).
2014-11-18 18:10:22 +01:00
Jonas 'Sortie' Termansen
708bcb4735
Add recvmsg(2) and sendmsg(2).
2014-11-18 16:27:19 +01:00
Jonas 'Sortie' Termansen
79f7312a49
Fix page protection bugs.
2014-11-06 00:09:55 +01:00
Jonas 'Sortie' Termansen
b4c38fd044
Fix wrong sizeof in memstat(2).
2014-10-18 15:30:11 +02:00
Jonas 'Sortie' Termansen
e20dd6ed06
Fix waiting for absolute time on clocks.
2014-10-18 15:30:11 +02:00
Jonas 'Sortie' Termansen
1206113425
Fix userfs renaming between directories.
2014-10-18 15:30:11 +02:00
Jonas 'Sortie' Termansen
66f1a62743
Fix userfs bugs return values and bugs.
2014-10-04 17:10:25 +02:00
Jonas 'Sortie' Termansen
cef4c8d982
Fix waitpid status copying to user-space.
2014-10-04 17:10:25 +02:00
Jonas 'Sortie' Termansen
a6bb538bcf
Fix user-space filesystem copying.
2014-10-04 17:10:25 +02:00
Jonas 'Sortie' Termansen
73dc4a0feb
Fix kernel leaking ESPIPE in non-error cases.
2014-09-25 18:12:53 +02:00
Jonas 'Sortie' Termansen
933720e0b0
Remove obsolete system calls.
2014-09-25 17:49:02 +02:00
Jonas 'Sortie' Termansen
c0ad3d8a80
Fix error case in tfork(2).
2014-09-25 17:27:54 +02:00
Jonas 'Sortie' Termansen
e29f0cdd1e
Fix class process constructor forgetting some members.
2014-09-23 20:45:57 +02:00
Jonas 'Sortie' Termansen
797efbc15b
Fix Ref<T> self-assignment.
2014-09-23 20:45:57 +02:00
Jonas 'Sortie' Termansen
6558de636e
Fix tfork(2) not copying signal properties.
2014-09-23 20:45:57 +02:00
Jonas 'Sortie' Termansen
741e48e688
Fix interrupt worker quality.
2014-09-23 20:45:57 +02:00
Jonas 'Sortie' Termansen
8c2befc140
Clean up scheduler.
2014-08-24 14:02:42 +02:00
Jonas 'Sortie' Termansen
594dcaad19
Add format attribute to kernel print and panic functions.
2014-08-23 21:47:05 +02:00
Jonas 'Sortie' Termansen
30cd318c17
Implement signals.
...
Note: This is an incompatible ABI change.
2014-07-22 13:25:39 +02:00
Jonas 'Sortie' Termansen
316ed84e60
Fix process constructor not zeroing the user timers.
2014-07-22 13:16:16 +02:00
Jonas 'Sortie' Termansen
9675bd7475
Deliver SIGPIPE on filesystem socket disconnect.
...
This fixes the earlier mistake where I believed sockets were not meant to
send SIGPIPE on bad writes, but the standard mandates that sockets do send
SIGPIPE in such cases.
2014-07-20 15:05:58 +02:00
Jonas 'Sortie' Termansen
b4d494cf8b
Implement thread creation in tfork(2).
2014-07-08 17:41:52 +02:00
Jonas 'Sortie' Termansen
c8a3a858b0
Add libpthread.
2014-07-08 17:41:50 +02:00
Jonas 'Sortie' Termansen
8411dce330
Add kernel uthread support.
2014-07-08 17:41:50 +02:00
Jonas 'Sortie' Termansen
fdcfb1f2da
Handle ELF notes during program load.
2014-07-07 17:52:33 +02:00
Jonas 'Sortie' Termansen
3f9a7c0a32
Fix <fcntl.h> using C++ comments.
2014-07-07 17:52:33 +02:00
Jonas 'Sortie' Termansen
b607900a00
Fix <dirent.h> not being C89 friendly.
2014-07-07 17:52:33 +02:00
Jonas 'Sortie' Termansen
2d8d89b9f8
Fix missing TLB-flush in exit_thread(2).
2014-07-06 22:59:40 +02:00
Jonas 'Sortie' Termansen
8b3e25ce7f
Fix FileCache::ChangeNumBlocks using memory after realloc shrink.
2014-06-27 16:17:47 +02:00
Jonas 'Sortie' Termansen
874baffd57
Fix wrongly named system call constants.
2014-06-27 15:49:55 +02:00
Jonas 'Sortie' Termansen
2bead9df51
Fix <sortix/fork.h> declaring access(2) constants.
2014-06-17 23:53:26 +02:00
Jonas 'Sortie' Termansen
2d46c1e63c
Fix missing TLB-flush in mprotect().
2014-06-17 23:53:26 +02:00
Jonas 'Sortie' Termansen
4ea6aa710c
Add exit_thread(2).
2014-06-12 00:05:40 +02:00
Jonas 'Sortie' Termansen
f332cf96d4
Add sched_yield(2).
2014-05-29 17:16:49 +02:00
Jonas 'Sortie' Termansen
af23f7ad5e
Add rdmsr(2) and wrmsr(2).
2014-05-29 17:14:30 +02:00
Jonas 'Sortie' Termansen
1f72c1637c
Maintain fsbase and gsbase as per-thread registers.
...
Note: This is an incompatible ABI change.
2014-05-29 17:07:42 +02:00
Jonas 'Sortie' Termansen
92d7c1807e
Fix user-space filesystems not disconnecting properly.
2014-05-28 22:18:54 +02:00
Jonas 'Sortie' Termansen
0ebe5fc04d
Fix filesystem sockets sending SIGPIPE on disconnect.
2014-05-28 22:18:54 +02:00
Jonas 'Sortie' Termansen
6774c79ba6
Fix polling Unix sockets in both incoming and outgoing directions.
2014-05-28 22:18:54 +02:00
Jonas 'Sortie' Termansen
534eb3ddd8
Fix libk being built with -mmmx, -msse and -msse2 on x86_64.
2014-05-28 17:42:19 +02:00
Jonas 'Sortie' Termansen
68d379c605
Fix insecure user-space pointer dereferences in sys_execve.
2014-05-16 16:58:33 +02:00
Jonas 'Sortie' Termansen
23d9693261
Fix ATA PIO driver not correctly detecting harddisk size.
2014-05-16 15:13:02 +02:00
Jonas 'Sortie' Termansen
0c48dfca96
Fix 4 KiB memory leak on x86_64 for each process.
2014-05-16 14:48:27 +02:00
Jonas 'Sortie' Termansen
4283d90102
Fix memory leak of processes that are not process group leaders.
2014-05-16 14:48:27 +02:00
Jonas 'Sortie' Termansen
bcf72f71e4
Fix premature return during VGA text buffer emergency reset.
2014-04-24 00:03:52 +02:00
Jonas 'Sortie' Termansen
6cf417532e
Fix uninitialized bool in kernel Descriptor class.
2014-04-22 18:06:14 +02:00
Jonas 'Sortie' Termansen
24321b0f96
Fix wrong TSS limit.
2014-04-22 18:06:00 +02:00
Jonas 'Sortie' Termansen
46105fd260
Fix missing braces in kernel/debugger.cpp.
2014-04-05 17:02:49 +02:00
Jonas 'Sortie' Termansen
da87b6f0aa
Fix troublesome debug assertions in kernel/process.cpp.
2014-03-31 19:47:54 +02:00
Jonas 'Sortie' Termansen
66481bef39
Fix kernel refcounted classes without virtual destructor.
2014-03-31 19:47:54 +02:00
Jonas 'Sortie' Termansen
6b8e389b47
Fix 32-bit PCI devices not having bar sizes correctly determined.
2014-03-31 19:08:51 +02:00
Jonas 'Sortie' Termansen
564f99b3ae
Move O_ACCMODE into kernel headers.
2014-03-17 19:22:13 +01:00
Jonas 'Sortie' Termansen
e941ff0430
Rename useresp to esp and userrsp to rsp.
2014-03-17 19:22:13 +01:00
Jonas 'Sortie' Termansen
8c00a4145c
Refactor kernel PAT, MTRR, and MSR usage.
2014-03-17 19:22:13 +01:00
Jonas 'Sortie' Termansen
34dbc4d515
Refactor PCI BAR support.
2014-03-17 19:22:13 +01:00
Jonas 'Sortie' Termansen
a133a7717e
Refactor i386 and x86_64 interrupt support.
2014-03-17 19:22:13 +01:00
Jonas 'Sortie' Termansen
554894d840
Add O_TTY_INIT.
2014-03-17 19:22:12 +01:00
Jonas 'Sortie' Termansen
426848fbbf
Add O_NOCTTY.
2014-03-17 19:22:12 +01:00
Jonas 'Sortie' Termansen
a935148f60
Add statvfs(2), fstatvfs(2) and fstatvfsat(2).
2014-03-17 19:22:12 +01:00
Jonas 'Sortie' Termansen
2fe3595feb
Add getumask(2).
2014-03-17 19:22:12 +01:00
Jonas 'Sortie' Termansen
105278a500
Clean up the serial driver read and write routines.
2014-03-17 19:22:11 +01:00
Jonas 'Sortie' Termansen
b7bf21bfff
Open stdin, stdout and stderr in the kernel rather than init.
2014-03-17 19:22:11 +01:00
Jonas 'Sortie' Termansen
640465320f
Improve the reliability of the kernel likely and unlikely macros.
2014-03-17 19:22:11 +01:00
Jonas 'Sortie' Termansen
a0a8ed61d8
Add pipe2(2).
2014-03-17 19:22:11 +01:00
Jonas 'Sortie' Termansen
eaf1618537
Add tcgetwincurpos(2).
2014-03-17 19:22:10 +01:00
Jonas 'Sortie' Termansen
d5241349cc
Move OFF_MIN and OFF_MAX to <sys/types.h>.
2014-03-17 19:22:10 +01:00
Jonas 'Sortie' Termansen
823d3a3e2f
Add fsblkcnt_t and fsfilcnt_t.
2014-03-17 19:22:10 +01:00
Jonas 'Sortie' Termansen
0117c4fbc7
Improve ix86 and x86_64 data types ABI.
...
Increase gid_t to an unsigned 64-bit integer.
Increase id_t to an unsigned 64-bit integer.
Increase pid_t to a signed 64-bit integer.
Increase time_t to a signed 64-bit integer.
Increase uid_t to an unsigned 64-bit integer.
Note: This is an incompatible ABI change.
2014-03-17 19:22:10 +01:00
Jonas 'Sortie' Termansen
6419df7a6d
Fix missing includes from private kernel headers.
2014-03-17 17:00:00 +01:00
Jonas 'Sortie' Termansen
739f8ba865
Fix <sortix/uio.h> not declaring size_t.
2014-03-17 17:00:00 +01:00
Jonas 'Sortie' Termansen
cfa3b19cf2
Fix <sortix/itimerspec.h> not declaring struct timespec.
2014-03-17 17:00:00 +01:00
Jonas 'Sortie' Termansen
2fe4a1ca92
Fix <sortix/initrd.h> not including <stdint.h>.
2014-03-17 17:00:00 +01:00
Jonas 'Sortie' Termansen
3a1c89f7a5
Fix tcgetpgrp resetting the foreground process group to zero.
2014-03-17 16:59:59 +01:00
Jonas 'Sortie' Termansen
9cc2f555e5
Fix print format warnings in kernel/syscall.cpp.
2014-03-01 14:37:42 +01:00
Jonas 'Sortie' Termansen
093d583dea
Fix print format warnings in kernel/x86-family/memorymanagement.cpp.
2014-03-01 14:37:42 +01:00
Jonas 'Sortie' Termansen
fc713baba3
Rename libc-sortix to libk.
2014-03-01 14:37:42 +01:00