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 :  /opt/rh/gcc-toolset-11/root/usr/share/systemtap/tapset/linux/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //opt/rh/gcc-toolset-11/root/usr/share/systemtap/tapset/linux/sysc_inotify_rm_watch.stp
# inotify_rm_watch ___________________________________________
#
# long sys_inotify_rm_watch(int fd, u32 wd)
#

@define _SYSCALL_INOTIFY_RM_WATCH_NAME
%(
	name = "inotify_rm_watch"
%)

@define _SYSCALL_INOTIFY_RM_WATCH_ARGSTR
%(
	argstr = sprintf("%d, %d", fd, wd)
%)

@define _SYSCALL_INOTIFY_RM_WATCH_REGARGS
%(
	fd = int_arg(1)
	wd = int_arg(2)
%)

@define _SYSCALL_INOTIFY_RM_WATCH_REGARGS_STORE
%(
        if (@probewrite(fd))
          set_int_arg(1, fd)

	if (@probewrite(wd))
	  set_int_arg(2, wd)
%)

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

# dw_inotify_rm_watch _____________________________________________________

probe dw_syscall.inotify_rm_watch = kernel.function("sys_inotify_rm_watch").call ?
{
	@_SYSCALL_INOTIFY_RM_WATCH_NAME
	fd = __int32($fd)
	wd = __int32($wd)
	@_SYSCALL_INOTIFY_RM_WATCH_ARGSTR
}
probe dw_syscall.inotify_rm_watch.return = kernel.function("sys_inotify_rm_watch").return ?
{
	@_SYSCALL_INOTIFY_RM_WATCH_NAME
	@SYSC_RETVALSTR($return)
}

# nd_inotify_rm_watch _____________________________________________________

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

probe nd1_syscall.inotify_rm_watch = kprobe.function("sys_inotify_rm_watch") ?
{
	@_SYSCALL_INOTIFY_RM_WATCH_NAME
	asmlinkage()
	@_SYSCALL_INOTIFY_RM_WATCH_REGARGS
	@_SYSCALL_INOTIFY_RM_WATCH_ARGSTR
}

/* kernel 4.17+ */
probe nd2_syscall.inotify_rm_watch = kprobe.function(@arch_syscall_prefix "sys_inotify_rm_watch") ?
{
	__set_syscall_pt_regs(pointer_arg(1))
	@_SYSCALL_INOTIFY_RM_WATCH_NAME
	@_SYSCALL_INOTIFY_RM_WATCH_REGARGS
	@_SYSCALL_INOTIFY_RM_WATCH_ARGSTR
},
{
        %( @_IS_SREG_KERNEL %? @_SYSCALL_INOTIFY_RM_WATCH_REGARGS_STORE %)
}

/* kernel 3.5+, but undesirable because it affects all syscalls */
probe tp_syscall.inotify_rm_watch = kernel.trace("sys_enter")
{
	__set_syscall_pt_regs($regs)
	@__syscall_compat_gate(@const("__NR_inotify_rm_watch"), @const("__NR_compat_inotify_rm_watch"))
	@_SYSCALL_INOTIFY_RM_WATCH_NAME
	@_SYSCALL_INOTIFY_RM_WATCH_REGARGS
	@_SYSCALL_INOTIFY_RM_WATCH_ARGSTR
},
{
        %( @_IS_SREG_KERNEL %? @_SYSCALL_INOTIFY_RM_WATCH_REGARGS_STORE %)
}

probe nd_syscall.inotify_rm_watch.return = nd1_syscall.inotify_rm_watch.return!, nd2_syscall.inotify_rm_watch.return!, tp_syscall.inotify_rm_watch.return
  { }
  
probe nd1_syscall.inotify_rm_watch.return = kprobe.function("sys_inotify_rm_watch").return ?
{
	@_SYSCALL_INOTIFY_RM_WATCH_NAME
	@SYSC_RETVALSTR(returnval())
}

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

Spamworldpro Mini