Age | Commit message (Collapse) | Author | |
---|---|---|---|
2022-07-26 | user: mount the initrd and /kdev in user_bootstrap | dzwdz | |
2022-07-26 | user_bootstrap: link against user/lib | dzwdz | |
I have no idea why I didn't do this right from the start, it makes this whole thing much easier. | |||
2022-07-25 | kernel: cleaner and more compact stacktraces | dzwdz | |
2022-07-24 | user: put the testelf in a sensible location in the tree | dzwdz | |
2022-07-24 | user: change the directory structure to prepare for multiple binaries | dzwdz | |
2022-07-23 | kernel: switch processes after execbuf_syscall | dzwdz | |
2022-07-23 | user_bootstrap: pass the initrd in an argument to init's main | dzwdz | |
2022-07-23 | init: compile as an elf | dzwdz | |
2022-07-23 | create a bootstrap ELF loader, that'll load init | dzwdz | |
2022-07-21 | fix type-related compiler warnings | dzwdz | |
2022-07-20 | user/elf: free memory not belonging to the elf when jumping to it | dzwdz | |
2022-07-20 | syscall/execbuf: EXECBUF_JMP | dzwdz | |
2022-07-18 | syscalls: implement execbuf | dzwdz | |
i have been planning to implement something like this for a while now. it should be faster when doing consecutive syscalls (to be tested). it will also be helpful in writing the elf loader | |||
2022-07-18 | user/elf: find free space for PIEs | dzwdz | |
2022-07-18 | user: basic elf relocations, PIE support | dzwdz | |
2022-07-18 | user: a super primitive ELF loader | dzwdz | |
holy shit. this was simpler than i expected it to be | |||
2022-07-17 | amd64: ensure all addresses are canonical | dzwdz | |
2022-07-17 | kernel/virt_cpy: error struct, better error handling | dzwdz | |
2022-07-17 | amd64: remove dead code, combine shared code | dzwdz | |
2022-07-16 | amd64: all tests pass | dzwdz | |
2022-07-16 | amd64: back at the shell! | dzwdz | |
2022-07-16 | amd64: init can print to the terminal now | dzwdz | |
2022-07-16 | amd64: seemingly working syscalls (SYSCALL/SYSRET) | dzwdz | |
2022-07-16 | amd64: just enough paging support to map init | dzwdz | |
2022-07-16 | amd64: barely boot into kernel code | dzwdz | |
2022-07-15 | i686: stop using pushal/popal in sysenter/sysexit | dzwdz | |
2022-07-15 | i386/isr: don't use pushal; push registers manually | dzwdz | |
2022-07-14 | user/shell/cat: support reading from stdin until eof | dzwdz | |
2022-07-14 | user: basic terminal driver with line editing | dzwdz | |
2022-07-14 | kernel/driver/serial: allow writes even with pending reads | dzwdz | |
2022-07-12 | user/tmpfs: basic read/write | dzwdz | |
2022-07-12 | remove the incorrect OPEN_CREATE guards in fs drivers | dzwdz | |
2022-07-12 | user/shell: stdout redirection | dzwdz | |
2022-07-12 | user/shell: parse redirection syntax | dzwdz | |
2022-07-11 | user: add shorthand close() and fork() wrappers for those syscalls | dzwdz | |
2022-07-11 | user: reorganize the userland sources | dzwdz | |
2022-07-11 | init: file_reopen, keep stdin/stdout on their standard fds | dzwdz | |
2022-07-11 | init/stdlib: a more posix-y file api | dzwdz | |
2022-07-10 | init/tests: semaphore pipe-based test | dzwdz | |
2022-07-10 | syscalls: implement dup | dzwdz | |
2022-07-10 | init/lib: implement "evil semaphores" | dzwdz | |
I started implementing native semaphores in the kernel, but then I've realized that I can implement them in userland using pipes. Thus, this hot garbage was born. | |||
2022-07-10 | kernel: implement killing processes stuck on pipes | dzwdz | |
2022-07-09 | kernel/pipes: process queueing | dzwdz | |
2022-07-09 | init/test: mostly clean up the existing tests | dzwdz | |
2022-07-09 | syscalls/pipe: turn into a POSIX-style api with separate rw ends | dzwdz | |
Without separate read/write ends you can't tell when there are no more writers left if you have multiple readers. Consider this piece of code: int fd = pipe(); fork(); // execution continues in 2 processes while (read(fd, &some_buf, sizeof somebuf) >= 0) { ... } Once both processes call `read()`, it's obvious that no writes are possible - all the processes that hold a reference to the pipe are currently stuck on a `read()` call, so the kernel could just make it return an error in both. But, what then? It's still possible to write to the pipe, and you can't know if the other process will do that. Thus, if you don't want to miss any output, you have to keep reading the pipe. Forever. Both processes end up stuck. Having separate read/write ends prevents that. | |||
2022-07-08 | kernel/proc: remove the type argument from process_handle_get | dzwdz | |
2022-07-08 | kernel/syscalls: fix the SYSCALL_RETURN macro for returning pointers | dzwdz | |
2022-07-08 | kernel/fsroot: use req_preprocess to calculate offsets everywhere | dzwdz | |
2022-07-08 | init/fs: remove fs_respond_delegate, clean up | dzwdz | |
2022-07-08 | syscall/fs_respond: get the file id from the buf argument | dzwdz | |
Previously, file ids could only be positive integers, so their range was 31 bits - not enough to represent the entire memory. Now, pointers can be safely used as file ids. |