ptracer_access_allowed(9)
π ptracer_access_allowed(9) π
okay so bestie, welcome to the Kernel API Manual entry for ptracer_access_allowed(9) β yes, the whole page is just about whether current may peek/poke @tsk's address space. iconic question, honestly.
β¨ NAME β¨
ptracer_access_allowed β may current peek/poke @tsk's address space?
π SYNOPSIS π
bool ptracer_access_allowed (struct task_struct *tsk );
π¦ ARGUMENTS π¦
tskβ tracee. that's the task being traced, bestie π«Ά
π DESCRIPTION π
okay so this is the per-access check used by ptrace_access_vm and the architecture-specific tag/register accessors. she returns true iff current is the registered ptracer of tsk and either tsk is owner-dumpable or current holds CAP_SYS_PTRACE in tsk's exec namespace. no cap.
lowkey she's lighter than __ptrace_may_access: on every access she re-validates only dumpability and capability, and does not re-run the LSM hooks or cred_cap_issubset checks that were performed at attach time. the way that's a whole different vibe from attach-time checking π
periodt.
π₯ SEE ALSO π₯
- Kernel file
./kernel/ptrace.cβ__ptrace_unlink(9),ptrace_check_attach(9),ptrace_traceme(9)
mwah π source/version: ./kernel Β· date: October 2026 Β· that's the cute little footer sign-off, bestie π«Ά
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms