| 1 |
# sys32_getdents ________________________________________ |
| 2 |
# |
| 3 |
# asmlinkage long sys32_getdents(unsigned int fd, |
| 4 |
# struct linux_dirent32 __user *dirent, |
| 5 |
# unsigned int count) |
| 6 |
# |
| 7 |
|
| 8 |
@define _SYSCALL_SYS32_GETDENTS_NAME |
| 9 |
%( |
| 10 |
name = "sys32_getdents" |
| 11 |
%) |
| 12 |
|
| 13 |
@define _SYSCALL_SYS32_GETDENTS_ARGSTR |
| 14 |
%( |
| 15 |
argstr = sprintf("%d, %p, %d", fd, dirp_uaddr, count) |
| 16 |
%) |
| 17 |
|
| 18 |
probe syscall.sys32_getdents = dw_syscall.sys32_getdents !, |
| 19 |
nd_syscall.sys32_getdents ? {} |
| 20 |
probe syscall.sys32_getdents.return = dw_syscall.sys32_getdents.return !, |
| 21 |
nd_syscall.sys32_getdents.return ? {} |
| 22 |
|
| 23 |
# dw_sys32_getdents _____________________________________________________ |
| 24 |
|
| 25 |
probe dw_syscall.sys32_getdents = kernel.function("sys32_getdents") ? |
| 26 |
{ |
| 27 |
@_SYSCALL_SYS32_GETDENTS_NAME |
| 28 |
fd = $fd |
| 29 |
dirp_uaddr = $dirent |
| 30 |
count = $count |
| 31 |
@_SYSCALL_SYS32_GETDENTS_ARGSTR |
| 32 |
} |
| 33 |
probe dw_syscall.sys32_getdents.return = kernel.function("sys32_getdents").return ? |
| 34 |
{ |
| 35 |
@_SYSCALL_SYS32_GETDENTS_NAME |
| 36 |
@SYSC_RETVALSTR($return) |
| 37 |
} |
| 38 |
|
| 39 |
# nd_sys32_getdents _____________________________________________________ |
| 40 |
|
| 41 |
probe nd_syscall.sys32_getdents = kprobe.function("sys32_getdents") ? |
| 42 |
{ |
| 43 |
@_SYSCALL_SYS32_GETDENTS_NAME |
| 44 |
asmlinkage() |
| 45 |
fd = uint_arg(1) |
| 46 |
dirp_uaddr = pointer_arg(2) |
| 47 |
count = uint_arg(3) |
| 48 |
@_SYSCALL_SYS32_GETDENTS_ARGSTR |
| 49 |
} |
| 50 |
probe nd_syscall.sys32_getdents.return = kprobe.function("sys32_getdents").return ? |
| 51 |
{ |
| 52 |
@_SYSCALL_SYS32_GETDENTS_NAME |
| 53 |
@SYSC_RETVALSTR(returnval()) |
| 54 |
} |