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