Age | Commit message (Collapse) | Author | |
---|---|---|---|
2024-07-12 | kernel: don't reuse VfsReq allocations for a single process | dzwdz | |
To use the same testing methodology as when I've introduced request slots: before: / $ iostress 1 1000000 0 > /dev/vtty run 0: 2585203 1000000 calls, 0 bytes. avg 2585203 after: / $ iostress 1 1000000 0 > /dev/vtty run 0: 2783171 1000000 calls, 0 bytes. avg 2783171 This is around a 7.7% slowdown - that I hope to fix with a better malloc. While this doesn't really make the code that much simpler, it doesn't feel like the right approach in the first place | |||
2024-07-11 | kernel: start cleaning up VfsRequest | dzwdz | |
* I'm being more strict about the linked list state to hopefully ensure I'm not leaking any references. * vfsreq_create was renamed to vfsreq_dispatchcopy as that name feels more clear. It copies its argument, and dispatches it. * Requests for user backends are now handled more like requests for kernel backends - there's an accept() function that accepts a request. | |||
2024-07-07 | kernel/vfs: split vfs_backend_refdown into two functions | dzwdz | |
2024-05-11 | kernel: fix null dereference when delegating an nonexistent handle | dzwdz | |
2024-05-11 | kernel: refactor handle management out of proc.c | dzwdz | |
2024-03-13 | kernel/malloc: slight rework (it's still bad), store more metadata | dzwdz | |
2024-02-23 | kernel: knock off some simple vfsreq TODOs | dzwdz | |
2024-02-21 | kernel: integrate the proc_ns_next fixes into proc_next | dzwdz | |
2023-09-25 | kernel/procfs: `intrdown` node for sending an interrupt to all children | dzwdz | |
2023-09-25 | kernel/intr: accept a message, allow killing processes via intrs | dzwdz | |
2023-09-09 | kernel: build /kdev/ on the fly | dzwdz | |
2023-09-03 | build: -Os | dzwdz | |
2023-06-17 | kernel: fix procfs overflow bug, add safeguard to prevent similar ones | dzwdz | |
2023-06-04 | kernel: rework /proc/ and process IDs | dzwdz | |
I'm yet to write proper docs but the TL;DR is: Mounting /proc/ creates a new pid namespace. You're still visible in the old namespace with your old pid, but your children won't be. You see your own pid as 1. Current pids of children will be preserved, pids will be allocated starting from the highest one of your children. | |||
2023-01-25 | kernel: move /mem/alloc to /malloc and linker.ld to arch/amd64/ | dzwdz | |
2023-01-25 | kernel: consolidate some header files | dzwdz | |
2023-01-25 | style: typedef structs, shorter namespaces | dzwdz | |
I've wanted to do this for a while, and since I've just had a relatively large refactor commit (pcpy), this is as good of a time as any. Typedefing structs was mostly inspired by Plan 9's coding style. It makes some lines of code much shorter at basically no expense. Everything related to userland kept old-style struct definitions, so as not to force that style onto other people. I also considered changing SCREAMING_ENUM_FIELDS to NicerLookingCamelcase, but I didn't, just in case that'd be confusing. | |||
2023-01-25 | kernel/virt: replace the virt_cpy api with a more foolproof one | dzwdz | |
2023-01-24 | kernel/procfs: prevent reading kernel memory | dzwdz | |
knew it | |||
2023-01-24 | kernel/procfs: allow reading memory of descendants | dzwdz | |
I'm suprised how short this patch is. It also feels like I've introducted a vulnerability somewhere with it. Hopefully it's a false feeling. | |||
2023-01-24 | kernel/procfs: allow interrupting processes | dzwdz | |
2023-01-18 | kernel: add a root argument to process_next | dzwdz | |
2023-01-11 | kernel: return EPIPE when fs_waiting on a dead filesystem | dzwdz | |
2023-01-06 | kernel: basic procfs | dzwdz | |
2022-10-08 | syscall/open: don't check for free handles | dzwdz | |
doesn't really prevent anything, and makes it harder to test edge cases | |||
2022-10-02 | syscall/open: add the full suite of READ/WRITE flags | dzwdz | |
2022-09-20 | shared: rename ufs_request to better fit its role in userland | dzwdz | |
The old name could have suggested that it held a response to a request received by fs_wait. The new name is unfortunately very similar to the `struct vfs_request` already used internally in the kernel, but it's better at conveying that it contains a filesystem request yet to be handled. vfs_request - virtual filesystem request (a bad name in hindsight) ufs_request - user filesystem request | |||
2022-09-20 | user/login: segcmp | dzwdz | |
2022-08-28 | kernel/vfs: minor vfs_request / vfs_root_register rework | dzwdz | |
* changed vfs_root_register's name because the _mount didn't add anything * removed the old pointless vfs_backend_tryaccept calls from drivers * because of that, i could remove the vfs_backend globals * replaced the horrible BACKEND_KERN macro * all vfs_backends are now stored on the heap | |||
2022-08-19 | syscall/fs_wait: return a handle for each request | dzwdz | |
2022-08-19 | kernel/proc: abstract away managing handles | dzwdz | |
2022-08-12 | vfs: OPEN_RO flag, read-only whitelist entries | dzwdz | |
2022-08-08 | kernel/backend: remove the kern.ready() method | dzwdz | |
2022-08-05 | move path_simplify to shared code, move its tests to userland | dzwdz | |
2022-08-04 | do some simple TODOs, organize the rest; general code maintainance | dzwdz | |
2022-08-03 | kernel: reuse a single allocation for all vfs_requests of a process | dzwdz | |
$ iostress 32 512 0 > /vtty # before 512 calls, 0 bytes. avg 121133 $ iostress 32 512 0 > /vtty # after 512 calls, 0 bytes. avg 103540 103540/121133 = ~85% I think the tiny bit of added complexity is worth it here. | |||
2022-07-29 | use a shared fs_normslice() function to handle offsets | dzwdz | |
2022-07-27 | kernel/vfs: fix assert failure when creating a vfsreq to a dead mount | dzwdz | |
2022-07-26 | shared: move some headers from shared/ to camellia/ | dzwdz | |
2022-07-26 | tools: add tools/sort_includes.rb | dzwdz | |
2022-07-23 | init: compile as an elf | dzwdz | |
2022-07-17 | kernel/virt_cpy: error struct, better error handling | dzwdz | |
2022-07-16 | amd64: back at the shell! | dzwdz | |
2022-07-16 | amd64: barely boot into kernel code | dzwdz | |
2022-07-14 | kernel/driver/serial: allow writes even with pending reads | 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. | |||
2022-07-07 | kernel: add the vfsreq_finish_short shorthand function | dzwdz | |
2022-07-07 | kernel/vfs: delegate support in _syscall_fs_respond! | dzwdz | |
this is big in terms of speed, it avoids a lot of unnecessary context switches | |||
2022-06-29 | kernel/vfs: add the OPEN_CREATE flag | dzwdz | |
2022-05-06 | kernel: remove the union in `struct handle` | dzwdz | |