yama_ptrace_access_check(9)
β¨ yama_ptrace_access_check(9) β¨
okay so bestie, welcome to the Kernel API Manual β yes, the actual kernel, like the big one π
this page is all about yama_ptrace_access_check, and ngl it's a whole mood.
πΈ NAME πΈ
yama_ptrace_access_check β literally here to validate PTRACE_ATTACH calls, no cap π«Ά
π¦ SYNOPSIS π¦
int yama_ptrace_access_check (struct task_struct *child , unsigned int
mode );
π ARGUMENTS π
childβ the task that the current task is attempting to ptrace π like, this is the one being peeked atmodeβ the ptrace attach mode, the whole vibe of the attach fr
π DESCRIPTION π
So what does it do?? It returns 0 if following the ptrace is allowed β¨ and a -ve value on error π that's it, that's the whole function, iconic behaviour honestly.
π₯ SEE ALSO π₯
Kernel file ./security/yama/yama_lsm.c (go read it, iykyk) plus the whole squad:
yama_relation_cleanup(9)yama_ptracer_add(9)yama_ptracer_del(9)yama_task_free(9)yama_task_prctl(9)task_is_descendant(9)ptracer_exception_found(9)yama_ptrace_traceme(9)
bestie reminder: 0 means yes you may, negative means nope π
don't mix those up
that's the page!! ty for reading, mwah π this came straight out of ./security/yama and it's dated October 2026 β slay, see u next manual ππ§ββοΈ
π¦ 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