| 1 |
# pselect7 _____________________________________________________ |
| 2 |
# |
| 3 |
# long sys_pselect7(int n, fd_set __user *inp, fd_set __user *outp, |
| 4 |
# fd_set __user *exp, struct timespec __user *tsp, |
| 5 |
# const sigset_t __user *sigmask, size_t sigsetsize) |
| 6 |
# |
| 7 |
|
| 8 |
@define _SYSCALL_PSELECT7_NAME |
| 9 |
%( |
| 10 |
name = "pselect7" |
| 11 |
%) |
| 12 |
|
| 13 |
@define _SYSCALL_PSELECT7_ARGSTR |
| 14 |
%( |
| 15 |
argstr = sprintf("%d, %p, %p, %p, %s, %p, %d", nfds, readfds, writefds, |
| 16 |
exceptfds, timeout_str, sigmask, sigsetsize) |
| 17 |
%) |
| 18 |
|
| 19 |
probe syscall.pselect7 = dw_syscall.pselect7 !, nd_syscall.pselect7 ? {} |
| 20 |
probe syscall.pselect7.return = dw_syscall.pselect7.return !, |
| 21 |
nd_syscall.pselect7.return ? {} |
| 22 |
|
| 23 |
# dw_pselect7 _____________________________________________________ |
| 24 |
|
| 25 |
probe dw_syscall.pselect7 = kernel.function("sys_pselect7").call ? |
| 26 |
{ |
| 27 |
@__syscall_gate(@const("__NR_pselect7")) |
| 28 |
@_SYSCALL_PSELECT7_NAME |
| 29 |
nfds = __int32($n) |
| 30 |
readfds = $inp |
| 31 |
writefds = $outp |
| 32 |
exceptfds = $exp |
| 33 |
timeout = $tsp |
| 34 |
timeout_str = _struct_timespec_u(timeout, 1) |
| 35 |
sigmask = $sig |
| 36 |
sigsetsize = $sigsetsize |
| 37 |
@_SYSCALL_PSELECT7_ARGSTR |
| 38 |
} |
| 39 |
probe dw_syscall.pselect7.return = kernel.function("sys_pselect7").return ? |
| 40 |
{ |
| 41 |
@__syscall_gate(@const("__NR_pselect7")) |
| 42 |
@_SYSCALL_PSELECT7_NAME |
| 43 |
@SYSC_RETVALSTR($return) |
| 44 |
} |
| 45 |
|
| 46 |
# nd_pselect7 _____________________________________________________ |
| 47 |
|
| 48 |
probe nd_syscall.pselect7 = kprobe.function("sys_pselect7") ? |
| 49 |
{ |
| 50 |
@__syscall_gate(@const("__NR_pselect7")) |
| 51 |
@_SYSCALL_PSELECT7_NAME |
| 52 |
asmlinkage() |
| 53 |
nfds = int_arg(1) |
| 54 |
readfds = pointer_arg(2) |
| 55 |
writefds = pointer_arg(3) |
| 56 |
exceptfds = pointer_arg(4) |
| 57 |
timeout = pointer_arg(5) |
| 58 |
timeout_str = _struct_timespec_u(timeout, 1) |
| 59 |
sigmask = pointer_arg(6) |
| 60 |
sigsetsize = ulong_arg(7) |
| 61 |
@_SYSCALL_PSELECT7_ARGSTR |
| 62 |
} |
| 63 |
probe nd_syscall.pselect7.return = kprobe.function("sys_pselect7").return ? |
| 64 |
{ |
| 65 |
@__syscall_gate(@const("__NR_pselect7")) |
| 66 |
@_SYSCALL_PSELECT7_NAME |
| 67 |
@SYSC_RETVALSTR(returnval()) |
| 68 |
} |
| 69 |
# compat_pselect7 ______________________________________________ |
| 70 |
|
| 71 |
probe syscall.compat_pselect7 = dw_syscall.compat_pselect7 !, |
| 72 |
nd_syscall.compat_pselect7 ? {} |
| 73 |
probe syscall.compat_pselect7.return = dw_syscall.compat_pselect7.return !, |
| 74 |
nd_syscall.compat_pselect7.return ? {} |
| 75 |
|
| 76 |
# dw_compat_pselect7 _____________________________________________________ |
| 77 |
|
| 78 |
probe dw_syscall.compat_pselect7 = kernel.function("compat_sys_pselect7").call ? |
| 79 |
{ |
| 80 |
@__compat_syscall_gate(@const("__NR_compat_pselect7")) |
| 81 |
@_SYSCALL_PSELECT7_NAME |
| 82 |
nfds = __int32($n) |
| 83 |
readfds = @__pointer($inp) |
| 84 |
writefds = @__pointer($outp) |
| 85 |
exceptfds = @__pointer($exp) |
| 86 |
timeout = @__pointer($tsp) |
| 87 |
timeout_str = _struct_compat_timespec_u(timeout, 1) |
| 88 |
sigmask = $sig |
| 89 |
sigsetsize = $sigsetsize |
| 90 |
@_SYSCALL_PSELECT7_ARGSTR |
| 91 |
} |
| 92 |
probe dw_syscall.compat_pselect7.return = kernel.function("compat_sys_pselect7").return ? |
| 93 |
{ |
| 94 |
@__compat_syscall_gate(@const("__NR_compat_pselect7")) |
| 95 |
@_SYSCALL_PSELECT7_NAME |
| 96 |
@SYSC_RETVALSTR($return) |
| 97 |
} |
| 98 |
|
| 99 |
# nd_compat_pselect7 _____________________________________________________ |
| 100 |
|
| 101 |
probe nd_syscall.compat_pselect7 = kprobe.function("compat_sys_pselect7") ? |
| 102 |
{ |
| 103 |
@__compat_syscall_gate(@const("__NR_compat_pselect7")) |
| 104 |
@_SYSCALL_PSELECT7_NAME |
| 105 |
asmlinkage() |
| 106 |
nfds = int_arg(1) |
| 107 |
readfds = pointer_arg(2) |
| 108 |
writefds = pointer_arg(3) |
| 109 |
exceptfds = pointer_arg(4) |
| 110 |
timeout = pointer_arg(5) |
| 111 |
timeout_str = _struct_compat_timespec_u(timeout, 1) |
| 112 |
sigmask = pointer_arg(6) |
| 113 |
sigsetsize = ulong_arg(7) |
| 114 |
@_SYSCALL_PSELECT7_ARGSTR |
| 115 |
} |
| 116 |
probe nd_syscall.compat_pselect7.return = kprobe.function("compat_sys_pselect7").return ? |
| 117 |
{ |
| 118 |
@__compat_syscall_gate(@const("__NR_compat_pselect7")) |
| 119 |
@_SYSCALL_PSELECT7_NAME |
| 120 |
@SYSC_RETVALSTR(returnval()) |
| 121 |
} |