ptrace_trap_notify(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ NAME πŸŽ€

ptrace_trap_notify β€” schedule trap to notify ptracer. Like the name says, bestie: it schedules a trap so the ptracer gets a lil notification. πŸ‘‘

✨ SYNOPSIS ✨

void ptrace_trap_notify (struct task_struct *t );

🫢 ARGUMENTS 🫢

  • t β€” the tracee that's wanting to notify its tracer πŸ’Œ

πŸ’… DESCRIPTION πŸ’…

This function schedules a sticky ptrace trap, and that trap is cleared on the next TRAP_STOP so the ptracer gets notified of an event. ✨ And hello? t must have been seized by the ptracer β€” that's the vibe check.

If t is running, the STOP trap will be taken. If t is trapped for STOP and the ptracer is listening for events, the tracee is woken up so it can re-trap for the new event. If t is trapped otherwise, the STOP trap will eventually be taken without returning to userland after the existing traps are finished by PTRACE_CONT. 😌

πŸ”’ CONTEXT πŸ”’

⚠️ Must be called with task->sighand->siglock held. That's not optional, bestie β€” lock check or it's giving bad vibes. πŸ’€

🌈 SEE ALSO 🌈

Kernel file ./kernel/signal.c plus the whole squad:


okay that's the whole page, bestie πŸ’– it's from ./kernel and dated October 2026 β€” mwah, go call it with the lock held πŸŽ€βœ¨

πŸ“¦ where this page comes from