hook_ptrace_traceme(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… hook_ptrace_traceme(9) πŸ’…

okay bestie, welcome to the Kernel API Manual β€” this is the page for hook_ptrace_traceme(9), and it's literally a permission vibe check for tracing. no cap. 🫢


✨ NAME ✨

hook_ptrace_traceme β€” Determines whether another process may trace the current one

🌸 SYNOPSIS 🌸

int hook_ptrace_traceme (struct task_struct *const parent );

πŸŽ€ ARGUMENTS πŸŽ€

  • parent β€” Task proposed to be the tracer.

That's the one argument, bestie. parent is the task that's proposed to be the tracer. πŸ’–

πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the situation: if the parent has Landlock rules, then the current task must have the same or more rules. Else denied. That's the whole rule, fr fr. πŸ’…

πŸ”₯ RETURN πŸ”₯

  • 0 β€” if permission is granted
  • -errno β€” if denied

Slay if you get 0; if it's denied, you get -errno. periodt. πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./security/landlock/task.c domain_scope_le(9), hook_ptrace_access_check(9), domain_is_scoped(9)


mwah πŸ’‹ β€” this cutie came from the ./security/landlock source/version, October 2026 edition. bye bestie! πŸŽ€βœ¨

πŸ“¦ where this page comes from