1SYSCALL_SET_RETURN_V(9)          Machine State         SYSCALL_SET_RETURN_V(9)
2
3
4

NAME

6       syscall_set_return_value - change the return value of a traced system
7       call
8

SYNOPSIS

10       void syscall_set_return_value(struct task_struct * task,
11                                     struct pt_regs * regs, int error,
12                                     long val);
13

ARGUMENTS

15       task
16           task of interest, must be blocked
17
18       regs
19
20           task_pt_regs of task
21
22       error
23           negative error code, or zero to indicate success
24
25       val
26           user return value if error is zero
27

DESCRIPTION

29       This changes the results of the system call that user mode will see. If
30       error is zero, the user sees a successful system call with a return
31       value of val. If error is nonzero, it´s a negated errno code; the user
32       sees a failed system call with this errno code.
33
34       It´s only valid to call this when task is stopped for tracing on exit
35       from a system call, due to TIF_SYSCALL_TRACE or TIF_SYSCALL_AUDIT.
36
37
38
39Kernel Hackers Manual 2.6.         June 2019           SYSCALL_SET_RETURN_V(9)
Impressum