kado

Results 3 issues of kado

PR Summary - Align truncate/ftruncate semantics: reject负长度,要求常规文件,非可写/非可写能力返回EINVAL,O_PATH返回EBADF,超出RLIMIT_FSIZE发送SIGXFSZ并报EFBIG。 - 移除在 FAT resize 中意外的文件大小限制,恢复正常扩展能力。 Testing - gVisor truncate_test(剩余 shm 未挂载导致的打开失败需环境侧解决)。

Bug fix

现在的user_path_at()函数直接从当前进程的mntns中拿到root_inode,pcb中的root没有使用到,这个行为似乎也不正确 ``` rust pub struct FsStruct { umask: ModeType, //文件权限掩码 path_context: RwLock, } struct PathContext { root: Arc, pwd: Arc, } // fn user_path_at let current_mntns = ProcessManager::current_mntns(); let mut...

Implementation Details · 增加sys_chroot系统调用,将pcb中root改为指定路径 Follow-ups · 校验/调整 CWD 以确保位于新根内(可选自动 chdir("/") 策略) · 限制已打开 fd 访问旧根(fd 语义隔离) · 补充文档与测试(含符号链接循环等边界) · 与 mount/user namespace 协同的后续支持

enhancement