Zhenchen Wang
3a5f270ee9
Made some minor improvements to syscall statx
...
Signed-off-by: Zhenchen Wang <m202372036@hust.edu.cn>
2025-04-23 20:39:54 +08:00
Zhenchen Wang
9e729593e8
Add syscall faccessat2
...
Signed-off-by: Zhenchen Wang <m202372036@hust.edu.cn>
2025-04-23 20:39:54 +08:00
Ruihan Li
26253829bb
Use `datagram_common` in netlink
2025-04-23 20:37:40 +08:00
Ruihan Li
c9f939bcc4
Create `datagram_common` and use it in UDP
2025-04-23 20:37:40 +08:00
Ruihan Li
96e62b8fa5
Reorder socket locks
2025-04-23 20:37:40 +08:00
jiangjianfeng
961ad73847
Poll the correct iface in irq handler
2025-04-23 00:32:37 +08:00
jiangjianfeng
8815ca384f
Add syscall ppoll
2025-04-21 11:19:48 +08:00
Chen Chengjun
1fe0fef410
Add ktests for the XArray
2025-04-19 16:48:15 +08:00
Chen Chengjun
c3dd607777
Introduce RCU-based XArray
2025-04-19 16:48:15 +08:00
Ruihan Li
81b79dacc6
Remove `read*_to_end` methods
2025-04-18 14:17:37 +08:00
Zejun Zhao
1c881d30f6
Add RISC-V build CI
2025-04-18 13:26:16 +08:00
Zejun Zhao
3aa1079ca6
Clarify the usage of ostd::arch
2025-04-18 13:26:16 +08:00
Zejun Zhao
14b8c48859
Adjust RISC-V's implementation for recent changes
2025-04-18 13:26:16 +08:00
Zejun Zhao
e4aa261c48
Make if_tdx_enabled macro x86-specific
2025-04-18 13:26:16 +08:00
Zhenchen Wang
7ac4fa9519
Add syscall statx
...
Signed-off-by: Zhenchen Wang <m202372036@hust.edu.cn>
2025-04-18 09:36:50 +08:00
Ruihan Li
d6e40933b8
Move the log lock to a better location
2025-04-16 21:59:24 +08:00
Zhang Junyang
85d4cdbbb0
Avoid excessive heap allocations in `sys_futex`
2025-04-15 21:56:15 +08:00
jiangjianfeng
5d84ac7775
Generate kernel response to user request
2025-04-15 17:20:12 +08:00
jiangjianfeng
3e66732889
Parse netlink message
2025-04-15 17:20:12 +08:00
jiangjianfeng
ac42e83387
Add basic structure for netlink route socket
2025-04-15 17:20:12 +08:00
jiangjianfeng
2c41055470
Expose more methods on bigtcp iface
2025-04-15 17:20:12 +08:00
jiangjianfeng
7d24e63216
Move network polling code to bottom half
2025-04-15 14:54:51 +08:00
jiangjianfeng
9804f053f2
Add guard which disables bottom half
2025-04-15 14:54:51 +08:00
Ruihan Li
a1f81df263
Remove `ostd/src/mm/offset.rs`
2025-04-15 09:15:22 +08:00
Ruihan Li
8600278a5f
Drop files at the correct time
2025-04-14 21:13:11 +08:00
Ruihan Li
7e1abc1fbb
Rename `ProcessVmarGuard::get` to `unwrap`
2025-04-14 21:13:11 +08:00
Ruihan Li
293f1ff4c9
Do `release_range_locks` in `Drop`
2025-04-14 21:13:11 +08:00
Chen Chengjun
a21e895102
Enable RCU to read reference to stored pointers
2025-04-10 14:42:51 +08:00
jiangjianfeng
b833ec6ede
Implement ReadCString for MultiRead
2025-04-09 16:47:11 +08:00
Ruihan Li
ceb79ea27a
Always move zombie children to init
2025-04-07 13:01:22 +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
Ruihan Li
0bbd56ecf3
Don't panic for missing virtio-net
2025-04-02 11:33:51 +08:00
jiangjianfeng
1846c680fc
Clone the reader to prevent cursor misplacement in `ReadCString`
2025-03-31 14:00:04 +08:00
Shaowei Song
2af71ff72a
Add xattr support for ext2
2025-03-28 15:08:59 +08:00
Shaowei Song
97c27e8d2a
Add xattr support for ramfs
2025-03-28 15:08:59 +08:00
Shaowei Song
a47eda413c
Add extended attribute (xattr) syscalls: setxattr, getxattr, listxattr and removexattr
2025-03-28 15:08:59 +08:00
Cautreoxit
b4a1dc03f3
Delete useless visibility for BARs
2025-03-27 18:44:15 +08:00
Cautreoxit
4fff7cdc22
Add an API for BioRequest to return the number of sectors
2025-03-26 10:38:24 +08:00
Cautreoxit
7a8afd8c48
Add a empty line after the license
2025-03-25 19:47:55 +08:00
jiangjianfeng
0e1c660225
Make VmReader's several methods accept `&mut self`
2025-03-25 14:25:08 +08:00
Yuke Peng
1f03955f51
Change IoMem directory
2025-03-22 17:38:30 +08:00
Zhang Junyang
4f0acddfd4
Strict TLB coherence
2025-03-21 21:19:50 +08:00
Zhang Junyang
30ec0be210
Halt the idle CPUs
2025-03-21 21:19:50 +08:00
Zhang Junyang
f1c7564184
Move CPU context implementations to a specific module
2025-03-21 21:19:50 +08:00
Zhang Junyang
298a205da2
Avoid an `Arc::clone` in `mmap` to make it scale
2025-03-21 20:09:42 +08:00
Zhang Junyang
f9284d3803
Workaround the missing process of a thread
2025-03-21 18:05:10 +08:00
Fabing Li
bce23a63bd
Add sys_signalfd/sys_signalfd implementation
2025-03-21 16:10:55 +08:00
Ruihan Li
bb1b41b413
Fix dead code lints
2025-03-21 16:00:35 +08:00
Hsy-Intel
49e6cd2712
Use macro to handle TDX-related code
2025-03-20 17:25:22 +08:00
Chen Chengjun
135100a472
Modify the getting-VMAR usages in other syscalls
2025-03-20 14:20:47 +08:00
Chen Chengjun
048fd1077c
Inject post_schedule/user_page_fault handler to OSTD
2025-03-20 14:20:47 +08:00
Chen Chengjun
2a20f6b59a
Add mutable functionality to the process VMAR
2025-03-20 14:20:47 +08:00
Chen Chengjun
248b24fb4e
Remove UserSpace abstraction from OSTD
2025-03-20 14:20:47 +08:00
Ruihan Li
d9f3a7761a
Notify socket events directly
2025-03-20 11:44:47 +08:00
Ruihan Li
2f66f5d234
Revert "Set hash buckets as 2 to work around performance bottleneck"
...
This reverts commit 631ab21838 .
2025-03-20 11:44:47 +08:00
Ruihan Li
7f323ac501
Don't remove TIME-WAIT sockets
2025-03-20 11:44:47 +08:00
Ruihan Li
240192f735
Make connection addition and deletion in order
2025-03-20 11:44:47 +08:00
Ruihan Li
a7e718e812
Avoid `O(n)` iteration when sending TCP packets
2025-03-20 11:44:47 +08:00
Zejun Zhao
73e0b30785
Eliminate redundant check in hot path
2025-03-20 10:45:16 +08:00
Zejun Zhao
c1e6f9a552
Eliminate redundant Clone in hot path
2025-03-20 10:45:16 +08:00
Zhang Junyang
288942b970
Revise the docs of the slab and remove an unused type
2025-03-14 21:17:47 +08:00
Zhang Junyang
a708a0c046
Inject a scalable slab allocator
2025-03-14 19:55:00 +08:00
jiangjianfeng
d366043876
Enable sig_action test from gVisor test
2025-03-14 16:09:11 +08:00
jiangjianfeng
7e96810e1a
Remove trampoline code in handling user kernel
2025-03-14 16:09:11 +08:00
Zhang Junyang
5f05963ee5
Inject a scalable buddy system allocator to OSTD
...
Co-authored-by: Zhe Tang <tangzh@stu.pku.edu.cn>
2025-03-14 08:37:37 +08:00
Zejun Zhao
455b8abba0
Adopt a round-robin strategy to select among equally idle CPUs
2025-03-13 16:28:02 +08:00
Hsy-Intel
7b5f2c414a
Use the latest tdx-guest crate version to fix the TDX init issue
2025-03-13 12:56:46 +08:00
Ruihan Li
d40d452e9d
Receive RST packets as `ECONNRESET` errors
2025-03-10 18:08:08 +08:00
Ruihan Li
aa29640ed7
Send RST packets when appropriate
2025-03-10 18:08:08 +08:00
Ruihan Li
eef56c770b
Simplify the TCP state check
2025-03-10 18:08:08 +08:00
Hsy-Intel
9edee83ef1
Use the latest tdx-guest crate version to fix the MMIO emulation issue
2025-03-10 17:58:35 +08:00
jiangjianfeng
388eec449a
Add ip level socket option
2025-03-07 13:38:02 +08:00
js2xxx
ffc7e3612d
Fix `RLimit` lock update
2025-03-06 21:29:40 +08:00
js2xxx
c1dde01fc3
Add `sched_attr` system call series
2025-03-06 21:29:40 +08:00
Ruihan Li
9e1c939a3f
Remove `static_assertions`
2025-03-06 16:35:21 +08:00
Ruihan Li
0d36375dfa
Avoid `generic_const_exprs` feature
2025-03-06 16:35:21 +08:00
Shaowei Song
d19578ac78
Pooling some cached block writes in ext2
2025-03-06 11:43:07 +08:00
Wang Siyuan
5bfdcfc619
Add memory resource limit mechanism
2025-03-06 11:22:05 +08:00
Wang Siyuan
eca3c8fb59
Refactor RLimit64 to atomic
2025-03-06 11:22:05 +08:00
Yuke Peng
96d83e43b4
Make VirtioConsolesPrinter heapless
2025-03-05 20:24:59 +08:00
Ruihan Li
d37e60d082
Report socket errors in `send`/`recv`
2025-03-05 19:48:28 +08:00
Ruihan Li
68cf99993e
Remove socket errors from `SocketOptionSet`
2025-03-05 19:48:28 +08:00
Chen Chengjun
801eac9386
Support PR_SET/GET_CHILD_SUBREAPER for sys_prctl
2025-03-03 19:31:50 +08:00
Zhang Junyang
55ee4bda2c
Use RCU for console device callbacks
2025-03-03 09:24:49 +08:00
Zhang Junyang
78a695f21b
Use `RcuOption` for lazy-initialized soft-IRQ callbacks
2025-03-03 09:24:49 +08:00
wheatfox
6d42a07e95
Implement `getcpu` syscall and add corresponding test application
2025-02-27 11:41:26 +08:00
Fabing Li
cbb4b4e631
Fix lint errors
2025-02-27 11:36:41 +08:00
Ruihan Li
18e0eae331
Never expose `ERESTARTSYS` to the userspace
2025-02-23 23:11:05 +08:00
Ruihan Li
8187fa2f1b
Fix timeout mechanism in `wait_events`
2025-02-23 23:11:05 +08:00
Ruihan Li
2411ba671c
Reapply "Make `pause_timeout` return `EINTR`"
...
This reverts commit 7a017faa44 .
2025-02-23 23:11:05 +08:00
Zejun Zhao
29791ba77e
Distribute tasks among all the CPUs
2025-02-21 10:02:46 +08:00
Ruihan Li
0398ea3d17
Split `bound.rs` into small files
2025-02-18 19:20:05 +08:00
Qingsong Chen
04be02efb7
Add init_component for mlsdisk
2025-02-11 11:38:43 +08:00
Qingsong Chen
f6e040ec94
Add a basic ktest for mlsdisk
2025-02-11 11:38:43 +08:00
Qingsong Chen
d8dc153be9
Fix deadlock of `CurrentTx` in mlsdisk
2025-02-11 11:38:43 +08:00
Qingsong Chen
c040df72b3
Rename `SwornDisk` to `MlsDisk`
2025-02-11 11:38:43 +08:00
Shaowei Song
328ba47ccd
Fix and revise the directory entry handling in ext2
2025-02-11 11:33:31 +08:00
Zejun Zhao
d71771e49a
Re-enable CFS
2025-02-11 10:51:12 +08:00
Zejun Zhao
c2f48a41db
Clean up the implementation of scheduling class
2025-02-11 10:51:12 +08:00
jiangjianfeng
3f951e0c0c
Enable gVisor tcp_socket_test
2025-02-11 10:50:20 +08:00
Zhang Junyang
e1ced5f385
Conditionally compile dead code in `interval_set.rs`
2025-02-11 10:48:34 +08:00
Shaowei Song
fecf766771
Revise the cache page allocation for `PageCacheManager`
2025-02-11 10:48:12 +08:00
jiangjianfeng
55713b88c4
Remove unused dependencies
2025-02-10 10:36:56 +08:00
Ruihan Li
418f58ec89
Avoid locking twice in UDP `send`
2025-02-08 15:44:44 +08:00
Ruihan Li
6a13787c49
Implementing `FileLike` for all `Socket`s
2025-02-08 15:44:44 +08:00
Ruihan Li
3c6737a4ca
Revise doc comments for `Socket`
2025-02-08 15:44:44 +08:00
Ruihan Li
a6b3a65fe5
Don't allocate when possible in `do_poll`
2025-02-08 15:43:20 +08:00
Ruihan Li
95bbc7f367
Enforce `#[expect(lint)]`
2025-02-08 15:10:04 +08:00
Ruihan Li
0dca168717
Use `#[expect(lint)]`, not `#[allow(lint)]`
2025-02-08 15:10:04 +08:00
Ruihan Li
1899646391
Fix `#[allow(dead_code)]` in cpio-decoder
2025-02-08 15:10:04 +08:00
Ruihan Li
09ef817b4e
Fix `#[allow(dead_code)]` in typeflags
2025-02-08 15:10:04 +08:00
Ruihan Li
1c4e88e648
Fix `#[allow(dead_code)]` in virtio
2025-02-08 15:10:04 +08:00
Ruihan Li
b415538097
Remove useless `#[allow(lint)]`
2025-02-08 15:10:04 +08:00
Shaowei Song
56b85cb132
Cache negative dentries for faster negative lookups
2025-01-24 11:48:15 +08:00
jiangjianfeng
14f0f5a7b5
Avoid iterating over all sockets to remove dead sockets
2025-01-24 11:46:18 +08:00
Ruize Tang
c4229e3c2f
Add INITRAMFS_SKIP_GZIP option to make initramfs encoding/decoding faster
2025-01-23 10:50:43 +08:00
Ruihan Li
b472737771
Resolve FIXME in pipe tests
2025-01-23 09:57:10 +08:00
Ruihan Li
2cf4aebe7a
Use `FnOnce() + Send` as task `func`
2025-01-23 09:57:10 +08:00
Shaowei Song
6a865062e6
Unify and optimize the comparison of special file names
2025-01-21 11:34:56 +08:00
Fabing Li
aa5bc6ff73
Fix the unit of meminfo
2025-01-21 11:29:08 +08:00
Shaowei Song
6de5be1ecc
Make the generic inode permisson check faster
2025-01-10 10:21:52 +08:00
Ruihan Li
b9ce3e64ad
Make the file lookup faster
2025-01-09 10:58:16 +08:00
Ruihan Li
16db96e496
Adjust `as_socket` signature
2025-01-09 10:58:16 +08:00
Ruihan Li
a7741a8a75
Remove `as_device` from `FileLike`
2025-01-09 10:58:16 +08:00
Zhang Junyang
5ea366bced
Move kcmdline parsing out of OSTD
2025-01-02 10:41:51 +08:00
Zhang Junyang
397ce9652f
Refactor boot modules to make heap allocation explicit
2025-01-02 10:41:51 +08:00
Zhang Junyang
51349a3da1
Heapless memory region initialization
2025-01-02 10:41:51 +08:00
jiangjianfeng
0c8200dc7b
Add nginx benchmark and workaround
2025-01-01 10:43:14 +08:00
Qingsong Chen
56a137dc56
Add mlsdisk as a component
...
Co-authored-by: Shaowei Song <songshaowei.ssw@antgroup.com>
2025-01-01 09:19:32 +08:00
jiangjianfeng
631ab21838
Set hash buckets as 2 to work around performance bottleneck
2024-12-31 13:19:30 +08:00
Ruihan Li
7334c93ff5
Make bigtcp error wrappers consistent
2024-12-30 21:41:51 +08:00
jiangjianfeng
39cc0dca26
Add socket hash table
2024-12-30 09:46:14 +08:00
jiangjianfeng
783345b90b
Add Bob Jenkins's hash algorithm
2024-12-30 09:46:14 +08:00
js2xxx
0d30ce0b2c
Improve readability on `SchedPolicy` storage & reduce memory foot print on sched entities
2024-12-30 09:38:48 +08:00
js2xxx
364d6af7c8
Reduce the held time of scheduling policy lock
2024-12-30 09:38:48 +08:00
Zejun Zhao
ea953209ff
Add a fast path while picking next thread from RT scheduling class
2024-12-28 14:30:33 +08:00
Shaowei Song
f739c67ed3
Issue device sync request at the end of ext2's sync
2024-12-27 12:23:19 +08:00
Shaowei Song
4d5d0942ad
Minor improvements to ext2 inode
2024-12-27 12:23:19 +08:00
Shaowei Song
0799976018
Improve directory entry handling efficiency in ext2
2024-12-27 12:23:19 +08:00
Zhang Junyang
ff453f5933
Use `CachePage` in all related block functions
2024-12-27 12:12:51 +08:00
Zhang Junyang
983a6af3cc
Polish the doc and rename variables in `ostd::mm`
2024-12-27 12:12:51 +08:00
Zhang Junyang
f332797084
Use frame metadada for page cache
2024-12-27 12:12:51 +08:00
Zhang Junyang
cdac59beda
Implement a new set of physical page APIs
2024-12-27 12:12:51 +08:00
Zhang Junyang
c9a37ccab1
Renaming concepts around pages and frames
...
This commit renames `Frame` -> `UntypedFrame` and `Page` -> `Frame`.
So do other concepts in the following list:
- `Segment` -> `UntypedSegment`,
- `ContPages` -> `Segment`,
- `DynPage` -> `AnyFrame`,
- `PageMeta` -> `FrameMeta`,
- `FrameMeta` -> `UntypedMeta`.
This commit also re-organized the source in the `mm/page` and `mm/frame`
module to accommodate the changes.
2024-12-27 12:12:51 +08:00
Zhang Junyang
10f1856306
Remove the vectorized page allocation
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
Zejun Zhao
6cea8d2a8c
Make stop runqueue per-CPU
2024-12-26 14:54:22 +08:00
Ruihan Li
0bfe7aceb8
Utilize `ThreadLocal`
2024-12-26 14:51:20 +08:00
Marsman1996
3e47ed10fd
Check name when `lookup_child` in `TaskDirOps`
2024-12-26 09:06:18 +08:00
Marsman1996
9753d796c5
Add overflow check for futex_addr
2024-12-26 09:05:24 +08:00
Marsman1996
1a5bf7b0ad
Add overflow check for given sigaltstack addr and size
2024-12-25 15:46:17 +08:00
Ruihan Li
7c249cf0ca
Fix the memory order in `Subject`
2024-12-25 15:28:35 +08:00
Wang Siyuan
6e46641a09
Fix a mmap `MAP_FIXED` issue
2024-12-24 09:10:10 +08:00
Wang Siyuan
1e3403e756
Support ELF files with zero `p_filesz`.
2024-12-22 15:16:22 +08:00
Shaowei Song
104c8dfdde
Optimize the `DirEntry` lookup in ext2
2024-12-20 09:36:16 +08:00
Shaowei Song
21da6d2b93
Optimize lock usage in ext2 inodes
2024-12-20 09:36:16 +08:00
Marsman1996
3d12ccdbea
Warn unsupported clone flags instead of panic
2024-12-20 09:21:25 +08:00
jiangjianfeng
9a540d0fb6
Notify virtqueue in a batch manner
2024-12-19 14:49:56 +08:00
jiangjianfeng
72cb160539
Add keepidle tcp option
2024-12-18 13:19:34 +08:00
Shaowei Song
00b194812d
Prepare "/dev/shm" for POSIX shared memory
2024-12-18 12:26:33 +08:00
lab-pc-wtj
6e4a4c58d0
Improve /proc/{PID}/stat
2024-12-18 10:00:15 +08:00
Ruihan Li
776fd6a892
Create backlog sockets on demand
2024-12-17 20:14:53 +08:00
Fabing Li
24f1e02b26
Support prctl(PR_SET_KEEPCAPS/PR_GET_KEEPCAPS)
2024-12-17 20:14:13 +08:00
Fabing Li
d72ce0351a
Add permission checks for sys_capset
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
1b56a8b600
Enable syscall restart
2024-12-16 21:12:08 +08:00
Zejun Zhao
ced0023d6b
Introduce a syscall restart mechanism
2024-12-16 21:12:08 +08:00
Zhang Junyang
285dde5546
Set affinity for BSP idle thread
2024-12-16 19:15:59 +08:00
Fabing Li
327a6b5e30
Export /proc/self-thread
2024-12-15 16:52:24 +08:00
Fabing Li
532dac8fe3
Export /proc/[pid]/task and /proc/[pid]/task/[tid]
2024-12-15 16:52:24 +08:00
jiangjianfeng
58cf8ea681
Set keepalive and tcp_nodelay on underlying sockets
2024-12-15 16:50:43 +08:00
Roman Korostinskiy
3bbdc68d39
Fix linter errors
2024-12-15 16:37:40 +08:00
Roman Korostinskiy
13229cc037
Implement totalram and freeram computation for sysinfo
2024-12-15 16:37:40 +08:00
Roman Korostinskiy
73b94acf2b
Fix linter errors
2024-12-15 16:37:40 +08:00
Roman Korostinskiy
4f653acfa3
Implementation of uptime for sysinfo
2024-12-15 16:37:40 +08:00
Roman Korostinskiy
b4ebd6e87f
Make stub for sysinfo syscall
2024-12-15 16:37:40 +08:00
Ruihan Li
53b873f647
Add `get_mut` methods for locks
2024-12-15 16:36:54 +08:00
Shaowei Song
4cb85f0adb
Fix dependency issue between components `logger` and `virtio`
2024-12-13 10:36:45 +08:00
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
Ruihan Li
390aa411bd
Beautify the `poll()` system call
2024-10-28 14:33:32 +08:00
jellllly420
6ece48c095
Refactor process table
2024-10-28 13:00:13 +08:00
Zhang Junyang
1b23182dcc
Fix the thread status ordering by limiting the API
2024-10-26 22:06:41 +08:00
Zhang Junyang
e319641b4d
Implement system call `sched_get/set_affinity`
2024-10-26 22:06:41 +08:00
Zhang Junyang
3468ec213b
Use `CpuId` with validity ensurance rather than `u32`
2024-10-26 22:06:41 +08:00
Chen Chengjun
e60b5b7649
Refine mapping-related locks
2024-10-26 21:55:48 +08:00
Ruize Tang
968389f550
Fix lost wakeup in `range_lock` caused by waiting on an outdated waitqueue
2024-10-26 21:44:03 +08:00
Ruize Tang
e5fd8e7477
Fix flock lost-wakeup bugs, replace RwMutex -> Mutex
2024-10-26 21:23:50 +08:00
ZephyrZhang
885e4315e3
fix a comment typo at kernel/src/syscall/mod.rs
2024-10-25 13:26:45 +08:00
Fabing Li
9f188837ae
Add /proc/[pid]/stat and /proc/[pid]/status
2024-10-24 19:17:20 +08:00
Zhang Junyang
4658b62f90
Treat thread oops with better care to avoid silent panics
2024-10-22 10:08:24 +08:00
Hsy-Intel
b7d101b98c
Fix MMIO read issue
2024-10-21 17:49:56 +08:00
Wang Siyuan
998869d57e
Refactor kernel virtual memory allocation for kernel stack and I/O memory
2024-10-21 09:53:05 +08:00
Ni Shirong
29eb37c07c
Introduce kernel virtual memory allocation for kernel stack
2024-10-21 09:53:05 +08:00
Wang Taojie
03906513aa
Clear one bit instead
2024-10-21 09:43:43 +08:00
Wang Taojie
89d04ecf7d
Implement ioctl() FIOCLEX command
2024-10-21 09:43:43 +08:00
Zhang Junyang
4823b82e41
Catch panics in threads as oops
2024-10-20 13:24:58 +08:00
Zhang Junyang
a716763772
Remove the linkage feature usage for `ostd::main`
2024-10-20 13:24:58 +08:00
jellllly420
3c857d746e
Clear TID before doing futex_wake when exiting a POSIX thread
2024-10-20 13:21:27 +08:00
Chen Chengjun
2f511069ee
Move SoftIRQ implementations to softirq component
2024-10-18 09:35:40 +08:00
le-monde-bleu
54a807b5f7
Modify asterinas/kernel/src/process/posix_thread/mod.rs
2024-10-18 09:31:25 +08:00
Zhang Junyang
1fe0a138f9
`PROT_WRITE` implies `PROT_READ` on x86
2024-10-17 08:56:47 +08:00
Hsy-Intel
c28cec2c6a
Fix minor bugs in TDX env
2024-10-14 21:03:47 +08:00
jiangjianfeng
090149eed7
Add tcp latency test over virtio-net
2024-10-14 20:59:25 +08:00
jiangjianfeng
002a67451d
Update line discipline pollee immediately
2024-10-14 16:39:34 +08:00
Marsman1996
e32687e6d5
do_exit: Ignore unwrap panic caused by munmap
2024-10-14 14:48:43 +08:00
Zhang Junyang
9e4257b655
Fix multiple issues pointed out by the new compiler
2024-10-13 22:32:05 +08:00
Shaowei Song
ee33216875
Fix the incorrect range in `SegmentSlice`
2024-10-12 19:58:10 +08:00
Wang Taojie
bdf89a5de3
Implement getcwd()
2024-10-12 09:58:45 +08:00
Shaowei Song
ea489252f4
Refactor `Dentry` to optimize the vfs layer
2024-10-11 11:22:52 +08:00
Shaowei Song
271e893889
Revise `MountNode`'s lock usage
2024-10-11 11:22:52 +08:00
Ruihan Li
0415225c19
Fix IRQ-related socket locks
2024-10-10 20:36:22 +08:00
Ruihan Li
7e21e1e653
Revise socket option handling
2024-10-10 20:36:22 +08:00
Ruihan Li
b9b09b8142
Don't lock `Mutex` in `EpollEntry::on_events`
2024-10-10 19:23:09 +08:00
Zhang Junyang
909639fd70
Separate `SegmentSlice` from `Segment`
2024-10-09 19:23:46 +08:00
Shaowei Song
dad56e1664
Refactor the lock usages within `RamInode`
2024-10-08 16:56:02 +08:00
Ruihan Li
96efd62007
Use `LocalIrqDisable` in `Subject`
2024-10-04 21:55:48 +08:00
Yuke Peng
7d5a2b7a79
[VirtIO] Correct the error code when device not match
2024-10-04 10:28:59 +08:00
Ruihan Li
76d4b180d0
Increase the TCP socket buffer length
2024-09-30 20:37:57 +08:00
Marsman1996
44760eb5fa
Return when sigset size error for rt_sigsuspend, rt_sigprocmask and rt_sigaction
2024-09-30 20:24:23 +08:00
Ruihan Li
ee1656ba35
Move packet dispatch out of smoltcp
2024-09-30 16:00:51 +08:00
jiangjianfeng
f793259512
Avoiding busy loop in sending packet and optimize device caps
2024-09-30 15:03:58 +08:00
Chen Chengjun
8f50391a4e
Optimize the clear procedure of the page table
2024-09-30 10:46:30 +08:00
YanWQ-monad
4fa0e6334b
Add RISC-V base support
2024-09-30 10:02:08 +08:00
YanWQ-monad
839c2a6689
Extract shared code from timer
2024-09-30 10:02:08 +08:00
jellllly420
5c8e369057
Enable scheduler to fetch scheduling information directly from Thread
2024-09-27 10:21:45 +08:00
jellllly420
9cc63149f1
Remove cpu_affinity field from OSTD Task struct
2024-09-27 10:21:45 +08:00
jellllly420
8927031426
Remove priority field from OSTD Task struct
2024-09-27 10:21:45 +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
Zhang Junyang
fad39fdf7a
Make TLB flush policy relaxed
2024-09-26 19:29:59 +08:00
Zhang Junyang
52f1787d35
Remove syncronizations for the `VmSpace` PF handler
2024-09-26 19:29:59 +08:00
Zhang Junyang
7407cc8091
Remove some repetitive locks forking `Vmar`
2024-09-26 19:29:59 +08:00
Zhang Junyang
ac6d9256ef
Improve the `VmSpace` forking API
2024-09-26 19:29:59 +08:00
Marsman1996
d4036d1e9d
Handle error in `FsResolver::create_new_file()`
2024-09-26 17:45:00 +08:00
Shaowei Song
f2af6136da
Minor optimizations on both `lat-syscall-stat` and `lat-syscall-open`
2024-09-26 15:25:49 +08:00
Ruihan Li
fc77c474db
Move and group methods
2024-09-26 15:22:16 +08:00
Ruihan Li
3fc396f5f1
Adjust the ephemeral port
2024-09-26 15:22:16 +08:00
Ruihan Li
eb3a033496
Refine some lock usages
2024-09-26 15:22:16 +08:00
Ruihan Li
b13a82dc61
Bump smoltcp version
2024-09-26 15:22:16 +08:00
Ruihan Li
51334c4a36
Clean up smoltcp dependencies
2024-09-26 15:22:16 +08:00
Ruihan Li
d62bb1ca76
Use static IP addresses
2024-09-26 15:22:16 +08:00
Jianfeng Jiang
fb718fd440
Optimize the latency of lat-sig-install
2024-09-25 17:29:20 +08:00
jellllly420
21fedd1b60
Implement atomic wrapper for integer-like type
2024-09-25 14:47:37 +08:00
Shaowei Song
ae4ac38471
Optimize the cache and lock parts in `MountNode`
2024-09-25 11:22:24 +08:00
Shaowei Song
791c566b71
Optimize the cache and lock parts in `Dentry`
2024-09-25 11:22:24 +08:00
Shaowei Song
2c6dd074d1
Refactor the path lookup in `FsResolver`
2024-09-25 11:22:24 +08:00
Ruihan Li
1aa8b0abc6
Correct lock usages in UNIX sockets
2024-09-24 20:49:48 +08:00
Marsman1996
cbe85a1878
Add check for negative `timeval_t.sec` in `do_futimesat`
2024-09-24 20:36:29 +08:00
Ruihan Li
179705a3fc
Fix RamFS readahead
2024-09-24 20:34:19 +08:00
YanWQ-monad
4d36dd541f
Extract x86-specific exception handling in aster-nix
2024-09-23 19:39:45 +08:00
Yuke Peng
46708f84bc
Implement futex private flag
2024-09-22 16:00:56 +08:00
Yuke Peng
228cfe2262
Preallocate some space when expanding size in ext2
2024-09-21 20:22:39 +08:00
Yuke Peng
550eafcb79
Preallocate some space when expanding size in ramfs
2024-09-21 20:22:39 +08:00
Zhang Junyang
9a79ecbcbe
Clean up the frame buffer state in `ostd::mm`
2024-09-21 15:38:15 +08:00
YanWQ-monad
2a6733579d
Refactor architecture-specific page fault handling
2024-09-20 10:56:13 +08:00
Jianfeng Jiang
c5009e38f1
Add pipe/short_rw test
...
Co-authored-by: Ruihan Li <lrh2000@pku.edu.cn>
2024-09-20 10:37:20 +08:00
Jianfeng Jiang
985813c7f9
Use IoVec-based reader/writer to refactor network APIs
2024-09-20 10:37:20 +08:00
Marsman1996
b4003b8aeb
Add normalize for `timeval_t` and const value for time
2024-09-20 10:35:03 +08:00
Marsman1996
4fa4e5ef2a
Add check during the conversion from `timeval_t` to `Duration`
2024-09-20 10:35:03 +08:00
Jianfeng Jiang
70505ff4f8
Support futex wait timeout
2024-09-19 22:42:13 +08:00
Qingsong Chen
c2f7a10b84
Implement cpu_local with GS and ensure GS points to TSS
2024-09-19 13:00:36 +08:00
Jianfeng Jiang
f159b42b61
Fix the condition in is_last_thread
2024-09-18 16:59:17 +08:00
Ruihan Li
2bda8d17c4
Rename some misleading method names
2024-09-17 17:46:56 +08:00
Ruihan Li
cefeea7b50
Revise `IoMem::resize` into `IoMem::slice`
2024-09-17 17:46:56 +08:00
Ruihan Li
c8ba695c85
Implement `VmIoOnce` for `IoMem`
2024-09-17 17:46:56 +08:00
Ruihan Li
aa62f0a4e6
Make `field_ptr!` accept `VmIoOnce`
2024-09-17 17:46:56 +08:00
Shaowei Song
22b04ceae4
Optimize the `DirEntry` of `RamInode`
2024-09-16 15:59:59 +08:00
Shaowei Song
f194514100
Optimize the page cache within a `RamInode`
2024-09-16 15:59:59 +08:00
Marsman1996
44629e4627
Fix panic in FutexKey::load_val when no read access
2024-09-14 22:45:59 +08:00
Jianfeng Jiang
f3174dbbbc
Make task store Arc<Thread> and process store Arc<Task>
2024-09-14 17:34:14 +08:00
Jianfeng Jiang
81b0f265b5
Move Tid from Thread to PosixThread
2024-09-14 17:34:14 +08:00
Zhang Junyang
195fe855a1
Mark all surrounding pages accessed on page fault
2024-09-14 17:29:39 +08:00
Chen Chengjun
42e28763c5
Replace the Pausers' usage with Waiter/WaitQueue
2024-09-14 13:59:07 +08:00
Chen Chengjun
822caf34f4
Move Pauser's functionality to Waiter/WaiterQueue and add the per-thread signalled waker
2024-09-14 13:59:07 +08:00
Chen Chengjun
1873bb7a3f
Add wait_until_* functionality to Waiter
2024-09-14 13:59:07 +08:00
Chen Chengjun
6a5a5b4d3d
Add a fast path to has_pending
2024-09-14 13:59:07 +08:00
Marsman1996
fc895c5697
Fix panic in `mmap` by invalid `perms`
2024-09-13 23:42:37 +08:00
Marsman1996
8421046dba
Return when sigset size error
2024-09-13 22:12:50 +08:00
Ruihan Li
320092eda2
Implement blocking `connect` properly
2024-09-13 22:09:46 +08:00
Ruihan Li
6f915133b5
Fix error codes in `bind`
2024-09-13 22:09:46 +08:00
Ruihan Li
a345e11b96
Fix error codes in `send`, `recv`, `accept`
2024-09-13 22:09:46 +08:00
Ruihan Li
a8592a16ea
Fix I/O events related to shutdown
2024-09-13 22:09:46 +08:00
Ruihan Li
421f6b8e5b
Fix I/O events cross different states
2024-09-13 22:09:46 +08:00
Ruihan Li
f831f5685f
Fix I/O events for UNIX connected sockets
2024-09-13 22:09:46 +08:00
Shaowei Song
7ddb69f4db
Make special devices go to the `FileIo` fast path
2024-09-13 22:09:06 +08:00
Ruihan Li
1b9b76d27c
Make use of new `SpinLock` APIs
2024-09-13 21:31:20 +08:00
Ruihan Li
67d3682116
Move smoltcp-related code to bigtcp
2024-09-13 21:31:20 +08:00
Ruihan Li
9fba9445bd
Introduce `IpIface` and `EtherIface`
2024-09-13 21:31:20 +08:00
Ruihan Li
dd2cde3aee
Introduce `IfaceExt`
2024-09-13 21:31:20 +08:00
Ruihan Li
538065b42f
Remove unused methods and revise documentations
2024-09-13 21:31:20 +08:00
Ruihan Li
7a13c0dff6
Fix behavior related to EPOLLONESHOT
2024-09-13 21:02:06 +08:00
Ruihan Li
0a053404b9
Adjust error messages
2024-09-13 21:02:06 +08:00
Ruihan Li
6151d65cf5
Fix poll behavior
2024-09-13 21:02:06 +08:00
Ruihan Li
479d98c8b9
Use `(fd, file)` as the key
2024-09-13 21:02:06 +08:00
Ruihan Li
d70ae181b5
Avoid nested loops
2024-09-13 21:02:06 +08:00
Ruihan Li
25daab7e78
Avoid duplicate code
2024-09-13 21:02:06 +08:00
Ruihan Li
fa52eeb88f
Remove unnecessary `is_deleted`
2024-09-13 21:02:06 +08:00
Zhang Junyang
bec2c97637
Don't copy on write if this is the only reference
2024-09-13 20:10:03 +08:00
Zhang Junyang
f13e5d12c1
Set right A/D bits at the right place
2024-09-13 20:10:03 +08:00
Zhang Junyang
4e9460593d
Check for the mapping status before handling the page fault
2024-09-13 20:10:03 +08:00
Zhang Junyang
d9eccdcfbe
Implement remote TLB flush on `VmSpace`
2024-09-13 20:10:03 +08:00
Yuke Peng
63364813a8
Change idle task to lowest priority
2024-09-13 19:52:00 +08:00
Shaowei Song
1186fb7ca9
Use `SpinLock` on `FileTable` for efficiency
2024-09-13 19:48:26 +08:00
Shaowei Song
4a43e317b2
Use `SpinLock` on `Subject`
2024-09-13 19:48:26 +08:00
Marsman1996
6fcad6ce14
Fix integer overflow in handle_page_faults_around
2024-09-12 21:24:42 +08:00
Ruize Tang
b88c490ff7
Fix incorrect return value for semctl GETZCNT/GETNCNT
2024-09-12 21:09:57 +08:00
Chen Chengjun
1fb34780f6
Eliminate an additional current!() operation in user space pagefault handling
2024-09-12 21:09:16 +08:00
Zhang Junyang
53ce7df53c
Warn instead of panic on long clock update interval
2024-09-12 17:53:14 +08:00
Qingsong Chen
787604b7f6
Use ParentProcess to cache parent pid
2024-09-12 17:41:56 +08:00
Shaowei Song
8bfbdf6642
Optimize the lock usage in `RamInode`'s read/write
2024-09-11 12:59:31 +08:00
Marsman1996
42f3411337
Fix index out of bound when `key` of `semget` too large
2024-09-11 12:43:49 +08:00
Zhang Junyang
c68302f700
Don't hold any locks while waiting in `EpollFile`
2024-09-07 06:47:12 +08:00
Shaowei Song
9638744712
Unseekable files need not to manipulate the `offset`
2024-09-02 18:42:35 +08:00
Yuke Peng
6ce50fab1c
Refactor semaphore to support atomic semop
2024-09-02 17:12:04 +08:00
Shaowei Song
dcc9600cb4
Do not modify timestamps on device read/write
2024-09-02 17:09:16 +08:00
Marsman1996
745ac6d982
Set overflow boundary to `isize::MAX` for memory related syscalls
2024-09-01 15:40:46 +08:00
Marsman1996
9589b332aa
Add more overflow checks in `mmap`
2024-09-01 15:40:46 +08:00
Marsman1996
e184094648
Fix integer overflow caused by page align
2024-09-01 15:40:46 +08:00
Marsman1996
0a8ad6971a
Fix integer overflow caused by large addr + size in memory related syscall
2024-09-01 15:40:46 +08:00
Yuke Peng
db16caf28c
[Semaphore] Replace Mutex with SpinLock
2024-08-30 22:52:24 +08:00
Yuke Peng
b17e3e24d8
[Semaphore] Avoid using `CurrentUserSpace::get`
2024-08-30 22:52:24 +08:00
Yuke Peng
d88d8fd307
[Semaphore] Remove duplicate PID and time settings
2024-08-30 22:52:24 +08:00
Yuke Peng
3297976700
[Semaphore] Optimize the update_pending_ops
2024-08-30 22:52:24 +08:00
Yuke Peng
a8970daec2
[Semaphore] Remove Box in pending_ops
2024-08-30 22:52:24 +08:00
Fabing Li
6ce25dc38b
Fix lock releasing of fcntl
2024-08-29 17:06:01 +08:00
Fabing Li
be8cc24544
Fix infinite waiting of range locks
2024-08-29 17:06:01 +08:00
Shaowei Song
5bc696a85a
Make the allocated segment uninitialized in the ring buffer
2024-08-29 12:30:04 +08:00
Shaowei Song
e6f465b553
Replace all the ring buffers with the new one
2024-08-29 00:33:47 +08:00
Shaowei Song
923b3704d7
Add a new ring buffer backed by a `Segment`
2024-08-29 00:33:47 +08:00
jellllly420
59b7a9397f
Fix deadlock while acquiring lock on local runqueue
2024-08-29 00:32:12 +08:00
Ruihan Li
65aa156e92
Implement UNIX abstract address namespace
2024-08-28 19:54:36 +08:00
Shaowei Song
aae9fdb331
Add assembly `memset` for fast filling zeros
2024-08-28 18:06:04 +08:00
Jianfeng Jiang
a72c7dadf3
Optimize the latency of lmbench-signal-prot
2024-08-28 14:27:41 +08:00
Yuke Peng
434f143e30
Pass can reuse to bind_socket
2024-08-28 14:01:18 +08:00
Yuke Peng
dc4df47007
Implement UDP getsockopt and setsockopt
2024-08-28 14:01:18 +08:00
Chen Chengjun
ffc717f00b
Enable handling page fault around
2024-08-28 11:04:03 +08:00
Yuke Peng
a5e6c11d1a
Correct FcntlCmd
2024-08-27 22:14:40 +08:00
Zhang Junyang
47be0a909b
Schedule tasks to APs in `aster-nix`
2024-08-27 17:22:47 +08:00
Zhang Junyang
ed82c11dd3
Use a `SpinLock` for the thread table instead of `Mutex`
2024-08-27 17:22:47 +08:00
Cautreoxit
86f09eef75
Fix all spelling mistakes in history by typos tool
2024-08-27 12:19:48 +08:00
Jianfeng Jiang
aa77747f94
Make mprotect&munmap return fast when len is zero
2024-08-26 12:06:31 +08:00
Jianfeng Jiang
212440dbb1
Fix: mmap len cannot be zero
2024-08-26 12:06:31 +08:00
jellllly420
32a1a53ee7
Enable check of atomic mode
2024-08-26 10:23:25 +08:00
Zhang Junyang
54cbacb2ff
Replace the `CpuLocal`'s `borrow*` APIs with `get_with`
2024-08-25 20:14:06 +08:00
Zhang Junyang
f7a9510be0
Refactor the `this_cpu` API with `PinCurrentCpu`
2024-08-25 20:14:06 +08:00
Zhang Junyang
9a94ba23aa
Replace the `Deref` implementation of `CpuLocal` with `get_on_cpu`
2024-08-25 20:14:06 +08:00
Yuke Peng
3cac1b2a03
Use AtomicU32 to read/write latest modified pid
2024-08-25 20:13:05 +08:00
Yuke Peng
ccdf2dc54f
Drop the `MutexGuard` of semaphore earlier
2024-08-25 20:13:05 +08:00
Yuke Peng
547e6430ee
Pass the reference of sem_buf to semop
2024-08-25 20:13:05 +08:00
Yuke Peng
83a4366a72
Remove check_sem in semop
2024-08-25 20:13:05 +08:00
Yuke Peng
4b1f2f720e
Avoid using `current` in semop
2024-08-25 20:13:05 +08:00
Chen Chengjun
6bde87d33a
Fix a bug of InitStack during doing fork+exec
2024-08-25 15:14:11 +08:00
Zhang Junyang
1e24911198
Upgrade the version of `bytemuck` since it's yanked
2024-08-24 17:18:24 +08:00
Zhang Junyang
dafd16075f
Remove the shim kernel crate
2024-08-23 23:37:50 +08:00
Zhang Junyang
d76c7a5b1e
OSDK check and clippy with `cfg(ktest)`
2024-08-23 23:37:50 +08:00
Zhang Junyang
be3492d7f0
Extract the OSTD test runner as a kernel
2024-08-23 23:37:50 +08:00
Yuke Peng
715733f551
Implement dummy NamedPipe
2024-08-23 19:56:36 +08:00
Yuke Peng
ea64ddfde5
Change the API of `mknod`
2024-08-23 19:56:36 +08:00
Yuke Peng
95f67b3d67
Remove duplicate `FileType` enumerate
2024-08-23 19:56:36 +08:00
Yuke Peng
069cd7932b
Block when `incoming_conns` reaches backlog
2024-08-23 19:55:25 +08:00
Ruihan Li
2d6da11d92
Add comments about two polling loops
2024-08-23 19:27:12 +08:00
Yuke Peng
42f70fd779
Fix reachable unwrap panic in `check_sem()`
2024-08-23 19:24:17 +08:00
Yuke Peng
bb4751741a
Bump smoltcp to newest git version
2024-08-22 22:58:36 +08:00
Shaowei Song
dce796cdde
Refactor all io APIs of vfs based on `VmReader`/`VmWriter`
2024-08-22 22:54:30 +08:00
Marsman1996
ef9e600c9d
Fix panic in `sys_waitid()` by options
2024-08-22 09:56:10 +08:00
Marsman1996
ec7391468c
Fix panic in `from_which_and_id()`
2024-08-22 09:56:10 +08:00
Marsman1996
90688286aa
Improve readability
2024-08-22 09:50:47 +08:00
Marsman1996
95aaef9aa1
Check the length of timers before delete
2024-08-22 09:50:47 +08:00
Marsman1996
c38907374a
Check the length of timers before access
2024-08-22 09:50:47 +08:00
Shaowei Song
2102107be1
Refactor `VmReader`&`VmWriter` as given fallibility marker
2024-08-21 22:24:15 +08:00
Marsman1996
fda0fa0512
Align `len` in `madvise`
2024-08-20 13:10:00 +08:00
Marsman1996
22f9c072f3
Move the check location following Linux behaviors
2024-08-20 13:10:00 +08:00
Marsman1996
18607c33ea
Fix panic in `madv_free()`
2024-08-20 13:10:00 +08:00
Ruihan Li
e3307a6945
Use `Connected` to replace `Endpoint`
2024-08-18 23:57:56 +08:00
Ruihan Li
639eedb2e1
Remove unused error code
2024-08-18 23:57:56 +08:00
Ruihan Li
47857fc10f
Fix remote addresses in connected UNIX sockets
2024-08-18 23:57:56 +08:00
Ruihan Li
a3d4748d6b
Fix behavior in UNIX socket `listen()`
2024-08-18 23:57:56 +08:00
Ruihan Li
ac19a7e0e7
Fix race conditions in UNIX socket `listen()`
2024-08-18 23:57:56 +08:00
Ruihan Li
a2d94675eb
Move `impl Drop` to UNIX listeners
2024-08-18 23:57:56 +08:00
Ruihan Li
98e2a99195
Store `Arc<Backlog>` in UNIX listeners
2024-08-18 23:57:56 +08:00
Yuke Peng
994f3727d8
Introduce somaxconn to restrict backlog
2024-08-18 23:56:40 +08:00
Yuke Peng
46d45de37a
Change the log level of page fault handler failed
2024-08-18 23:20:57 +08:00
Cautreoxit
c44447d54b
Refactor the API of spinlocks
2024-08-18 21:06:40 +08:00
Yuke Peng
60ef523aaf
Implement semctl syscall
2024-08-18 16:37:39 +08:00
Yuke Peng
9d83e76931
Implement semop and semtimedop syscall
2024-08-18 16:37:39 +08:00
Yuke Peng
4530253a99
Implement semget syscall
2024-08-18 16:37:39 +08:00
Yuke Peng
b7a5f797de
Add System V semaphore basic support
2024-08-18 16:37:39 +08:00
Fabing Li
ce2af1eb05
Add flock and sys_flock
2024-08-17 18:18:23 +08:00
Fabing Li
cbd8879243
Add range lock and sys_fcntl
2024-08-17 18:18:23 +08:00
Fabing Li
4a2da992a6
Add Extension implementation on inode for lock storing
2024-08-17 18:18:23 +08:00
Chen Chengjun
9c7fd8fef5
Add dummy msync
2024-08-17 18:07:09 +08:00
Marsman1996
cf30599729
Propagate errors of futex operations when used in futex syscall instead of panic on them
...
by @jellllly420
2024-08-17 18:01:32 +08:00
Marsman1996
4c1f6a4e32
Fix panic in futex and rt_sigprocmask
2024-08-17 18:01:32 +08:00
Chen Chengjun
364ef48e2f
Fix a concurrency bug in clocksource
2024-08-17 17:57:26 +08:00
Jianfeng Jiang
0291b5dc6b
Optimize the latency of lmbench-select-file
2024-08-16 11:19:29 +08:00
Marsman1996
5b5f9cffd1
Fix panic when transfer `how` to enum in sys_rt_sigprocmask()
2024-08-16 11:14:11 +08:00
Chen Chengjun
2ca7b28bbc
Refactor the elf loading logics
2024-08-16 10:45:16 +08:00
Chen Chengjun
950fbc131b
Implement resize mapping and modify the brk implementation
2024-08-16 10:45:16 +08:00
Chen Chengjun
4bf355af50
Refactor mmap and support shared filebacked mmap
2024-08-16 10:45:16 +08:00
Chen Chengjun
19184d5c3d
Remove the concept of child VMOs and clean-up VMO implementations
2024-08-16 10:45:16 +08:00
Chen Chengjun
9f9169adfe
Modify the Vmar APIs to fit the modifications of VmMapping
2024-08-16 10:45:16 +08:00
Chen Chengjun
ff842cb778
VMOs only provide pages to mappings and anonymous mappings are decoupled from VMOs
2024-08-16 10:45:16 +08:00
Chen Chengjun
cb56e6368d
Do some clean-up for vdso.rs
2024-08-16 10:45:16 +08:00
Chen Chengjun
24e7f77803
Add duplicate_frame method
2024-08-16 10:45:16 +08:00
Yuke Peng
49692c2068
Fix several warnings when ktest is enabled
2024-08-16 10:43:55 +08:00
Chen Chengjun
99a22ff124
Improve efficiency of global TLB flushing
2024-08-15 23:14:51 +08:00
jellllly420
f5464e82c0
Implement new scheduling API in OSTD
2024-08-15 23:06:18 +08:00
Zhang Junyang
4844e7ca7c
Allow page table protectors to flush TLB entries precisely
2024-08-14 20:40:03 +08:00
Zhang Junyang
9a6e1b03e3
Allow the page table un-mapper to flush the TLB precisely
2024-08-14 20:40:03 +08:00
Zhang Junyang
e597a10088
Rename `PageTableQueryResult` to `PageTableItem`
2024-08-14 20:40:03 +08:00
Zhang Junyang
491e4325fa
Enable IRQs before leaving the OSTD boot routine
2024-08-13 20:34:26 +08:00
Ruihan Li
f499f54cf5
Record the original bound name
2024-08-13 19:32:22 +08:00
Ruihan Li
6b50d28ba1
Remove unnecessary self-connecting check
2024-08-13 19:32:22 +08:00
Ruihan Li
8bcb5a2a5f
Avoid nested locks
2024-08-13 19:32:22 +08:00
Ruihan Li
5445a26ec5
Fix results of getting UNIX names
2024-08-13 19:32:22 +08:00
Ruihan Li
8fdd22de8a
Align the buffer size of pipes and UNIX sockets
2024-08-13 19:30:02 +08:00
Zhang Junyang
38b46f7ac3
Prefer `Context::get_user_space` than `CurrentUserSpace::get`
2024-08-12 10:38:35 +08:00
Zhang Junyang
8cf7063150
Replace most of the `current_thread!` usages via `Context`
2024-08-12 10:38:35 +08:00
Zhang Junyang
9200538175
Replace a myriad of `current!` usages via `Context`
2024-08-12 10:38:35 +08:00
Zhang Junyang
f84d328956
Optimize getters of the current process credentials
2024-08-12 10:38:35 +08:00
Zhang Junyang
66a37da214
Allow passing the process `Context` to syscall handlers
2024-08-12 10:38:35 +08:00
Zhang Junyang
19ad2a2eb4
Remove module-level allowed lints in system call handlers
2024-08-12 10:38:35 +08:00
Hsy-Intel
a739b3828d
Use tdx-guest crate VE handler and support release mode for TDX
2024-08-10 11:21:59 +08:00
Yuke Peng
7b4c13f5d7
Implement MADV_FREE in madvise
2024-08-10 11:14:53 +08:00
Chen Chengjun
75da7fd30e
Replace old user space read/write with new APIs
2024-08-09 18:01:01 +08:00
Chen Chengjun
7ade2fcb57
Remove Vmar usage from InitStack
2024-08-09 18:01:01 +08:00
Chen Chengjun
12c60852f1
Modify the logics of setting child thread tid
2024-08-09 18:01:01 +08:00
Chen Chengjun
259b506119
Introduce CurrentUserSpace to provide read/write abilities for user space
2024-08-09 18:01:01 +08:00
Hsy-Intel
8317c4c1e8
Rename "intel_tdx" feature to "cvm_guest"
2024-08-09 17:11:12 +08:00
Hsy-Intel
ca41687a99
Use cfg_if to group tdx cfg block
2024-08-09 17:11:12 +08:00
Hsy-Intel
9bad068215
Update conditional compilation for intel_tdx feature
2024-08-09 17:11:12 +08:00
Jianfeng Jiang
dc124351d2
Add gvisor pselect test
2024-08-09 15:46:05 +08:00
Jianfeng Jiang
8b73cc8761
Support sigmask in pselect6
2024-08-09 15:46:05 +08:00
Yuke Peng
c4e9a0db38
Remove the implementation of `MADV_DONTNEED`
2024-08-09 14:07:09 +08:00
YanWQ-monad
97fab9edea
Prepare aster-time for platform-dependent implementations
2024-08-09 08:53:24 +08:00
Chen Chengjun
acb4833aae
Optimize trim_mappings
2024-08-09 00:12:20 +08:00
Qingsong Chen
cd9e5d11d2
Optimize futex implementation
2024-08-08 23:11:58 +08:00
Shaowei Song
8dce83605f
Add sys_fallocate
2024-08-08 21:10:38 +08:00
Zhang Junyang
37a9590cfe
Refactor `ostd::task::processor` based on faster CPU-local cells
2024-08-08 19:21:03 +08:00
Zhang Junyang
fe68b4b510
Generalize single instruction CPU local operations by `cpu_local_cell`
2024-08-08 19:21:03 +08:00
Jianfeng Jiang
6414111cc5
Support flag SA_RESETHAND
2024-08-08 15:20:13 +08:00
Chen Chengjun
9a299b68f0
Make the behavior of sys_execve be consistent with Linux
2024-08-08 15:08:55 +08:00
Ruihan Li
b1ea422efa
Fix accesses to VirtIO queue DMA
2024-08-06 11:34:15 +08:00
Ruihan Li
4deba9baca
Rewrite the whole `net/addr.rs` file
2024-08-05 10:24:56 +08:00
Ruihan Li
d814603504
Move `IpEndpoint` to `socket/ip/addr.rs`
2024-08-05 10:24:56 +08:00
Chen Chengjun
b11628b9ce
Remove destroy_all methods
2024-08-05 10:24:05 +08:00
Zhang Junyang
16690bc61b
Implement atomic signal masks and refactor `SigSet`
2024-08-04 21:41:44 +08:00
Shaowei Song
20a856b07f
Revise the naming of all sync/async io APIs
2024-07-30 20:58:07 +08:00
Zhang Junyang
870d542f60
Remove the error of `BlkFeatures::MQ` to support multi-processor startup
...
Co-authored-by: Chuandong Li <lichuand@pku.edu.cn>
2024-07-30 10:24:09 +08:00
Zhang Junyang
460234a18b
Check userspace NULL pointers without triggering kernel page faults
2024-07-29 22:46:32 +08:00
Qingsong Chen
077a9ac3ab
Add fcntl subcommand F_GETOWN/F_SETOWN
2024-07-29 22:25:24 +08:00
Ruihan Li
c320552ae1
Remove `clean_for_close`/`flush` in `FileLike`
2024-07-29 22:13:02 +08:00
Yuke Peng
f57dcd814a
Extend user heap limit to 64MB
2024-07-29 22:09:21 +08:00
Ruihan Li
fce5785af6
Fix socket lock IRQ behavior
2024-07-29 16:56:29 +08:00
Ruihan Li
a14ac1ccbf
Fix socket lock ordering
2024-07-29 16:56:29 +08:00
Jianfeng Jiang
3981cd63cd
Wake up background polling thread when old_instant is 0
...
Co-authored-by: Ruihan Li <lrh2000@pku.edu.cn>
2024-07-29 16:56:29 +08:00
Ruihan Li
328ce9e92c
Properly close sockets
2024-07-29 16:56:29 +08:00
Ruihan Li
94b23e077d
Use relaxed ordering for polling instant
2024-07-29 16:56:29 +08:00
Ruihan Li
4df7654034
Repeat iface polling if necessary
2024-07-29 16:56:29 +08:00
Wang Siyuan
12ed40578d
Add /proc/meminfo support
2024-07-29 13:55:20 +08:00
Shaowei Song
ff525112d0
Revise the `BlockDevice` trait
2024-07-29 13:54:13 +08:00
Ruihan Li
e83e1fc01b
Unpack states from `Arc` in UNIX sockets
2024-07-25 21:38:18 +08:00
Ruihan Li
8df51ab001
Move `status` from channels to pipes
2024-07-25 21:38:18 +08:00
Ruihan Li
d24c7f8b9c
Remove dead code in `pipe.rs`
2024-07-25 21:38:18 +08:00
Ruihan Li
31d99c66c2
Unpack `Arc<Endpoint>` in UNIX sockets
2024-07-25 21:38:18 +08:00
Chen Chengjun
7ee728e2c7
Fix robust list iteartion bug
2024-07-25 21:37:11 +08:00
Shaowei Song
9e57db7d54
[ext2] Introuce unified inode functions to read/write block(s)
2024-07-25 21:31:18 +08:00
Shaowei Song
b1cec501d8
[page_cache] Gap within one page should be filled with zeros in shrink case
2024-07-25 21:31:18 +08:00
StanPlatinum
0b8335c943
Add /proc/filesystems support
2024-07-25 13:21:37 +08:00
Yuke Peng
e7a75947ea
Remove ETIME logic in sys_poll
2024-07-22 21:45:52 +08:00
Yuke Peng
6ada748b79
Remove ETIME logic in sys_select
2024-07-22 21:45:52 +08:00
Yuke Peng
faa4234c7d
Return Ok when timer expired in do_poll
2024-07-22 21:45:52 +08:00
hongwen.chw
4dacff5be4
Fix a typo when assign 'dst.rbx' at `copy_gp_regs`
2024-07-21 22:34:58 +08:00
Zhang Junyang
668997ab51
Refactor the `VmSpace` API and work around misuses
2024-07-20 20:56:29 +08:00
Ruihan Li
9f125cd671
Remove the nonsense mutex in `Poller`
2024-07-19 18:37:54 +08:00
Ruihan Li
94eba6d85e
Add unit tests about blocking behavior
2024-07-18 20:45:16 +08:00
Ruihan Li
a219b6a485
Rename `Endpoint` to `Fifo`
2024-07-18 20:45:16 +08:00
Ruihan Li
39cd4420f2
Fix many error codes in pipes
2024-07-18 20:45:16 +08:00
Ruihan Li
8e72451448
Reuse the `wait_events` method in pipes
2024-07-18 20:45:16 +08:00
Ruihan Li
1c0d865373
Refine the event lock for pipes
2024-07-18 20:45:16 +08:00
Ruihan Li
ab9941263b
Avoid duplicate `wait_events` methods
2024-07-18 20:45:16 +08:00
Ruihan Li
6e8896165d
Remove `BusyBoxTraceFile`
2024-07-18 20:45:16 +08:00
Ruihan Li
9505e5704e
Avoid the unused `rights` field
2024-07-18 20:45:16 +08:00
Yuke Peng
7621b71113
Remove unused documentations
2024-07-18 20:38:24 +08:00
Yuke Peng
31746e2ebf
Use WaitQueue to implement waiting in FutexWaiter
2024-07-18 20:38:24 +08:00
Jianfeng Jiang
f86583dbce
Make essential changes for publishing OSTD
2024-07-18 18:18:05 +08:00
Jianfeng Jiang
49eef0c094
Select should not return ETIME
2024-07-18 18:09:39 +08:00
Jianfeng Jiang
2766d95c18
Poll should not return ETIME
2024-07-18 18:09:39 +08:00
YanWQ-monad
bffc34c94b
Don't check access mode if the file is being created
2024-07-18 17:55:23 +08:00
Qingsong Chen
fbf2afd799
Add ioctl subcommand FIONBIO/FIOASYNC
2024-07-18 11:39:52 +08:00
Qingsong Chen
da987db700
Add prctl subcommand PR_GET_DUMPABLE/PR_SET_DUMPABLE
2024-07-16 22:31:26 +08:00
Yuke Peng
0417ad7376
Ignore timeout error in epoll_wait
2024-07-16 22:26:57 +08:00
Hsy-Intel
4292ec2ebb
Make intel_tdx feature as default
2024-07-16 21:22:29 +08:00
Ruihan Li
3d2a0c33af
Clean up the virtio console IRQ handler a bit
2024-07-14 16:43:23 +08:00
Ruihan Li
a465ec1346
Work around a QEMU bug in virtio console pasting
2024-07-14 16:43:23 +08:00
Ruihan Li
ceb0ef67e1
Make `Pauser` work in raw tasks
2024-07-14 16:42:08 +08:00
Ruihan Li
8f64a1cb90
Make `Pauser` work in kernel threads
2024-07-14 16:42:08 +08:00
Zhang Junyang
9e5f3123e1
Log messages to the serial atomically and rename `arch::serial`
...
Co-authored-by: Chuandong Li <lichuand@pku.edu.cn>
2024-07-09 21:56:03 +08:00
Hsy-Intel
b73412c2ff
Fix known TDX issues
2024-07-09 19:43:55 +08:00
Yuke Peng
d43fbd88ba
Add documentation to bus
2024-07-09 19:42:15 +08:00
Yuke Peng
0970adb37b
Add documentation to x86/device
2024-07-09 19:42:15 +08:00
LI Qing
76f9193882
Add timestamp support for ramfs
2024-07-08 22:31:30 +08:00
Yuke Peng
8726d858f2
Add pselect6 syscall
2024-07-08 18:21:08 +08:00
Fabing Li
623f4c9177
[Quick Fix] update ctime for utimes syscalls
2024-07-04 14:59:41 +08:00
LI Qing
9377a43f8f
Add timestamp support for ext2
2024-07-04 14:42:54 +08:00
Weijie Liu
edc1412cc8
Add /proc/sys/kernel/cap_last_cap support
2024-07-04 10:47:30 +08:00
Zhenchen Wang
12b355b701
Fix issue about pathname and redefine the Filetype.
...
Signed-off-by: Zhenchen Wang <m202372036@hust.edu.cn>
2024-07-03 21:59:25 +08:00
Zhenchen Wang
d8389da797
Add syscall mknod
...
Signed-off-by: Zhenchen Wang <m202372036@hust.edu.cn>
2024-07-03 21:59:25 +08:00
Zhang Junyang
0f8d8da372
Refactor code related to CPU local memory
...
Co-authored-by: Chuandong Li <lichuand@pku.edu.cn>
2024-07-03 17:40:53 +08:00
Qingsong Chen
98619f3482
Init RNG with rdrand directly (without getrandom)
2024-07-03 14:56:33 +08:00
Ruihan Li
57ecfa2fec
Add `#[must_use]` to all guard types
2024-07-02 12:41:52 +08:00
Ruihan Li
9e4775d9e2
Remove dead code from `UtimeExt`
2024-06-29 12:38:23 +08:00
Fabing Li
f675552c5a
Rename regression to test
2024-06-28 20:33:21 +08:00
Ruihan Li
5eefd600cc
Avoid unused variables in the network module
2024-06-28 20:24:27 +08:00
Ruihan Li
94e043ac8d
Update nonblocking flags of UNIX sockets correctly
2024-06-28 20:24:27 +08:00
Ruihan Li
fa584bd8f5
Set the TX buffer length of UDP sockets correctly
2024-06-28 20:24:27 +08:00
Chen Chengjun
cd2b305fa8
Modify the userspace read/write usage location
2024-06-28 15:36:21 +08:00
Chen Chengjun
af908c29cf
Refactor the read/write operations to userspace
2024-06-28 15:36:21 +08:00
Chen Chengjun
09b6153d29
Refactor VmReader/Writer to support both kernel space and user space
2024-06-28 15:36:21 +08:00
Chen Chengjun
5b9dd2fee8
Clear the robust list during do_execve
2024-06-28 15:36:21 +08:00
Fabing Li
12db7ec55d
Add and refactor read-write syscalls
2024-06-27 23:16:14 +08:00
Fabing Li
d3c172013a
Fix unused warning of `UtimeExt`
2024-06-27 21:22:46 +08:00
Fabing Li
d33f90eaeb
Add sys_access and sys_faccessat
2024-06-27 15:56:04 +08:00
Fabing Li
212dd562a0
Add sys_fdatasync and sync_data
2024-06-27 15:55:16 +08:00
Fabing Li
5edc110f9d
Reconstruct utime-like syscalls and fix filetime implementations
2024-06-27 15:54:04 +08:00
Jianfeng Jiang
3de8a9330a
Fix the OSDK CI failure
2024-06-27 15:45:49 +08:00
Jianfeng Jiang
fe7251c413
Rename aster_main as ostd::main
2024-06-27 15:45:49 +08:00
Jianfeng Jiang
59350a8578
Rename aster-frame to ostd
2024-06-27 15:45:49 +08:00
Zhang Junyang
6b17cceacc
Replace the futex hash buckects with `Once` to fix the leak
2024-06-26 21:00:44 +08:00
Shaocong Sun
1b22267a87
Add readahead for pagecache
2024-06-26 20:22:20 +08:00
Fabing Li
053f8d416e
Add syscall getdents
2024-06-26 19:16:31 +08:00
Ruihan Li
2beeedf7ed
Allow overwriting PTEs in shared memory regions
2024-06-25 16:18:34 +08:00
Jianfeng Jiang
cb5b996274
Add syscall sendmsg and recvmsg
2024-06-25 13:40:58 +08:00
Yuke Peng
c5d0099dfd
Refactor Monitor
2024-06-25 13:39:27 +08:00
Yuke Peng
89ce1f4df9
Add schedule after WorkItem enqueue
2024-06-25 13:39:27 +08:00
Hsy-Intel
a2060039c2
Add TDX get report function
2024-06-25 11:51:01 +08:00
LI Qing
68aebe4175
Fix the potential deadlock issue of Ext2
2024-06-24 22:36:19 +08:00
Zhang Junyang
eaf51ccb24
Fix multiple dead code problems
2024-06-21 10:57:08 +08:00
Zhang Junyang
05533d7afd
Fix multiple documentation issues concerned by clippy
2024-06-21 10:57:08 +08:00
Zhang Junyang
18a0490e23
Respond to the `cargo metadata` package ID change in comp-sys
2024-06-21 10:57:08 +08:00
Zhang Junyang
952fbacaf1
Fix multiple deprecation problems
2024-06-21 10:57:08 +08:00
Zhang Junyang
cda8ffa7da
Fix the usage of underscores in Cargo manifest keys
2024-06-21 10:57:08 +08:00
Zhang Junyang
d6714c4b47
Fix multiple `Default` implementation caveats
2024-06-21 10:57:08 +08:00
Zhang Junyang
ab1d931cb7
Adjust for Rust unstable feature's stability change
2024-06-21 10:57:08 +08:00
Zhang Junyang
5231005f37
Follow the Rust API change of `BTreeCursor`
2024-06-21 10:57:08 +08:00
LI Qing
9711d43c84
Use `Ord::clamp` to simplify the scheduling priority value
2024-06-20 19:16:26 +08:00
Weijie Liu
3b66b0686e
Add /proc/[pid]/cmdline support
2024-06-18 13:15:35 +08:00
Hsy-Intel
9e03ac7d0f
Temporarily disable TDX get report
2024-06-18 13:13:05 +08:00
Sun12551
d0e95776cb
Optimize write_bytes for Vmo
2024-06-18 13:08:17 +08:00
hongwen.chw
75e9382d57
typo: Some typo in net/socket/mod.rs
2024-06-18 12:54:52 +08:00
hongwen.chw
3123222995
chore: Reduce once instant.total_millis()
2024-06-18 12:54:52 +08:00
Yingdi Shan
cea4fd7777
Fix the concurrency bug when multiple threads committing the same page
2024-06-13 23:16:22 +08:00
LI Qing
e210e68920
Modify the type of ino to u64
2024-06-11 18:09:23 +08:00
LI Qing
ce2e0cee92
Refine Devpts with new metadata api
2024-06-11 18:09:23 +08:00
LI Qing
494c88e993
Refine ProcFs by improving the use of locks
2024-06-11 18:09:23 +08:00
LI Qing
6ff8497101
Refine RamFs by extracting immutable metadata from the lock
2024-06-11 18:09:23 +08:00
YanWQ-monad
e7298bb276
Fix the loading of dynamic linking program
2024-06-11 17:54:37 +08:00
Anmin Liu
9f67fcdc58
Reuse Rxbuffer and update `qemu_args.sh` for vsock
2024-06-11 17:51:36 +08:00
Anmin Liu
878e8a88f4
Support poll multiple packets
2024-06-11 17:51:36 +08:00
Anmin Liu
646406115e
Optimize vsock code structure
2024-06-11 17:51:36 +08:00
Anmin Liu
60dd17fdd3
Support calling from inside via vsock
2024-06-11 17:51:36 +08:00
Anmin Liu
48f69c25a9
Support nonblocking option
2024-06-11 17:51:36 +08:00
Anmin Liu
7f6ef5e12d
Add connecting status
2024-06-11 17:51:36 +08:00
Anmin Liu
50a2aead52
Add vsock_server test in ci
2024-06-11 17:51:36 +08:00
Anmin Liu
ad140cec3c
Implement vsock socket layer
2024-06-11 17:51:36 +08:00
Anmin Liu
83a7937334
Make vsock device optional
2024-06-11 17:51:36 +08:00
Anmin Liu
be45f0ee72
Fix format and clippy errors
2024-06-11 17:51:36 +08:00
Anmin Liu
52f808e315
Implement vsock driver
2024-06-11 17:51:36 +08:00
Jianfeng Jiang
33a7da9991
Fix typos in API documentation
2024-06-09 22:57:14 +08:00
Weijie Liu
07caaa5b3f
Add full epoll_pwait
2024-06-08 17:23:06 +08:00
Chen Chengjun
0d82262beb
Support update rusage in wait4 syscall
2024-06-07 17:08:49 +08:00
Chen Chengjun
c85438353f
Add syscall getrusage
2024-06-07 17:08:49 +08:00
Jianfeng Jiang
57fc6a5402
Support parent death signal & Refactor do_exit
2024-06-07 17:07:16 +08:00
LI Qing
c6aa9f9ee8
Limit the number of segments in single bio request
2024-06-05 16:13:59 +08:00
Jianfeng Jiang
c7cda1df28
Make each pausing thread has a seperate `is_interruped`
2024-06-05 11:47:28 +08:00
Jianfeng Jiang
0dd90cad3c
Fix bug: Ctrl+C does not send signal
2024-06-05 11:47:28 +08:00
Jianfeng Jiang
6f3a483be6
Check only not blocked signals in Pauser
2024-06-05 11:47:28 +08:00
Jianfeng Jiang
5cde55da3d
Unregister observer when timeout is reached
2024-06-05 11:47:28 +08:00
StanPlatinum
6e612fc730
Add syscall capget/capset
2024-06-04 19:50:08 +08:00
Fabing Li
8e1aeaf578
Add dup3 syscall and fix EventFile
2024-06-04 16:02:58 +08:00
Ruihan Li
e0c6c29481
Fix memory leak of `Task` structures
2024-06-04 14:47:18 +08:00
Zhenchen Wang
faf9cf7da8
Fix some issues about naming, function parameters, and comments, and redefined the method for bind mount.
...
Signed-off-by: Zhenchen Wang <m202372036@hust.edu.cn>
2024-06-04 14:38:52 +08:00
Zhenchen Wang
980ffb5a98
Add syscall umount.
...
Signed-off-by: Zhenchen Wang <m202372036@hust.edu.cn>
2024-06-04 14:38:52 +08:00
Zhenchen Wang
a893ceca4a
Add syscall mount
...
Signed-off-by: Zhenchen Wang <m202372036@hust.edu.cn>
2024-06-04 14:38:52 +08:00
Ruihan Li
ff83ce7667
Deny `dead_code` and `unused_variables` at crate level
2024-06-04 10:25:45 +08:00
Ruihan Li
9107a1771e
Allow `dead_code` and `unused_variables` at file level
2024-06-04 10:25:45 +08:00
Zhang Junyang
7095b37e7e
Refactor the source structure in `aster_frame::mm`
2024-06-03 22:16:02 +08:00
Zhang Junyang
3579d88aa6
Fortify the metadata memory model and adjust the `Page` casting APIs
2024-06-03 22:16:02 +08:00
Zhang Junyang
14e1b1a9fc
Rename various concepts related to memory management
2024-06-03 22:16:02 +08:00
Zhang Junyang
39aa31a69d
Remove the `VmIO` implementation of `VmSpace`
2024-06-03 22:16:02 +08:00
Zhang Junyang
69d464fc6b
Use metadata to track `VmFrame`s
...
In this commit, the frame metadata storage schema is implemented. The bootstrap process is refactored
and a boot page table is introduced to perform early stage metadata mapping. The metadata is then used
to track `VmFrame`s instead of the former `Arc` approach.
2024-06-03 22:16:02 +08:00
Chen Chengjun
c5ec2e181e
Add itimer-related syscalls
2024-06-03 20:03:46 +08:00
Chen Chengjun
13fd173b24
Enable Timer to set an absolute time
2024-06-03 20:03:46 +08:00
Chen Chengjun
e952a16954
Support more clock ids
2024-06-03 20:03:46 +08:00
Chen Chengjun
c84efe7a90
Introduce CPU clock and CPU timer
2024-06-03 20:03:46 +08:00
Ruihan Li
a664f1a9fc
Revise the public APIs of `WaitQueue`
2024-06-03 15:45:56 +08:00
anbo
901bccadfe
Add syscall rt_sigpending
2024-06-03 15:30:52 +08:00