Prv8 Shell
Server : Apache
System : Linux server.mata-lashes.com 3.10.0-1160.90.1.el7.x86_64 #1 SMP Thu May 4 15:21:22 UTC 2023 x86_64
User : matalashes ( 1004)
PHP Version : 8.1.29
Disable Function : NONE
Directory :  /usr/share/systemtap/tapset/linux/powerpc/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/share/systemtap/tapset/linux/powerpc/sysc_compat_readahead.stp
# readahead __________________________________________________
#
# compat_ssize_t compat_sys_readahead(int fd, u32 r4, u32 offhi, u32 offlo,
#                                     u32 count)
#

@define _SYSCALL_COMPAT_READAHEAD_NAME
%(
	name = "readahead"
%)

@define _SYSCALL_COMPAT_READAHEAD_ARGSTR
%(
	argstr = sprintf("%d, %d, %u", fd, offset, count)
%)

probe syscall.compat_readahead = dw_syscall.compat_readahead !,
                                 nd_syscall.compat_readahead ? {}
probe syscall.compat_readahead.return = dw_syscall.compat_readahead.return !,
                                 nd_syscall.compat_readahead.return ? {}

# dw_compat_readahead _____________________________________________________

probe dw_syscall.compat_readahead = kernel.function("compat_sys_readahead") ?
{
	@_SYSCALL_COMPAT_READAHEAD_NAME
	fd = __int32($fd)
	offset = (($offhi << 32) | $offlo)
	count = __uint32($count)
	@_SYSCALL_COMPAT_READAHEAD_ARGSTR
}
probe dw_syscall.compat_readahead.return =
	kernel.function("compat_sys_readahead").return ?
{
	@_SYSCALL_COMPAT_READAHEAD_NAME
	@SYSC_RETVALSTR($return)
}

# nd_compat_readahead _____________________________________________________

probe nd_syscall.compat_readahead = kprobe.function("compat_sys_readahead") ?
{
	@_SYSCALL_COMPAT_READAHEAD_NAME
	asmlinkage()
	fd = int_arg(1)
	/* the 2nd parameter (r4) is ignored */
	offset = ((uint_arg(3) << 32) | uint_arg(4))
	count = ulong_arg(5)
	@_SYSCALL_COMPAT_READAHEAD_ARGSTR
}
probe nd_syscall.compat_readahead.return =
	kprobe.function("compat_sys_readahead").return ?
{
	@_SYSCALL_COMPAT_READAHEAD_NAME
	@SYSC_RETVALSTR(returnval())
}

haha - 2025