syscall_get_error(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ NAME πŸ¦‹

okay so this is the syscall_get_error(9) page, part of the Kernel API Manual, and it's literally here to check the result of a traced system call. main character energy for syscall tracing ✨

✨ SYNOPSIS ✨

long syscall_get_error (struct task_struct *task , struct pt_regs *regs
);

πŸŽ€ ARGUMENTS πŸŽ€

  • task β€” the task of interest, and bestie it must be blocked. no exceptions πŸ’…
  • regs β€” the task_pt_regs of task. literally that 🫢

πŸ’… DESCRIPTION πŸ’…

So it returns 0 if the system call succeeded, or -ERRORCODE if it failed. that's the whole vibe check, fr fr 😌

⚠️ It's only valid to call this when task is stopped for tracing on exit from a system call, due to SYSCALL_WORK_SYSCALL_TRACE or SYSCALL_WORK_SYSCALL_AUDIT. like, do not freelance this check at other times, bestie β€” it's giving strict rules only πŸ”₯

🌈 SEE ALSO 🌈

Kernel file ./include/asm-generic/syscall.h β€” go read the source, iykyk. also these iconic siblings:


this page's source/home is ./include/asm-generic, and the version/date is October 2026. mwah, mwah πŸ’‹πŸŽ€

πŸ“¦ where this page comes from