ptrace_report_syscall_exit(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

okay bestie, this page is ptrace_report_syscall_exit(9) from the Kernel API Manual β€” it's literally about the exact moment a task has just finished a system call. πŸ’…

ptrace_report_syscall_exit β€” task has just finished a system call. periodt. πŸ’–

🌸 SYNOPSIS 🌸

the whole signature, no cap:

void ptrace_report_syscall_exit (struct pt_regs *regs , int step );

πŸŽ€ ARGUMENTS πŸŽ€

  • regs β€” user register state of current task. like, the current task's whole register situation 🫢
  • step β€” nonzero if simulating single-step or block-step. iykyk ⭐

πŸ’œ DESCRIPTION πŸ’œ

okay so This will be called if SYSCALL_WORK_SYSCALL_TRACE has been set, when the current task has just finished an attempted system call. Full user register state is available here β€” yes, all of it, bestie. ✨

It is safe to block here, preventing signals from being processed. that's a big deal, okay? πŸ’…

If step is nonzero, this report is also in lieu of the normal trap that would follow the system call instruction because user_enable_block_step or user_enable_single_step was used. In this case, SYSCALL_WORK_SYSCALL_TRACE might not be set. πŸ‘€ noted.

Called without locks, just before checking for pending signals. that's the timing, no cap. πŸŽ€

🌈 SEE ALSO 🌈

Kernel file ./include/linux/ptrace.h is right there, and the whole squad is:


source/version: ./include/linux Β· date: October 2026 Β· mwah, bye bestie πŸ’–πŸ¦‹βœ¨

πŸ“¦ where this page comes from