![]() 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/ |
# umask ______________________________________________________ # long sys_umask(int mask) # @define _SYSCALL_UMASK_NAME %( name = "umask" %) @define _SYSCALL_UMASK_ARGSTR %( argstr = sprintf("%#o", mask) %) @define _SYSCALL_UMASK_REGARGS %( mask = uint_arg(1) %) @define _SYSCALL_UMASK_REGARGS_STORE %( if (@probewrite(mask)) set_uint_arg(1, mask) %) probe syscall.umask = dw_syscall.umask !, nd_syscall.umask ? {} probe syscall.umask.return = dw_syscall.umask.return !, nd_syscall.umask.return ? {} # dw_umask _____________________________________________________ probe dw_syscall.umask = kernel.function("sys_umask").call { @_SYSCALL_UMASK_NAME mask = __uint32($mask) @_SYSCALL_UMASK_ARGSTR } probe dw_syscall.umask.return = kernel.function("sys_umask").return { @_SYSCALL_UMASK_NAME @SYSC_RETVALSTR3($return) } # nd_umask _____________________________________________________ probe nd_syscall.umask = nd1_syscall.umask!, nd2_syscall.umask!, tp_syscall.umask { } probe nd1_syscall.umask = kprobe.function("sys_umask") ? { @_SYSCALL_UMASK_NAME asmlinkage() @_SYSCALL_UMASK_REGARGS @_SYSCALL_UMASK_ARGSTR } /* kernel 4.17+ */ probe nd2_syscall.umask = kprobe.function(@arch_syscall_prefix "sys_umask") ? { __set_syscall_pt_regs(pointer_arg(1)) @_SYSCALL_UMASK_NAME @_SYSCALL_UMASK_REGARGS @_SYSCALL_UMASK_ARGSTR }, { %( @_IS_SREG_KERNEL %? @_SYSCALL_UMASK_REGARGS_STORE %) } /* kernel 3.5+, but undesirable because it affects all syscalls */ probe tp_syscall.umask = kernel.trace("sys_enter") { __set_syscall_pt_regs($regs) @__syscall_compat_gate(@const("__NR_umask"), @const("__NR_compat_umask")) @_SYSCALL_UMASK_NAME @_SYSCALL_UMASK_REGARGS @_SYSCALL_UMASK_ARGSTR }, { %( @_IS_SREG_KERNEL %? @_SYSCALL_UMASK_REGARGS_STORE %) } probe nd_syscall.umask.return = nd1_syscall.umask.return!, nd2_syscall.umask.return!, tp_syscall.umask.return { } probe nd1_syscall.umask.return = kprobe.function("sys_umask").return ? { @_SYSCALL_UMASK_NAME @SYSC_RETVALSTR3(returnval()) } /* kernel 4.17+ */ probe nd2_syscall.umask.return = kprobe.function(@arch_syscall_prefix "sys_umask").return ? { @_SYSCALL_UMASK_NAME @SYSC_RETVALSTR3(returnval()) } /* kernel 3.5+, but undesirable because it affects all syscalls */ probe tp_syscall.umask.return = kernel.trace("sys_exit") { __set_syscall_pt_regs($regs) @__syscall_compat_gate(@const("__NR_umask"), @const("__NR_compat_umask")) @_SYSCALL_UMASK_NAME @SYSC_RETVALSTR3($ret) }