From a4578bd0c8fb4309742bef9afb4c9bf4c0ca75e9 Mon Sep 17 00:00:00 2001 From: jistone Date: Mon, 12 Dec 2005 22:19:12 +0000 Subject: [PATCH] 2005-12-12 Josh Stone * tapset/context.stp (execname,pid,tid,ppid,pexecname,gid,egid,uid,euid): Removed in_interrupt checks and other pointer checks. We now operate on the assumption that "current" and its related data are always valid. --- ChangeLog | 6 ++++++ tapset/context.stp | 45 +++++++++------------------------------------ 2 files changed, 15 insertions(+), 36 deletions(-) diff --git a/ChangeLog b/ChangeLog index 503745f94..0f6475914 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-12-12 Josh Stone + + * tapset/context.stp (execname,pid,tid,ppid,pexecname,gid,egid,uid,euid): + Removed in_interrupt checks and other pointer checks. We now operate on + the assumption that "current" and its related data are always valid. + 2005-12-12 Kevin Stafford * main.cxx (main): Added arch directory to the existing kernel-version-sensitive search path. diff --git a/tapset/context.stp b/tapset/context.stp index 0075150d8..56740db3b 100644 --- a/tapset/context.stp +++ b/tapset/context.stp @@ -30,66 +30,39 @@ function backtrace:string () %{ %} function execname:string () %{ - if (unlikely(in_interrupt())) - strlcpy (THIS->__retvalue, "", MAXSTRINGLEN); - else - strlcpy (THIS->__retvalue, current->comm, MAXSTRINGLEN); + strlcpy (THIS->__retvalue, current->comm, MAXSTRINGLEN); %} function pid:long () %{ - if (unlikely(in_interrupt())) - THIS->__retvalue = 0; - else - THIS->__retvalue = current->tgid; + THIS->__retvalue = current->tgid; %} function tid:long () %{ - if (unlikely(in_interrupt())) - THIS->__retvalue = 0; - else - THIS->__retvalue = current->pid; + THIS->__retvalue = current->pid; %} function ppid:long () %{ - if (unlikely(in_interrupt() || !current->parent)) - THIS->__retvalue = 0; - else - THIS->__retvalue = current->parent->tgid; + THIS->__retvalue = current->parent->tgid; %} function pexecname:string () %{ - if(unlikely(in_interrupt() || !current->parent || !current->parent->comm)) - strlcpy (THIS->__retvalue, "", MAXSTRINGLEN); - else - strlcpy (THIS->__retvalue, current->parent->comm, MAXSTRINGLEN); + strlcpy (THIS->__retvalue, current->parent->comm, MAXSTRINGLEN); %} function gid:long () %{ - if(unlikely(in_interrupt())) - THIS->__retvalue = 0; - else - THIS->__retvalue = current->gid; + THIS->__retvalue = current->gid; %} function egid:long () %{ - if(unlikely(in_interrupt())) - THIS->__retvalue = 0; - else - THIS->__retvalue = current->egid; + THIS->__retvalue = current->egid; %} function uid:long () %{ - if(unlikely(in_interrupt())) - THIS->__retvalue = 0; - else - THIS->__retvalue = current->uid; + THIS->__retvalue = current->uid; %} function euid:long () %{ - if(unlikely(in_interrupt())) - THIS->__retvalue = 0; - else - THIS->__retvalue = current->euid; + THIS->__retvalue = current->euid; %} -- 2.43.5