Commit Graph

33 Commits

Author SHA1 Message Date
Zhang Junyang 127290f70d Patches for the new borrow checker 2025-12-09 09:23:58 +08:00
Zhang Junyang 559ce94aba Fix elided lifetimes in return values 2025-12-09 09:23:58 +08:00
Zhang Junyang dd410444e5 Format with new `rustfmt` 2025-12-09 09:23:58 +08:00
Ruihan Li 9d5e889a93 Implement `VmIo` for `CurrentUserspace` 2025-12-07 12:01:05 +08:00
Ruihan Li 4e0142b176 Resolve some minor issues 2025-11-06 15:41:13 +08:00
Ruihan Li b07d06170b Remove `Rights` from VMAR 2025-10-26 10:14:00 +08:00
jiangjianfeng fe39a6803d Unshare VM during execve 2025-10-25 10:36:30 +08:00
jiangjianfeng 207bfe30e2 Support multithreaded execve 2025-10-25 10:36:30 +08:00
jiangjianfeng 702aa7d9ee Support CLONE_PARENT flag 2025-09-29 13:27:22 +08:00
Ruihan Li c90c081e86 Fix bugs due to bad `ReadCString` APIs
Co-authored-by: Wang Siyuan <wsy@stu.pku.edu.cn>
2025-09-18 17:19:51 +08:00
Ruihan Li 3acdc1e8b0 Move `ReadCString` to `util/`
Co-authored-by: Wang Siyuan <wsy@stu.pku.edu.cn>
2025-09-18 17:19:51 +08:00
Ruihan Li 3b606f5b6c Use `size_of`/`align_of` in the prelude 2025-09-04 09:26:56 +08:00
jiangjianfeng cca73480c2 Add syscall unshare 2025-09-02 09:47:41 +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
Ruihan Li a6d37f0e79 Mark all kernel modules as private 2025-08-26 18:02:56 +08:00
Ruihan Li 6b6c64c591 Rename `atomic_update` to `atomic_fetch_update` 2025-08-20 13:17:57 +08:00
Arthur Paulino a73f210c7a Make `wake_robust_futex` atomic
Replace `VmWriter::atomic_update` with `VmWriter::atomic_compare_exchange`,
which takes the old value for comparison and new value instead of a
closure to compute it. This version has one less unsafe call.

Then use `atomic_compare_exchange` to reimplement the looping logic
of `wake_robust_futex` and make it atomic.
2025-08-19 19:22:12 +08:00
Ruihan Li 5b91064316 Add a method that disables page fault handlers 2025-08-14 11:59:05 +08:00
Ruihan Li e4fafb13b1 Add atomic operations for VM readers/writers 2025-08-14 11:59:05 +08:00
jiangjianfeng d317ce3246 Adjust `max_len` to avoid EFAULT when reading CString 2025-07-14 15:43:34 +08:00
jiangjianfeng f0957d2f54 Fix clippy warnings in kernel crate 2025-06-06 18:22:09 +08:00
Ruihan Li ff907d1131 Implement race-free job control 2025-05-09 17:12:31 +08:00
jiangjianfeng 3e66732889 Parse netlink message 2025-04-15 17:20:12 +08:00
jiangjianfeng b833ec6ede Implement ReadCString for MultiRead 2025-04-09 16:47:11 +08:00
jiangjianfeng 1846c680fc Clone the reader to prevent cursor misplacement in `ReadCString` 2025-03-31 14:00:04 +08:00
Chen Chengjun 2a20f6b59a Add mutable functionality to the process VMAR 2025-03-20 14:20:47 +08:00
Ruihan Li 0bfe7aceb8 Utilize `ThreadLocal` 2024-12-26 14:51:20 +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
Zhang Junyang 9e4257b655 Fix multiple issues pointed out by the new compiler 2024-10-13 22:32:05 +08:00
Shaowei Song f2af6136da Minor optimizations on both `lat-syscall-stat` and `lat-syscall-open` 2024-09-26 15:25:49 +08:00
Jianfeng Jiang fb718fd440 Optimize the latency of lat-sig-install 2024-09-25 17:29:20 +08:00
Zhang Junyang dafd16075f Remove the shim kernel crate 2024-08-23 23:37:50 +08:00