Commit Graph

88 Commits

Author SHA1 Message Date
Zhang Junyang cdac59beda Implement a new set of physical page APIs 2024-12-27 12:12:51 +08:00
Marsman1996 5df8d59563 Exit when handle_user_signal fail 2024-12-26 18:33:32 +08:00
anbo225 e75b6320ad Add support for group-based permission checking in ext2 2024-12-26 17:07:55 +08:00
Ruihan Li 0bfe7aceb8 Utilize `ThreadLocal` 2024-12-26 14:51:20 +08:00
Marsman1996 9753d796c5 Add overflow check for futex_addr 2024-12-26 09:05:24 +08:00
Wang Siyuan 1e3403e756 Support ELF files with zero `p_filesz`. 2024-12-22 15:16:22 +08:00
Marsman1996 3d12ccdbea Warn unsupported clone flags instead of panic 2024-12-20 09:21:25 +08:00
Fabing Li 24f1e02b26 Support prctl(PR_SET_KEEPCAPS/PR_GET_KEEPCAPS) 2024-12-17 20:14:13 +08:00
Fabing Li 636efe68fd Give root process a full capability set 2024-12-17 20:14:13 +08:00
Ruihan Li 35c20620bc Rewrite `exit()` and `exit_group()` 2024-12-17 19:36:38 +08:00
Zejun Zhao bc5a058fc5 Add TODO for a potential vulnerability in futex implementation 2024-12-16 21:12:08 +08:00
Zejun Zhao ced0023d6b Introduce a syscall restart mechanism 2024-12-16 21:12:08 +08:00
Ruihan Li 1716f4f324 Use `Pollee` as the socket observer 2024-12-12 20:50:12 +08:00
Fabing Li fc45592a28 Fix rlimits_test 2024-12-12 16:19:01 +08:00
Ruihan Li 969ac97144 Make atomic mode panics have clear messages 2024-12-11 20:27:29 +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
徐启航 878f3f3760 Scheduling class support 2024-12-04 09:36:41 +08:00
anbo225 9608a57cb0 Make sys_setuid and sys_setgid behave consistently with Linux 2024-12-02 16:43:25 +08:00
Marsman1996 d44737360f Remove assert in `check_segment_align` 2024-12-02 16:40:47 +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
Ruize Tang 6c4f56723c Fix futex lost wakeup 2024-11-27 10:27:22 +08:00
Ruize Tang 05ff441577 Clear `DF` flag during signal handling to conform to x86-64 calling convention 2024-11-26 10:50:58 +08:00
jiangjianfeng 495c93c2ad Refactor Rwlock to take type parameter 2024-11-21 15:46:10 +08:00
Ruihan Li ec2c6ab7a3 Make `Pollee` semi-stateless 2024-11-20 16:39:18 +08:00
Ruihan Li fab61f5f66 Make `Pollee` stateless 2024-11-20 16:39:18 +08:00
Ruihan Li 5450d0bd71 Remove dead `(un)register_observer` methods 2024-11-20 16:39:18 +08:00
Ruihan Li 39d303c72f Rename `get_current_userspace` to `current_userspace` 2024-11-15 13:24:58 +08:00
Ruihan Li 96de617ad9 Rename `get_user_space` to `user_space` 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
Ruihan Li a4a8807a20 Remove `KernelThreadExt` 2024-11-13 21:44:37 +08:00
Marsman1996 c200997c9a Avoid init stack top at `MAX_USERSPACE_VADDR` 2024-11-13 21:43:28 +08:00
Wang Siyuan 4ea3e49788 Refactor `Vmar` and `VmMapping`.
Co-authored-by: Zhang Junyang <junyang@stu.pku.edu.cn>
2024-11-13 17:29:57 +08:00
Ruihan Li 054c64542b Use `PollAdaptor` to signal `SIGIO` 2024-11-13 14:15:44 +08:00
Ruihan Li e32fb2f91b Introduce `PollAdaptor` and `Poller` 2024-11-13 14:15:44 +08:00
Ruihan Li f12e502ab0 Rename `Poller` to `PollHandle` 2024-11-13 14:15:44 +08:00
Ruihan Li 44b55f2ccf Revise the `poll()` method 2024-11-13 14:15:44 +08:00
Marsman1996 54e2ffbb71 Add check for `argc`, `arg_ptr` and `env_ptr` in `InitStackReader` 2024-11-12 11:35:46 +08:00
Ruihan Li 0ef55a396f Add a note about the FIXME 2024-11-09 17:09:41 +08:00
Ruihan Li 0c114e911b Revert "Make `pause_timeout` return `EINTR`"
This reverts commit 6421fd0b36.
2024-11-09 17:09:41 +08:00
Ruihan Li 6421fd0b36 Make `pause_timeout` return `EINTR` 2024-11-09 10:25:24 +08:00
Ruihan Li b563fb639f Revise documentations 2024-11-09 10:25:24 +08:00
Ruihan Li 32b8e05cc3 Make `*_or_timeout` APIs concise 2024-11-09 10:25:24 +08:00
Marsman1996 f287110001 Fix `InitStackReader` to access given stack instead of current task 2024-11-09 10:06:45 +08:00
Ruihan Li 19b13d88e2 Fix `clone_exit_signal` test 2024-11-06 21:53:55 +08:00
Fabing Li 7a08d9a660 Support other SigStackFlags 2024-11-06 15:00:01 +08:00
Champii1 4701eaf0cb Implementation of load average calculation and corresponding /proc entry
Moved everything into the kernel side. Add a SchedulerStats trait

Use 'fixed' to represent fixed-point numbers

Make the loadavg calculation lazy
2024-11-05 11:46:23 +08:00
Ruihan Li efd49a96e3 Rename `cond()` to `try_op()` 2024-11-03 16:54:05 +08:00
Ruihan Li 7ddfd42baa Make `wait_events` support timeout 2024-11-01 13:00:40 +08:00