cap_ptrace_traceme(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

cap_ptrace_traceme(9) β€” determine whether another process may trace the current 🫢 Welcome to the cap_ptrace_traceme(9) page from the Kernel API Manual, bestie β€” this one's short but lowkey important πŸ’…

✨ SYNOPSIS ✨

int cap_ptrace_traceme (struct task_struct *parent );

πŸŽ€ ARGUMENTS πŸŽ€

  • parent β€” the task proposed to be the tracer. That's the candidate we're vibe-checking to see if it gets to trace the current process πŸ‘€

πŸ’… DESCRIPTION πŸ’…

Okay so here's the tea: if parent is in the same or an ancestor user_ns and has all of current's capabilities, then ptrace access is allowed, periodt ✨

If parent has the ptrace capability to current's user_ns, then ptrace access is allowed too. Else? Denied. No cap, no entry 🚫

So basically we're determining whether the nominated task is permitted to trace the current process. The return value is 0 if permission is granted, and -ve if it's denied. That's it, that's the whole plot 😭

🌈 SEE ALSO 🌈

Kernel file ./security/commoncap.c, plus the whole iconic crew:


That's the whole page, bestie πŸ’– this came from ./security and is dated October 2026 β€” it's the cap_ptrace_traceme(9) manual, so go trace responsibly, or like, don't, unless the cap check says yes πŸ’…πŸ¦‹

πŸ“¦ where this page comes from