Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /proc/self/root/opt/rh/gcc-toolset-11/root/usr/share/systemtap/tapset/linux/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/opt/rh/gcc-toolset-11/root/usr/share/systemtap/tapset/linux/sysc_fanotify_init.stp
# fanotify_init ______________________________________________
# fanotify_init() was enabled in kernel version 2.6.37.
# SYSCALL_DEFINE2(fanotify_init, unsigned int, flags,
#		  unsigned int, event_f_flags)

@define _SYSCALL_FANOTIFY_INIT_NAME
%(
	name = "fanotify_init"
%)

@define _SYSCALL_FANOTIFY_INIT_ARGSTR
%(
	argstr = sprintf("%s, %s", flags_str, event_f_flags_str)
%)

@define _SYSCALL_FANOTIFY_INIT_REGARGS
%(
	flags = uint_arg(1)
	flags_str = _fanotify_init_flags_str(flags)
	event_f_flags = uint_arg(2)
	event_f_flags_str = _sys_open_flag_str(event_f_flags)
%)

@define _SYSCALL_FANOTIFY_INIT_REGARGS_STORE
%(
        if (@probewrite(flags))
          set_uint_arg(1, flags)

	if (@probewrite(event_f_flags))
	  set_uint_arg(2, event_f_flags)
%)

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

# dw_fanotify_init _____________________________________________________

probe dw_syscall.fanotify_init = kernel.function("sys_fanotify_init").call ?
{
	@_SYSCALL_FANOTIFY_INIT_NAME
	flags = __uint32($flags)
	flags_str = _fanotify_init_flags_str(flags)
	event_f_flags = __uint32($event_f_flags)
	event_f_flags_str = _sys_open_flag_str(event_f_flags)
	@_SYSCALL_FANOTIFY_INIT_ARGSTR
}
probe dw_syscall.fanotify_init.return =
	kernel.function("sys_fanotify_init").return ?
{
	@_SYSCALL_FANOTIFY_INIT_NAME
	@SYSC_RETVALSTR($return)
}

# nd_fanotify_init _____________________________________________________

probe nd_syscall.fanotify_init = nd1_syscall.fanotify_init!, nd2_syscall.fanotify_init!, tp_syscall.fanotify_init
  { }

probe nd1_syscall.fanotify_init = kprobe.function("sys_fanotify_init") ?
{
	@_SYSCALL_FANOTIFY_INIT_NAME
	asmlinkage()
	@_SYSCALL_FANOTIFY_INIT_REGARGS
	@_SYSCALL_FANOTIFY_INIT_ARGSTR
}

/* kernel 4.17+ */
probe nd2_syscall.fanotify_init = kprobe.function(@arch_syscall_prefix "sys_fanotify_init") ?
{
	__set_syscall_pt_regs(pointer_arg(1))
	@_SYSCALL_FANOTIFY_INIT_NAME
	@_SYSCALL_FANOTIFY_INIT_REGARGS
	@_SYSCALL_FANOTIFY_INIT_ARGSTR
},
{
        %( @_IS_SREG_KERNEL %? @_SYSCALL_FANOTIFY_INIT_REGARGS_STORE %)
}

/* kernel 3.5+, but undesirable because it affects all syscalls */
probe tp_syscall.fanotify_init = kernel.trace("sys_enter")
{
	__set_syscall_pt_regs($regs)
	@__syscall_compat_gate(@const("__NR_fanotify_init"), @const("__NR_compat_fanotify_init"))
	@_SYSCALL_FANOTIFY_INIT_NAME
	@_SYSCALL_FANOTIFY_INIT_REGARGS
	@_SYSCALL_FANOTIFY_INIT_ARGSTR
},
{
        %( @_IS_SREG_KERNEL %? @_SYSCALL_FANOTIFY_INIT_REGARGS_STORE %)
}

probe nd_syscall.fanotify_init.return = nd1_syscall.fanotify_init.return!, nd2_syscall.fanotify_init.return!, tp_syscall.fanotify_init.return
  { }
  
probe nd1_syscall.fanotify_init.return =
	kprobe.function("sys_fanotify_init").return ?
{
	@_SYSCALL_FANOTIFY_INIT_NAME
	@SYSC_RETVALSTR(returnval())
}

/* kernel 4.17+ */
probe nd2_syscall.fanotify_init.return = kprobe.function(@arch_syscall_prefix "sys_fanotify_init").return ?
{
	@_SYSCALL_FANOTIFY_INIT_NAME
	@SYSC_RETVALSTR(returnval())
}
 
/* kernel 3.5+, but undesirable because it affects all syscalls */
probe tp_syscall.fanotify_init.return = kernel.trace("sys_exit")
{
	__set_syscall_pt_regs($regs)
	@__syscall_compat_gate(@const("__NR_fanotify_init"), @const("__NR_compat_fanotify_init"))
	@_SYSCALL_FANOTIFY_INIT_NAME
	@SYSC_RETVALSTR($ret)
}

Spamworldpro Mini