Commit Graph

55 Commits

Author SHA1 Message Date
Chen Chengjun 4468eda1ef Modify all usages of the removed Path APIs 2026-01-16 02:12:20 +00:00
Wang Siyuan 138401b0ab Remove `PathOrInode` 2026-01-11 17:00:23 -08:00
Ruihan Li a7ecef2e58 Fix cgroup atomic mode break 2025-12-11 15:51:48 +08:00
Chaoqun Zheng 7d74429247 Add `timer_slack` field in `PosixThread` and implement related methods.
For now, we do not use `timer_slack` for any usage, it is just a
placeholder for running some complex programs successfully.
2025-12-09 09:33:51 +08:00
Zhang Junyang dd410444e5 Format with new `rustfmt` 2025-12-09 09:23:58 +08:00
Ruihan Li 04ef99cb82 Migrate existing code to use `VmIo` 2025-12-07 12:01:05 +08:00
Wang Siyuan 449939a32b Move the executable `PathOrInode` to `ProcessVm` 2025-11-24 12:34:42 +08:00
Wang Siyuan 423053f2e6 Store the executable `PathOrInode` in `Process` to support `execveat` memfd files with `MFD_CLOEXEC` 2025-11-24 12:34:42 +08:00
Chen Chengjun 77fb73bdd7 Enable the process management for cgroup 2025-11-07 11:47:23 +08:00
Ruihan Li 8a16aa3b86 Refine the `ProcessVm` structure 2025-10-26 10:14:00 +08:00
jiangjianfeng caeec3cdc1 Unshare signal handler during execve 2025-10-25 10:36:30 +08:00
jiangjianfeng 207bfe30e2 Support multithreaded execve 2025-10-25 10:36:30 +08:00
jiangjianfeng 600446e9e1 Cleanup ThreadName related code 2025-10-20 10:52:07 +08:00
Ruihan Li 56d78ab649 Fix some minor style issues 2025-10-06 14:46:23 +08:00
Ruihan Li 6336bb9fc8 Fix races when finding the reaper 2025-09-30 09:54:40 +08:00
Ruihan Li 8be5465ace Add more checks for `clone` 2025-09-30 09:54:40 +08:00
jiangjianfeng 702aa7d9ee Support CLONE_PARENT flag 2025-09-29 13:27:22 +08:00
Yang Zhichao b921675426 Complete fork, vfork and clone counting.
This change primarily provides statistical data for the `processes` field in `/proc/stat`.
This field represents the total count of all processes and threads created since system boot,
rather than just processes as the name might imply.
2025-09-27 21:02:23 +08:00
Chen Chengjun c56089309b Support CLONE_NEWNS for related syscalls 2025-09-24 08:07:25 +08:00
Wang Siyuan 46aa437c87 Add `/proc/pid/oom_score_adj` 2025-09-15 13:28:23 +08:00
Ruihan Li 652657fba5 Drop duplicate public re-exports 2025-09-10 12:10:40 +08:00
jiangjianfeng 83b6e2da5c Add basic namespace framework 2025-09-02 09:47:41 +08:00
Ruihan Li 923982c2e5 Remove `user_ctx` from `Task` 2025-08-12 19:19:34 +08:00
jiangjianfeng de97644b4c Move `ThreadFsInfo` from `PosixThread` to `ThreadLocal` 2025-08-06 13:38:42 +08:00
jiangjianfeng 9219207b97 Add CLONE_PIDFD & pidfd_open support 2025-07-24 21:11:24 +08:00
Qingsong Chen 6cd53fbb8a Refactor FPU context using pre_schedule_handler 2025-07-18 11:40:16 +08:00
Wang Siyuan a13297ae4c Add fields in `/proc/*/stat` and `/proc/*/status` 2025-07-02 20:13:47 +08:00
jiangjianfeng 95faea0fb0 Support WSTOPPED and WCONTINUED 2025-06-20 11:51:44 +08:00
jiangjianfeng f0957d2f54 Fix clippy warnings in kernel crate 2025-06-06 18:22:09 +08:00
jiangjianfeng 89e8cd5936 Move functions related to spawning the init process to a seperate module 2025-05-09 13:19:57 +08:00
Ruihan Li 7e4509df9c Refactor and test `set{pgid,sid}` 2025-05-06 18:47:10 +08:00
Ruihan Li 8600278a5f Drop files at the correct time 2025-04-14 21:13:11 +08:00
Chen Chengjun e4f07b76a0 Add real vfork logics 2025-04-03 14:44:39 +08:00
le-monde-bleu 43e43ca133 Add vfork syscall and related clone flags 2025-04-03 14:44:39 +08:00
Zhang Junyang f1c7564184 Move CPU context implementations to a specific module 2025-03-21 21:19:50 +08:00
Chen Chengjun 248b24fb4e Remove UserSpace abstraction from OSTD 2025-03-20 14:20:47 +08:00
Chen Chengjun 801eac9386 Support PR_SET/GET_CHILD_SUBREAPER for sys_prctl 2025-03-03 19:31:50 +08:00
Ruihan Li b9ce3e64ad Make the file lookup faster 2025-01-09 10:58:16 +08:00
Ruihan Li 0bfe7aceb8 Utilize `ThreadLocal` 2024-12-26 14:51:20 +08:00
Marsman1996 3d12ccdbea Warn unsupported clone flags instead of panic 2024-12-20 09:21:25 +08:00
Ruihan Li 35c20620bc Rewrite `exit()` and `exit_group()` 2024-12-17 19:36:38 +08:00
Ruihan Li 36fc1d3757 Move FS things to `PosixThread` 2024-12-05 13:44:09 +08:00
Ruihan Li fe7e4884c9 Clarify what `CLONE_THREAD` depends on 2024-12-05 13:44:09 +08:00
Qingsong Chen 5e35704e38 Support eagerly FPU state save/restore
Co-authored-by: Shaowei Song <songshaowei.ssw@antgroup.com>
2024-11-29 21:53:14 +08:00
Ruihan Li 39d303c72f Rename `get_current_userspace` to `current_userspace` 2024-11-15 13:24:58 +08:00
Ruihan Li e6c613f538 Rename `(Posix)ThreadExt` to `As(Posix)Thread` 2024-11-13 21:44:37 +08:00
Ruihan Li 9233d1cdbb Add `ThreadExt` and clean up `PosixThreadExt` 2024-11-13 21:44:37 +08:00
Carlos López 0a36760f7a Respect user-defined exit signal in clone() and clone3()
When calling clone() and clone3(), the user is allowed to specify a
signal to be sent to the parent process on exit. Respect this value by
storing it in the Process struct and sending the signal on exit.

Add a test as well to verify that the signal is properly delivered to
the parent.
2024-09-26 20:07:43 +08:00
Carlos López 130a0f7030 Homogenize arguments for clone() and clone3()
The arguments for both syscalls follow different formats. Rewrite the
CloneArgs struct to homogenize both formats into one.
2024-09-26 20:07:43 +08:00
Jianfeng Jiang fb718fd440 Optimize the latency of lat-sig-install 2024-09-25 17:29:20 +08:00