feat(mountstats): 新增proc挂载导出接口实现#1832
Conversation
xboHodx
commented
Apr 3, 2026
- 实现/proc/[pid]/mounts、/proc/[pid]/mountinfo、/proc/[pid]/mountstats接口
- 新增mount_view模块统一处理挂载视图渲染逻辑
- 支持按目标进程视角导出挂载信息
- 文档添加procfs相关章节
…ng and validation - Deleted init_skill.py as it was redundant. - Updated package_skill.py to exclude unnecessary files and directories during packaging. - Enhanced quick_validate.py to include compatibility field validation and improved error messages. - Added run_eval.py to evaluate skill descriptions against queries and output results in JSON format. - Introduced run_loop.py to facilitate an iterative evaluation and improvement process for skill descriptions. - Created utils.py for shared utility functions, including SKILL.md parsing. Signed-off-by: xboHodx <xbohodx2024@gmail.com>
- 实现/proc/[pid]/mounts、/proc/[pid]/mountinfo、/proc/[pid]/mountstats接口 - 新增mount_view模块统一处理挂载视图渲染逻辑 - 支持按目标进程视角导出挂载信息 - 文档添加procfs相关章节 Signed-off-by: xboHodx <xbohodx2024@gmail.com>
|
skill creator应该不要提交到dragonos吧? |
… packaging and validation" This reverts commit 250dc9b.
这是 #1823 的skill,不小心交上去了。现在撤下来应该没问题了。 |
…tats Signed-off-by: xboHodx <xbohodx2024@gmail.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7a6e4c94bb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
|
|
||
| fn render_mount_file(pid: RawPid, kind: ProcMountRenderKind) -> Result<Vec<u8>, SystemError> { | ||
| let target = ProcessManager::find(pid).ok_or(SystemError::ESRCH)?; |
There was a problem hiding this comment.
Resolve proc PID with namespace-aware lookup
render_mount_file() looks up the target task with ProcessManager::find(pid), which uses the global/raw PID table, but /proc/[pid] entries are created from virtual PIDs (find_task_by_vpid in procfs/pid/mod.rs). In a non-initial PID namespace, opening /proc/<vpid>/mounts|mountinfo|mountstats can therefore resolve the wrong process (or ESRCH), producing incorrect mount data and potentially exposing another task’s mount view. Use a namespace-aware PID lookup for the proc PID here.
Useful? React with 👍 / 👎.
Signed-off-by: xboHodx <xbohodx2024@gmail.com>