Wang Siyuan
89e759894f
Remove `Rights` from VMO
2025-10-29 12:22:22 +08:00
Ruihan Li
2d74e69b4b
Add KDGKBMODE and KDSKBMODE ioctl support
2025-10-27 16:28:35 +08:00
Wei Zhang
2ba05a1673
Add KDGETMODE and KDSETMODE ioctl support
...
Add support for virtual console TTY mode management ioctls required by
Xorg and other display servers. The implementation includes:
- KDGETMODE: Query the current virtual console mode
- KDSETMODE: Switch between text and graphics modes
Virtual consoles utilize the framebuffer with two distinct modes:
- Text mode (default): Kernel renders text characters to framebuffer
- Graphics mode: User space applications gain full framebuffer control
Xorg requires KDSETMODE during initialization to switch to graphics
mode, preventing conflicts where both the kernel and Xorg would
simultaneously attempt to write to the framebuffer. This ensures
proper display handling and eliminates rendering artifacts.
Co-authored-by: Ruihan Li <lrh2000@pku.edu.cn>
2025-10-27 16:28:35 +08:00
Ruihan Li
8a16aa3b86
Refine the `ProcessVm` structure
2025-10-26 10:14:00 +08:00
Arthur Paulino
6a67807fd0
Implement `IdSet::iter_in`
...
This patch enables more expressive ways to slice and iterate over
the `Id`s in an `IdSet` with `IdSet::iter_in`, which takes an arbitrary
`IdSetSlicer`.
`IdSet::iter_in` efficiently slices out unintended inner parts and
then, within the remaining parts, skips inactive bits by using
`BitSlice::iter_ones` from the `bitvec` crate.
It also delivers several implementations of `IdSetSlicer` so OSTD
consumers can represent `Id` ranges ergonomically.
In the Asterinas kernel, `CpuSet::iter_in` enables a cleaner way to
define an interator that cycles over the CPUs.
2025-10-25 11:23:13 +08:00
jiangjianfeng
fe39a6803d
Unshare VM during execve
2025-10-25 10:36:30 +08:00
Chen Chengjun
0a80d55c95
Support mount bind a file
2025-10-24 11:13:09 +08:00
Chen Chengjun
53a1268e19
Add mountinfo files to proc filesystem
2025-10-24 11:12:16 +08:00
Chen Chengjun
7b68571290
Support generating the mount infomation
2025-10-24 11:12:16 +08:00
Ruihan Li
7e7ba43cdf
Revise some error messages
2025-10-22 14:05:38 +08:00
Ruihan Li
9ac0e31981
Implement better FS path APIs
2025-10-22 14:05:38 +08:00
jiangjianfeng
600446e9e1
Cleanup ThreadName related code
2025-10-20 10:52:07 +08:00
Chen Chengjun
782301c239
Remove open-related APIs from FsResolver
2025-10-17 16:18:56 +08:00
Chen Chengjun
c2ab393d57
Cleanup the lookup APIs of FsResolver
2025-10-17 16:18:56 +08:00
Wang Siyuan
3f2c319e00
Support `/proc/[pid]/mem` and `/proc/[pid]/task/[tid]/mem`
2025-10-15 16:34:32 +08:00
Wang Siyuan
ef5e0060d7
Support reading `InitStack` across pages
2025-10-15 16:34:32 +08:00
Qingsong Chen
257b0c63b1
Fix ext2 block groups count
2025-10-14 13:20:06 +09:00
Chen Chengjun
07d2d1db02
Support MS_PRIVATE flag for mount
2025-10-13 13:30:06 +08:00
Chen Chengjun
d2b4664078
Add a configfs usage example in ktest
2025-10-09 17:38:08 +08:00
Chen Chengjun
fc69af3e95
Support the basic configfs
2025-10-09 17:38:08 +08:00
Chen Chengjun
537f08d7cf
Make the cgroup systree independent
2025-10-09 17:38:08 +08:00
Ruihan Li
56d78ab649
Fix some minor style issues
2025-10-06 14:46:23 +08:00
Ruihan Li
b4f66ab379
Fix free memory value in `meminfo`
2025-10-06 14:46:23 +08:00
Ruihan Li
78ff1a689b
Fix wrong formats in `{uid,gid}_map`
2025-10-06 14:46:23 +08:00
jiangjianfeng
d75a2481bb
Support /proc/pid/uid_map and /proc/pid/gid_map
2025-09-30 16:42:54 +08:00
Ruihan Li
36a38c3f04
Bump `rand` version to 0.9.2
2025-09-30 11:36:37 +08:00
Yang Zhichao
66356e133d
Add support for `/proc/stat` and `/proc/uptime`
2025-09-27 21:02:23 +08:00
Chen Chengjun
728b8d1b5a
Bypass some permission checks with DAC_OVERRIDE
2025-09-26 15:14:29 +08:00
Ruihan Li
5a117bc859
Rewrite some error messages
2025-09-24 14:29:16 +08:00
Ruihan Li
89959d07df
Fix/clarify problems about mount namespaces
2025-09-24 14:29:16 +08:00
Chen Chengjun
4552fdb830
Introduce AtomicFileCreationMask
2025-09-24 08:07:25 +08:00
Chen Chengjun
bacbe58ff3
Modify the related logics in the initial phase
2025-09-24 08:07:25 +08:00
Chen Chengjun
3de56817fe
Introduce MountNamespace
2025-09-24 08:07:25 +08:00
Wang Siyuan
6dec3a6712
Replace `InodeMode::from_bits_trunucated` with `mkmod`
2025-09-22 10:20:36 +08:00
Wang Siyuan
51a055c467
Add macros `chmod` and `mkmod`
2025-09-22 10:20:36 +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
Wang Siyuan
46aa437c87
Add `/proc/pid/oom_score_adj`
2025-09-15 13:28:23 +08:00
Wang Siyuan
b42605af6b
Support configurable file modes within procfs
2025-09-15 13:28:23 +08:00
Chen Chengjun
c2a224e757
Fix the bug in is_mount_root method
2025-09-12 17:06:58 +08:00
Qingsong Chen
96adc3dc82
Add /proc/cmdline support
2025-09-12 08:45:32 +08:00
Chen Chengjun
8c36964bb9
Introduce VmPrinter to write kernel generated data
2025-09-10 21:07:14 +08:00
Chen Chengjun
12f2f6bb54
Correct the misuse of some AttributeErrors
2025-09-10 21:07:14 +08:00
Ruihan Li
9de70e38de
Add the `arch::cpu::cpuid` module
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
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
Ruihan Li
3b606f5b6c
Use `size_of`/`align_of` in the prelude
2025-09-04 09:26:56 +08:00
Zhang Junyang
eb69aa4fb9
Unify address and size APIs for memory objects
2025-09-02 17:53:55 +08:00
Chen Chengjun
f8e4aefcca
Add tmpfs support by wrapping ramfs
2025-08-29 15:45:20 +08:00