syscall_get_return_value(9)
π syscall_get_return_value β kernel API manual, but make it cute
Okay bestie, settle in, because we're talking about syscall_get_return_value(9) β yes, that's the function, and yes, 9 is the section number because this is Kernel API Manual territory, not your average section-1 situation. π
β¨ NAME β¨
syscall_get_return_value β literally just "get the return value of a traced system call." That's the whole vibe. π«Ά
πΈ SYNOPSIS πΈ
long syscall_get_return_value (struct task_struct *task , struct pt_regs *regs );
Look at her. Two pointers, one long. Iconic signature, no notes. π
π¦ ARGUMENTS π¦
taskβ the task of interest, and heads up: it must be blocked. Not optional, not a suggestion, this is a vibe check she has to pass. πregsβ thetask_pt_regsoftask. That's it, that's the arg. π
π₯ DESCRIPTION π₯
So what does she actually do? She returns the return value of the successful system call. Periodt. β¨
β οΈ But listen β that value is meaningless if syscall_get_error returned nonzero. Like, don't even look at it. It's giving "wrong answer but confidently." π
And the big one, no cap: 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. Any other time? Not the move. π
π SEE ALSO π
Kernel file ./include/asm-generic/syscall.h β and her whole friend group:
syscall_get_nr(9)syscall_set_nr(9)syscall_rollback(9)syscall_get_error(9)syscall_set_return_value(9)syscall_get_arguments(9)syscall_set_arguments(9)syscall_get_arch(9)
π That's the whole page, bestie β go forth and trace responsibly. π
Oh and before I forget, the source line lives at ./include/asm-generic, and this cutie is dated October 2026 β future-dated manual page, main character energy fr fr. πβπ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms