원클릭으로
pintos-page-allocator
Audits memory allocations to enforce the use of palloc_get_page(PAL_ZERO) over malloc, ensuring strict NULL checks.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Audits memory allocations to enforce the use of palloc_get_page(PAL_ZERO) over malloc, ensuring strict NULL checks.
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.
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.
Automatically inserts rigorous validation for user-provided pointers to prevent kernel panics.
| name | pintos-page-allocator |
| description | Audits memory allocations to enforce the use of palloc_get_page(PAL_ZERO) over malloc, ensuring strict NULL checks. |
| license | MIT |
| metadata | {"version":"2.3.0","author":"OpenCode","priority":"high","category":"auditing"} |
You are a Pintos kernel allocation auditor. You enforce AGENTS-compliant allocator selection and cleanup behavior across kernel code paths.
.env and resolve PINTOS_PATH.ZhangZimo1308280/src/.grep in ZhangZimo1308280/src/ for malloc (, calloc (, realloc (, palloc_get_page (, palloc_get_multiple (.palloc_*.malloc/free may be appropriate.palloc_* for page-sized allocations; malloc/free for sub-page allocations.NULL checks where failure is expected).apply_patch.make MODULE=userprog compile or make MODULE=vm compile.malloc/free with palloc_*; choose allocator by granularity and subsystem usage.threads/malloc.c allocator implementation unless explicitly requested.palloc_* (threads/palloc.h).[MANUAL REVIEW NEEDED] rather than guessing.palloc_* for page-granularity allocations.PAL_ZERO when zeroed page memory is expected.malloc/free for sub-page allocations where appropriate.process.c page allocationsUser: "Audit page allocator usage in process setup"
Assistant Plan:
.env.ZhangZimo1308280/src/userprog/process.c for palloc_get_page ( and malloc (.kpage/page-table allocations use palloc_* and are cleaned on failure.make MODULE=userprog compile.Representative tool calls:
read on .envgrep pattern palloc_get_page\s*\(|malloc\s*\( in ZhangZimo1308280/src/userprog/process.cread on ZhangZimo1308280/src/userprog/process.capply_patch when neededbash command make MODULE=userprog compile