Ruihan Li
87640d4b27
Drop `UnixSocketAddrBound` on `close()`
2025-09-10 20:01:30 +08:00
Ruihan Li
286d4d4466
Reorder methods and fix minor issues
2025-09-10 20:01:30 +08:00
Ruihan Li
9de70e38de
Add the `arch::cpu::cpuid` module
2025-09-10 12:10:40 +08:00
Ruihan Li
652657fba5
Drop duplicate public re-exports
2025-09-10 12:10:40 +08:00
Ruihan Li
c1b80f0f0f
Use `'static` for FS types
2025-09-08 14:40:08 +08:00
Ruihan Li
ef5318c000
Rename `*FS` to `*Fs`
2025-09-08 14:40:08 +08:00
Ruihan Li
bb6069d5bb
Clean up some FS APIs
2025-09-08 14:40:08 +08:00
Ruihan Li
c289f96d23
Report `ENOBUFS` if netlink messages overrun
2025-09-05 10:51:48 +08:00
Ruihan Li
b57c94d05d
Unpack `MessageQueue`
2025-09-05 10:51:48 +08:00
zhuowei shao
f0935beb18
Extract futex double bucket locking operation
2025-09-05 10:49:45 +08:00
Zhe Tang
2796c8d1ad
Add unit tests for the newly implemented methods related to `IoMem`
2025-09-05 10:47:43 +08:00
Zhe Tang
b94ea9f174
Add kernel support for mapping via files
2025-09-05 10:47:43 +08:00
Zhe Tang
5022cadef1
Add the file-specific `mmap` interface
...
Co-authored-by: Wei Zhang <ruoyuan.zw@antgroup.com>
2025-09-05 10:47:43 +08:00
Zhe Tang
5a38c61c49
Ensure that OSTD users cannot modify the `PrivilegedPageFlags` in `PageProperty`
2025-09-05 10:47:43 +08:00
Ruihan Li
3b606f5b6c
Use `size_of`/`align_of` in the prelude
2025-09-04 09:26:56 +08:00
Zhang Junyang
9e2d8e9f08
Use device addresses instead of physical addresses
2025-09-02 17:53:55 +08:00
Zhang Junyang
4e2bdc65de
Refactor implicit `Arc` APIs for DMA
2025-09-02 17:53:55 +08:00
Zhang Junyang
a6520880ab
Unify memory object slicing
2025-09-02 17:53:55 +08:00
Zhang Junyang
eb69aa4fb9
Unify address and size APIs for memory objects
2025-09-02 17:53:55 +08:00
Ruihan Li
419f31397f
Move checks from `syscall/` to `iovec.rs`
2025-09-02 15:43:09 +08:00
Ruihan Li
4e27e9d90b
Use "I/O" instead "IO"
2025-09-02 15:43:09 +08:00
jiangjianfeng
ef099996fc
Fix the unshare logic in syscall close_range
2025-09-02 09:47:41 +08:00
jiangjianfeng
b43047eedb
Add syscall setns
2025-09-02 09:47:41 +08:00
jiangjianfeng
cca73480c2
Add syscall unshare
2025-09-02 09:47:41 +08:00
jiangjianfeng
83b6e2da5c
Add basic namespace framework
2025-09-02 09:47:41 +08:00
jiangjianfeng
3cbc9b4bf7
openat should return ENOENT if path is empty
2025-09-02 09:45:42 +08:00
jiangjianfeng
09886fc15b
Write the supported cap version to user if capget version is unsupported
2025-09-02 09:45:42 +08:00
jiangjianfeng
6c5bcc420a
Don't panic on MADV_NOHUGEPAGE
2025-09-02 09:45:42 +08:00
Arthur Paulino
f56d2f3bad
`context.rs` enhancements
...
* Improve the phrasing of some docstrings and comments
* Add warning comments about attempts to validate memory addresses
at reader/writer instantiation time
* Create the `reader_writer` method for ergonomically instantiate
a reader/writer pair covering the same memory region. This method
is also slightly more efficient than calling `reader` and `writer`
separately
* Clean up `check_vaddr` for clarity and rename it to `check_vaddr_lowerbound`
for explicity
* Include the data length check before calling `check_vaddr_lowerbound`
in `atomic_load` and `atomic_fetch_update` for further consistency
with the delayed buffer validation
2025-09-01 11:16:37 +08:00
Zejun Zhao
f4b05597cd
Init vDSO singleton in the first kthread
2025-08-31 23:57:17 +08:00
Chen Chengjun
f8e4aefcca
Add tmpfs support by wrapping ramfs
2025-08-29 15:45:20 +08:00
Yang Zhichao
d84ad988d4
Implement `EnvironFileOps` to handle `/proc/[pid]/environ`
2025-08-29 10:07:29 +08:00
Zejun Zhao
d3e27ae03a
Use vDSO for fallback of user-provided sa_restorer on RISC-V platforms
2025-08-28 17:35:55 +08:00
jiangjianfeng
2098b11b68
Unify the implementation of /proc/[pid] and /proc/[pid]/task/[tid]
2025-08-27 15:22:08 +08:00
Arthur Paulino
888eecb350
Patch a futex vulnerability
...
If the futex wait operation was interrupted by a signal or timed out, the
`FutexItem` must be dequeued and dropped. Otherwise, malicious user programs
could repeatedly issue futex wait operations to exhaust kernel memory.
Due to asynchronicity, this removal can't be done by queue position nor by
futex key match up:
* The position might have changed during the pause as some earlier futex might
have been dequeued
* If two futexes with the same key are enqueued and then one of them times out
or is interrupted, a removal by key would likely dequeue the wrong futex
Therefore, we need to perform a removal by unique global futex ID.
2025-08-26 18:04:34 +08:00
Ruihan Li
a6d37f0e79
Mark all kernel modules as private
2025-08-26 18:02:56 +08:00
Ruihan Li
f35ae6fe1c
Adjust visibility in `sem{,_set}.rs`
2025-08-26 18:02:56 +08:00
Ruihan Li
5c49142515
Remove `base` and `size` in `Vmar`
2025-08-26 18:02:56 +08:00
Ruihan Li
a84897097e
Remove `RangeLockItemBuilder`
2025-08-26 18:02:56 +08:00
Ruihan Li
c9ac58e8df
Remove unused "unregister" methods
2025-08-26 18:02:56 +08:00
Ruihan Li
b2f17d11c6
Remove common enum suffixes
2025-08-26 18:02:56 +08:00
Ruihan Li
09e7355d87
Remove dead code in `file_table.rs`
2025-08-26 18:02:56 +08:00
Chen Chengjun
b1bbd6c3fe
Optimize the initialization logic during Asterinas init phase
2025-08-26 14:36:59 +08:00
Chen Chengjun
a5c4566485
Include the VDSO library directly
2025-08-24 19:09:40 +08:00
Zejun Zhao
0a126a0c8c
Set correct default value for VdsoData::mask
2025-08-23 12:38:22 +08:00
Zejun Zhao
47b05143cf
Correct vDSO data segment's permission
2025-08-23 12:38:22 +08:00
Zejun Zhao
e68631d1b6
Implement arch-aware vDSO
2025-08-23 12:38:22 +08:00
Ruihan Li
a4aa745de1
Refine the lock usage in the vDSO module
2025-08-22 16:20:01 +08:00
Ruihan Li
f457acdb8b
Rewrite documentations in the vDSO module
2025-08-22 16:20:01 +08:00
Tao Su
226ea2865c
Resolve `semget01` failure by fixing key limit and adding `IPC_STAT`
2025-08-20 19:57:14 +08:00