KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /proc/21573/root/usr/share/systemtap/tapset/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/21573/root/usr/share/systemtap/tapset/utrace.stp
/* utrace-only subset of register accessors */

%{
#include "syscall.h"
%}

function _utrace_syscall_nr:long () %{		/* pure */ /* myproc-unprivileged */
    if (! CONTEXT->uregs
        || ! (CONTEXT->probe_flags & _STP_PROBE_STATE_USER_MODE)) {
       CONTEXT->last_error = "invalid call without context registers";
    } else {
       STAP_RETVALUE = syscall_get_nr(current, CONTEXT->uregs);
    }
%}

function _utrace_syscall_arg:long (n:long) %{	/* pure */ /* myproc-unprivileged */
    unsigned long arg = 0;
    if (! CONTEXT->uregs
        || ! (CONTEXT->probe_flags & _STP_PROBE_STATE_USER_MODE)) {
       CONTEXT->last_error = "invalid call without context registers";
    } else {
       syscall_get_arguments(current, CONTEXT->uregs, (int)STAP_ARG_n, 1, &arg);
    }
    STAP_RETVALUE = arg;
%}

function _utrace_syscall_return:long () %{	/* pure */ /* myproc-unprivileged */
    /*
     * Here's the reason for the "unsigned long" cast.  Since all
     * values inside systemtap are 64-bit numbers, return values were
     * getting sign extended.  This caused return values to not match
     * up with the same values passes as arguments.
     */
    if (! CONTEXT->uregs
        || ! (CONTEXT->probe_flags & _STP_PROBE_STATE_USER_MODE)) {
       CONTEXT->last_error = "invalid call without context registers";
    } else {
       STAP_RETVALUE = (unsigned long)syscall_get_return_value(current,
							       CONTEXT->uregs);
    }
%}

Anon7 - 2021