| 1 |
# readahead __________________________________________________ |
| 2 |
# |
| 3 |
# compat_ssize_t compat_sys_readahead(int fd, u32 r4, u32 offhi, u32 offlo, |
| 4 |
# u32 count) |
| 5 |
# |
| 6 |
|
| 7 |
@define _SYSCALL_COMPAT_READAHEAD_NAME |
| 8 |
%( |
| 9 |
name = "readahead" |
| 10 |
%) |
| 11 |
|
| 12 |
@define _SYSCALL_COMPAT_READAHEAD_ARGSTR |
| 13 |
%( |
| 14 |
argstr = sprintf("%d, %d, %u", fd, offset, count) |
| 15 |
%) |
| 16 |
|
| 17 |
probe syscall.compat_readahead = dw_syscall.compat_readahead !, |
| 18 |
nd_syscall.compat_readahead ? {} |
| 19 |
probe syscall.compat_readahead.return = dw_syscall.compat_readahead.return !, |
| 20 |
nd_syscall.compat_readahead.return ? {} |
| 21 |
|
| 22 |
# dw_compat_readahead _____________________________________________________ |
| 23 |
|
| 24 |
probe dw_syscall.compat_readahead = kernel.function("compat_sys_readahead") ? |
| 25 |
{ |
| 26 |
@_SYSCALL_COMPAT_READAHEAD_NAME |
| 27 |
fd = __int32($fd) |
| 28 |
offset = (($offhi << 32) | $offlo) |
| 29 |
count = __uint32($count) |
| 30 |
@_SYSCALL_COMPAT_READAHEAD_ARGSTR |
| 31 |
} |
| 32 |
probe dw_syscall.compat_readahead.return = |
| 33 |
kernel.function("compat_sys_readahead").return ? |
| 34 |
{ |
| 35 |
@_SYSCALL_COMPAT_READAHEAD_NAME |
| 36 |
@SYSC_RETVALSTR($return) |
| 37 |
} |
| 38 |
|
| 39 |
# nd_compat_readahead _____________________________________________________ |
| 40 |
|
| 41 |
probe nd_syscall.compat_readahead = kprobe.function("compat_sys_readahead") ? |
| 42 |
{ |
| 43 |
@_SYSCALL_COMPAT_READAHEAD_NAME |
| 44 |
asmlinkage() |
| 45 |
fd = int_arg(1) |
| 46 |
/* the 2nd parameter (r4) is ignored */ |
| 47 |
offset = ((uint_arg(3) << 32) | uint_arg(4)) |
| 48 |
count = ulong_arg(5) |
| 49 |
@_SYSCALL_COMPAT_READAHEAD_ARGSTR |
| 50 |
} |
| 51 |
probe nd_syscall.compat_readahead.return = |
| 52 |
kprobe.function("compat_sys_readahead").return ? |
| 53 |
{ |
| 54 |
@_SYSCALL_COMPAT_READAHEAD_NAME |
| 55 |
@SYSC_RETVALSTR(returnval()) |
| 56 |
} |