kernel: Add processes and rework VFS access checking #48

Merged
apio merged 5 commits from processes into main 2024-12-07 12:19:51 +00:00
Owner

There is now a distinction between processes and threads, and VFS functions now accept a single Process* pointer instead of credentials and groups.
However, there are no APIs to create new threads; all processes are still single-threaded, but it's groundwork for the future.
This is still buggy for now. While user processes can run as before, if one of them exits, the other one crashes in waitpid (or soon after). It looks as if its memory has been corrupted somehow, since the crash is an NX error.

There is now a distinction between processes and threads, and VFS functions now accept a single Process* pointer instead of credentials and groups. However, there are no APIs to create new threads; all processes are still single-threaded, but it's groundwork for the future. This is still buggy for now. While user processes can run as before, if one of them exits, the other one crashes in waitpid (or soon after). It looks as if its memory has been corrupted somehow, since the crash is an NX error.
apio added 2 commits 2024-12-06 20:40:45 +00:00
kernel: Rework VFS access checking + add processes
Some checks failed
Build and test / build (push) Has been cancelled
dc766e1da7
VFS functions now accept a single Process* pointer instead of credentials and groups.
There is now a distinction between processes and threads
Now to fix all the bugs... waitpid crashes the process with an NX error...
base: Revert loginui.conf change
Some checks failed
Build and test / build (push) Failing after 3h10m29s
8e30e0e19d
Oops, was using this for loginui testing, it should be turned off by default.
apio added 2 commits 2024-12-07 12:05:47 +00:00
kernel: Leave reaping to the reap thread
Some checks failed
Build and test / build (push) Has been cancelled
42afef5ccb
This seems to fix previous problems. Apparently reaping a thread somewhat corrupts/replaces the calling thread's address space.

I should've known there's a reason we do it in a separate kernel thread...
apio added 1 commit 2024-12-07 12:16:08 +00:00
kernel: Interrupt waitpid (even when SIGCHLD is pending) when other signals are also pending
All checks were successful
Build and test / build (push) Successful in 1m36s
d05d6fad0b
This fixes init not receiving the kill signal when running tests.
Author
Owner

Seems to work now.

Seems to work now.
apio changed title from WIP: kernel: Add processes and rework VFS access checking to kernel: Add processes and rework VFS access checking 2024-12-07 12:18:34 +00:00
apio merged commit d05d6fad0b into main 2024-12-07 12:19:51 +00:00
apio deleted branch processes 2024-12-07 12:19:51 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: apio/Luna#48
No description provided.