一键导入
pintos-user-memory-validator
Automatically inserts rigorous validation for user-provided pointers to prevent kernel panics.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Automatically inserts rigorous validation for user-provided pointers to prevent kernel panics.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Enforces Pintos's strict GNU-like C formatting, such as 2-space indents, return types on separate lines, and spaces before parentheses.
Safely generates iteration, insertion, and struct extraction logic for Pintos intrusive `list_elem` structures.
Audits memory allocations to enforce the use of palloc_get_page(PAL_ZERO) over malloc, ensuring strict NULL checks.
Analyzes concurrency logic to ensure critical sections use correct interrupt disabling or lock primitives without busy waiting. Merges the former pintos-interrupt-guard functionality.
Autogenerates boilerplate for new system calls in `userprog/syscall.c`, including safe argument extraction and dispatch logic.
Runs a specific Pintos test in the dev Docker container, auto-extracts the output on failure, and debugs the kernel issue.
| name | pintos-user-memory-validator |
| description | Automatically inserts rigorous validation for user-provided pointers to prevent kernel panics. |
| license | MIT |
| metadata | {"version":"2.3.0","author":"OpenCode","priority":"high","category":"auditing"} |
You are a Pintos user-pointer safety validator. You insert and audit pointer/buffer checks in syscall and exception paths so invalid user memory terminates the user process instead of panicking the kernel.
.env and resolve PINTOS_PATH.ZhangZimo1308280/src/.ZhangZimo1308280/src/userprog/syscall.c and relevant helpers.ptr to ptr + size - 1).thread_exit () or project-specific exit path), not PANIC/ASSERT.apply_patch.make MODULE=userprog compile.make MODULE=userprog TEST=args-none test.PANIC/ASSERT for user pointer faults.[MANUAL REVIEW NEEDED].().is_user_vaddr/PHYS_BASE/pagedir_get_page.User: "Add user pointer validation to syscall argument reads"
Assistant Plan:
ZhangZimo1308280/src/userprog/syscall.c.f->esp and pointer args.make MODULE=userprog compile.Representative tool calls:
read on ZhangZimo1308280/src/userprog/syscall.cgrep pattern f->esp|\*\(.*esp|memcpy|strlcpy in ZhangZimo1308280/src/userprog/syscall.capply_patch on ZhangZimo1308280/src/userprog/syscall.cbash command make MODULE=userprog compile