| 1 |
# vhangup ____________________________________________________ |
| 2 |
# |
| 3 |
# asmlinkage long |
| 4 |
# sys_vhangup(void) |
| 5 |
# |
| 6 |
|
| 7 |
@define _SYSCALL_VHANGUP_NAME |
| 8 |
%( |
| 9 |
name = "vhangup" |
| 10 |
%) |
| 11 |
|
| 12 |
@define _SYSCALL_VHANGUP_ARGSTR |
| 13 |
%( |
| 14 |
argstr = "" |
| 15 |
%) |
| 16 |
|
| 17 |
probe syscall.vhangup = dw_syscall.vhangup !, nd_syscall.vhangup ? {} |
| 18 |
probe syscall.vhangup.return = dw_syscall.vhangup.return !, |
| 19 |
nd_syscall.vhangup.return ? {} |
| 20 |
|
| 21 |
# dw_vhangup _____________________________________________________ |
| 22 |
|
| 23 |
probe dw_syscall.vhangup = kernel.function("sys_vhangup").call |
| 24 |
{ |
| 25 |
@_SYSCALL_VHANGUP_NAME |
| 26 |
@_SYSCALL_VHANGUP_ARGSTR |
| 27 |
} |
| 28 |
probe dw_syscall.vhangup.return = kernel.function("sys_vhangup").return |
| 29 |
{ |
| 30 |
@_SYSCALL_VHANGUP_NAME |
| 31 |
@SYSC_RETVALSTR($return) |
| 32 |
} |
| 33 |
|
| 34 |
# nd_vhangup _____________________________________________________ |
| 35 |
|
| 36 |
probe nd_syscall.vhangup = nd1_syscall.vhangup!, nd2_syscall.vhangup!, tp_syscall.vhangup |
| 37 |
{ } |
| 38 |
|
| 39 |
probe nd1_syscall.vhangup = kprobe.function("sys_vhangup") |
| 40 |
{ |
| 41 |
@_SYSCALL_VHANGUP_NAME |
| 42 |
@_SYSCALL_VHANGUP_ARGSTR |
| 43 |
} |
| 44 |
|
| 45 |
/* kernel 4.17+ */ |
| 46 |
probe nd2_syscall.vhangup = kprobe.function(@arch_syscall0_prefix "sys_vhangup") ? |
| 47 |
{ |
| 48 |
@_SYSCALL_VHANGUP_NAME |
| 49 |
@_SYSCALL_VHANGUP_ARGSTR |
| 50 |
} |
| 51 |
|
| 52 |
/* kernel 3.5+, but undesirable because it affects all syscalls */ |
| 53 |
probe tp_syscall.vhangup = kernel.trace("sys_enter") ? |
| 54 |
{ |
| 55 |
@__syscall_compat_gate(@const("__NR_vhangup"), @const("__NR_compat_vhangup")) |
| 56 |
@_SYSCALL_VHANGUP_NAME |
| 57 |
@_SYSCALL_VHANGUP_ARGSTR |
| 58 |
} |
| 59 |
|
| 60 |
probe nd_syscall.vhangup.return = nd1_syscall.vhangup.return!, nd2_syscall.vhangup.return!, tp_syscall.vhangup.return |
| 61 |
{ } |
| 62 |
|
| 63 |
probe nd1_syscall.vhangup.return = kprobe.function("sys_vhangup").return |
| 64 |
{ |
| 65 |
@_SYSCALL_VHANGUP_NAME |
| 66 |
@SYSC_RETVALSTR(returnval()) |
| 67 |
} |
| 68 |
|
| 69 |
/* kernel 4.17+ */ |
| 70 |
probe nd2_syscall.vhangup.return = kprobe.function(@arch_syscall0_prefix "sys_vhangup").return ? |
| 71 |
{ |
| 72 |
@_SYSCALL_VHANGUP_NAME |
| 73 |
@SYSC_RETVALSTR(returnval()) |
| 74 |
} |
| 75 |
|
| 76 |
/* kernel 3.5+, but undesirable because it affects all syscalls */ |
| 77 |
probe tp_syscall.vhangup.return = kernel.trace("sys_exit") |
| 78 |
{ |
| 79 |
__set_syscall_pt_regs($regs) |
| 80 |
@__syscall_compat_gate(@const("__NR_vhangup"), @const("__NR_compat_vhangup")) |
| 81 |
@_SYSCALL_VHANGUP_NAME |
| 82 |
@SYSC_RETVALSTR($ret) |
| 83 |
} |