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_getpgrp.stp
# getpgrp ____________________________________________________
# long sys_getpgrp(void)

@define _SYSCALL_GETPGRP_NAME
%(
	name = "getpgrp"
%)

@define _SYSCALL_GETPGRP_ARGSTR
%(
	argstr = ""
%)

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

# dw_getpgrp _____________________________________________________

probe dw_syscall.getpgrp = kernel.function("sys_getpgrp").call ?
{
	@_SYSCALL_GETPGRP_NAME
	@_SYSCALL_GETPGRP_ARGSTR
}
probe dw_syscall.getpgrp.return = kernel.function("sys_getpgrp").return ?
{
	@_SYSCALL_GETPGRP_NAME
	@SYSC_RETVALSTR($return)
}

# nd_getpgrp _____________________________________________________

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

probe nd1_syscall.getpgrp = kprobe.function("sys_getpgrp") ?
{
	@_SYSCALL_GETPGRP_NAME
	@_SYSCALL_GETPGRP_ARGSTR
}

/* kernel 4.17+ */
probe nd2_syscall.getpgrp = kprobe.function(@arch_syscall0_prefix "sys_getpgrp") ?
{
	@_SYSCALL_GETPGRP_NAME
	@_SYSCALL_GETPGRP_ARGSTR
}

/* kernel 3.5+, but undesirable because it affects all syscalls */
probe tp_syscall.getpgrp = kernel.trace("sys_enter") ?
{
	@__syscall_compat_gate(@const("__NR_getpgrp"), @const("__NR_compat_getpgrp"))
	@_SYSCALL_GETPGRP_NAME
	@_SYSCALL_GETPGRP_ARGSTR
}

probe nd_syscall.getpgrp.return = nd1_syscall.getpgrp.return!, nd2_syscall.getpgrp.return!, tp_syscall.getpgrp.return
  { }
  
probe nd1_syscall.getpgrp.return = kprobe.function("sys_getpgrp").return ?
{
	@_SYSCALL_GETPGRP_NAME
	@SYSC_RETVALSTR(returnval())
}

/* kernel 4.17+ */
probe nd2_syscall.getpgrp.return = kprobe.function(@arch_syscall0_prefix "sys_getpgrp").return ?
{
	@_SYSCALL_GETPGRP_NAME
	@SYSC_RETVALSTR(returnval())
}

/* kernel 3.5+, but undesirable because it affects all syscalls */
probe tp_syscall.getpgrp.return = kernel.trace("sys_exit")
{
	__set_syscall_pt_regs($regs)
	@__syscall_compat_gate(@const("__NR_getpgrp"), @const("__NR_compat_getpgrp"))
	@_SYSCALL_GETPGRP_NAME
	@SYSC_RETVALSTR($ret)
}

Spamworldpro Mini