hook_ptrace_access_check(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… hook_ptrace_access_check (from the Kernel API Manual, bestie) πŸ’…

okay so picture this: it's giving security hook, it's giving Landlock, and it's literally the bouncer at the club deciding if one process gets to poke at another πŸ‘€βœ¨


🌸 NAME 🌸

hook_ptrace_access_check β€” the vibe check that decides whether the current process may access another one 🫢


✨ SYNOPSIS ✨

int hook_ptrace_access_check (struct task_struct *const child , const
       unsigned int mode );

like, that's the whole signature, no notes, she ate πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • child β€” the process being accessed. the one getting snooped on, bestie πŸ™ˆ
  • mode β€” the mode of attachment. how exactly you're tryna attach, iykyk

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea β˜• if the current task has Landlock rules, then child must have at least the same rules. that's it, that's the whole requirement.

and if not? denied. 🚫 lowkey brutal but she's consistent.


πŸ”₯ RETURN πŸ”₯

  • 0 β€” permission is granted, slay, you're in πŸ‘‘
  • -errno β€” denied 😭 the errno tells you why, fr fr

🌈 SEE ALSO 🌈

go read those next, they're all connected, no cap 🧚


πŸ’– that's the whole page, periodt πŸ’–

this lil masterpiece lives in the ./security/landlock source (that's the version tag, mwah), dated October 2026, and it's filed under hook_ptrace_access_check(9) in case you need to find her again πŸŽ€βœ¨πŸ«Ά

πŸ“¦ where this page comes from