Commit Graph

2694 Commits

Author SHA1 Message Date
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
Tao Su 89dfcbb569 Add `prctl`, `capget` and `capset` syscall limitation to the book 2025-09-02 17:40:56 +08:00
Tao Su 7c4b2899cc Add clock and misc related syscall limitation to the book 2025-09-02 17:40:56 +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
Zejun Zhao 4b26eb05aa Configure kernel stack size for release build based on architecture 2025-08-29 17:10:48 +08:00
Zejun Zhao b9a0878d53 Add comment about .eh_frame_hdr in riscv64 linker script 2025-08-29 17:10:48 +08:00
Zejun Zhao bf25806fca Add an explicit end of call stack for x86_64 and loongarch64 2025-08-29 17:10:48 +08:00
Zejun Zhao 3b0666449f Use rust-analyzer for riscv64 and loongarch64 target 2025-08-29 16:57:06 +08:00
Chen Chengjun f8e4aefcca Add tmpfs support by wrapping ramfs 2025-08-29 15:45:20 +08:00
Zejun Zhao fc61f4d1b8 Use `IrqLine` abstraction for RISC-V timer interrupt 2025-08-29 10:49:48 +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
Zejun Zhao aeaf103166 Add an explicit end of call stack for x86_64 2025-08-28 17:26:23 +08:00
Zejun Zhao 920ec7f521 Enable RISC-V stack unwinding on panic 2025-08-28 17:26:23 +08:00
Tao Su 05f053c56d Add signal & timer related syscall limitations to the book 2025-08-28 16:17:14 +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 3882eb4000 Update docker version reference 2025-08-24 19:09:40 +08:00
Chen Chengjun a5c4566485 Include the VDSO library directly 2025-08-24 19:09:40 +08:00
Chen Chengjun 65344a187f Remove vDSO install in Nix 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
Hsy-Intel 7fad653992 Use 6.16.0 Linux kernel for benchmark tests & Add Linux TDX benchmark tests 2025-08-22 17:20:14 +08:00
Chen Chengjun 8686d2b799 Bump the docker version for vDSO again 2025-08-22 17:16:40 +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
Tate, Hongliang Tian 9ab035c654 Rename the docs directory to book 2025-08-21 19:16:12 +08:00
Qingsong Chen 1e675d4387 Replace stdenv with stdenvNoCC to optimize CI workflows 2025-08-21 17:34:39 +08:00