System Call Tracing

syscall_get_nr — find what system call a task is executing
syscall_rollback — roll back registers after an aborted system call
syscall_get_error — check result of traced system call
syscall_get_return_value — get the return value of a traced system call
syscall_set_return_value — change the return value of a traced system call
syscall_get_arguments — extract system call parameter values
syscall_set_arguments — change system call parameter value

The arch API for system call information is declared in <asm/syscall.h>. Each of these calls can be used only at system call entry tracing, or can be used only at system call exit and the subsequent safe points before returning to user mode. At system call entry tracing means either during a report_syscall_entry callback, or any time after that callback has returned UTRACE_STOP.