Commit Graph

695 Commits

Author SHA1 Message Date
Ruihan Li 8bbbde4ccb Use `Ordering::Relaxed` for `is_nonblocking` 2024-12-12 20:50:12 +08:00
Ruihan Li 1207161afe Protect socket states with `PreemptDisabled` 2024-12-12 20:50:12 +08:00
Ruihan Li 39a5e88baf Protect `used_ports` with `LocalIrqDisabled` 2024-12-12 20:50:12 +08:00
Ruihan Li 1716f4f324 Use `Pollee` as the socket observer 2024-12-12 20:50:12 +08:00
Ruihan Li fa76afb3a9 Make `Ext` a trait 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
Hsy-Intel 1b6901f0f8 Bump tdx-guest crate version to 0.1.8 2024-12-11 19:36:51 +08:00
js2xxx 265eacf831 Temporarily disable scheduling class support 2024-12-11 19:30:27 +08:00
Marsman1996 2ec907875c Replace `debug_assert` with `warn` for `SendRecvFlags` 2024-12-11 16:53:03 +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
Ruihan Li 28edc57dd0 Fix the nested bottom half 2024-12-05 13:42:12 +08:00
Chen Chengjun 0cb2ea562e Inject the logger for Asterinas 2024-12-04 13:24:06 +08:00
Chen Chengjun b17cbb2408 Finish bootstrap once finishing the initialization of OSTD 2024-12-04 13:24:06 +08:00
徐启航 878f3f3760 Scheduling class support 2024-12-04 09:36:41 +08:00
Ruihan Li a260411a2a Implement `WriteIrqDisabled` 2024-12-03 12:07:24 +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
jiangjianfeng 80cd1b69f7 Fix lint error in cargo-component 2024-12-02 16:32:34 +08:00
Shaowei Song ecad132ec9 Refactor the block layer by introducing `BioSegmentPool` 2024-12-02 13:25:20 +08:00
Shaowei Song d37da228ab Improve flexibility of `DmaStreamSlice` 2024-12-02 13:25:20 +08:00
Shaowei Song 29ebfa3934 Remove `BlocksHoleDesc` in ext2 for efficiency and fairness 2024-12-02 13:25:20 +08:00
Marsman1996 6d3bb5a9d0 Fix compile error caused by updated `Step::steps_between` in Rust 2024-12-01 18:56:28 +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 1b65ae6255 Fix deadlock in `line_discipline.rs` 2024-11-29 16:31:44 +08:00
Qingsong Chen f762eb8913 Remove the `lazy_static` dependency 2024-11-28 15:28:30 +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
Qingsong Chen 81898362b6 Add virtio legacy interface 2024-11-21 19:10:06 +08:00
jiangjianfeng 495c93c2ad Refactor Rwlock to take type parameter 2024-11-21 15:46:10 +08:00
Jianfeng Jiang c8c9b9753e Make all network benchmark run with tap backend and vhost on 2024-11-20 20:24:03 +08:00
Ruihan Li ec2c6ab7a3 Make `Pollee` semi-stateless 2024-11-20 16:39:18 +08:00
Ruihan Li 1c1da8ea06 Don't poll ifaces if not necessary 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
Marsman1996 1fac737646 Fix not write back error in (U)Random::read 2024-11-20 08:31:55 +08:00
Wang Siyuan 42b3541dcb Fix releasing lock during the creation of `VmMapping` 2024-11-20 08:21:37 +08:00
Ruihan Li b3f8d21c3d Refine comments about the lock usage 2024-11-19 18:01:33 +08:00
Ruihan Li 85e1f0973b Shorten type names 2024-11-19 18:01:33 +08:00
Ruihan Li 781ee0fa71 Fix visibility levels 2024-11-19 18:01:33 +08:00
Ruihan Li 83b6c03bd8 Split `epoll_file.rs` 2024-11-19 18:01:33 +08:00
Ruihan Li 60440d1062 Avoid deadlocks due to drops 2024-11-19 18:01:33 +08:00
Cautreoxit 885950c2a4 Add VirtioBlockFeature to cache virtio-blk's features 2024-11-17 15:32:56 +08:00
Cautreoxit 3cb7f5b721 Rename the methods in the interface of VirtioTransport 2024-11-17 15:32:56 +08:00
Cautreoxit 300403e3eb Implement sync for ext2 and exfat 2024-11-17 15:32:56 +08:00
Cautreoxit 32572e22d9 Implement flush for virtio-blk 2024-11-17 15:32:56 +08:00
Ruihan Li 197d53c0ab Accept sockets in the ESTABLISHED state 2024-11-16 13:25:19 +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
Ruihan Li 7850f7e60a Resolve `borrowed_box` lint 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
Ruize Tang 85d2c9634f Fix non-atomic write for PIPEs with data up to PIPE_BUF 2024-11-13 17:32:39 +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
Shaowei Song e453649d78 Correct the behavior when operating the root directory 2024-11-13 16:55:37 +08:00
Ruihan Li ac71234b89 Remove `{,un}register_observer` 2024-11-13 14:15:44 +08:00
Ruihan Li 054c64542b Use `PollAdaptor` to signal `SIGIO` 2024-11-13 14:15:44 +08:00
Ruihan Li 27ae4cb9e7 Use `PollAdaptor` in `EpollFile` 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
jiangjianfeng 38682e3ed9 Assign callback to shared irq if there's no single irq line 2024-11-12 17:47:40 +08:00
jiangjianfeng 9965802f65 Disable send callback if sendqueue is not full 2024-11-12 17:47:40 +08:00
Marsman1996 54e2ffbb71 Add check for `argc`, `arg_ptr` and `env_ptr` in `InitStackReader` 2024-11-12 11:35:46 +08:00
Ruize Tang 7fbe997bb3 Fix range_lock and flock to support signal interrupts and comply with wait API design 2024-11-12 11:33:44 +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
ZephyrZhang 10cc85d588 Add syscall `getpgid` 2024-11-09 10:20:57 +08:00
Marsman1996 f287110001 Fix `InitStackReader` to access given stack instead of current task 2024-11-09 10:06:45 +08:00
jiangjianfeng 4c80367bc8 Fix CI lint error 2024-11-08 10:53:30 +08:00
Ruihan Li 9707b46c7f Bump smoltcp version 2024-11-08 10:49:02 +08:00
Zhang Junyang 25a918d132 Print who and on which CPU the kernel panics 2024-11-07 16:39:47 +08:00
Jianfeng Jiang c1fd09fd41 Remove TimeWait socket if a new Syn is received 2024-11-07 14:21:52 +08:00
Ruihan Li 5233827160 Don't preempt without good reason 2024-11-06 21:53:55 +08:00
Ruihan Li 19b13d88e2 Fix `clone_exit_signal` test 2024-11-06 21:53:55 +08:00
Ruihan Li 768b182aba Make the code a bit cleaner 2024-11-06 21:53:55 +08:00
Fabing Li 1fe74c9c92 Add sys_getrlimit and sys_setrlimit 2024-11-06 21:53:31 +08:00
Zhang Junyang c34706603a Special treat VM Space clearing 2024-11-06 21:52:53 +08:00
Fabing Li 7a08d9a660 Support other SigStackFlags 2024-11-06 15:00:01 +08:00
Fabing Li 561516df98 Export /proc/cpuinfo 2024-11-06 14:54:28 +08:00
Shaowei Song aa52e3980e Minor fix on virtio-blk's config 2024-11-06 11:00:43 +08:00
Hsy-Intel a0a8493f98 Add TDX compilation test 2024-11-05 14:57:03 +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
Hsy-Intel 50773de35f Fix a TDX minor issue 2024-11-02 10:17:01 +08:00
Ruihan Li 7ddfd42baa Make `wait_events` support timeout 2024-11-01 13:00:40 +08:00
Ruihan Li f21394c679 Use more `wait_events` 2024-11-01 13:00:40 +08:00
Ruihan Li bbfc2cd12d Make `FileIo` pollable 2024-11-01 13:00:40 +08:00
Chen Chengjun 846b3ba169 Use LinkedList to store WorkItem to avoid additional heap allocation 2024-11-01 11:24:09 +08:00
Chen Chengjun 2ac6e0e126 Avoid adding worker during workqueue enqueueing 2024-11-01 11:24:09 +08:00
Shaowei Song 96a153dfc5 Implement dummy `metadata()` for epoll and socket files 2024-10-30 14:09:02 +08:00
Fabing Li 3461bd5de6 Add more boundary checks for epoll_wait 2024-10-30 10:42:16 +08:00
Jianfeng Jiang dc06d7c37d Support TCP sockets HUP&RDHUP events 2024-10-28 22:47:50 +08:00
Ruihan Li b5610f3034 Report `POLLNVAL` in `poll` for invalid FDs 2024-10-28 14:33:32 +08:00