From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13809 invoked by alias); 3 Oct 2011 15:53:56 -0000 Received: (qmail 13795 invoked by uid 22791); 3 Oct 2011 15:53:55 -0000 X-SWARE-Spam-Status: No, hits=-0.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,RCVD_IN_JMF_BL,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from smtprelay02.ispgateway.de (HELO smtprelay02.ispgateway.de) (80.67.18.14) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 03 Oct 2011 15:53:37 +0000 Received: from [85.179.21.230] (helo=[192.168.1.2]) by smtprelay02.ispgateway.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1RAkpj-0001Dy-FT for systemtap@sourceware.org; Mon, 03 Oct 2011 17:53:35 +0200 Message-ID: <4E89DA76.7010108@pipping.org> Date: Mon, 03 Oct 2011 15:53:00 -0000 From: Sebastian Pipping User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0.2) Gecko/20110928 Thunderbird/6.0.2 MIME-Version: 1.0 To: systemtap@sourceware.org Subject: Re: Heed help: Calling sys_getcwd to resolve relative pathnames from within systemtap References: <4E83BC3B.4080801@pipping.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Df-Sender: aGFydHdvcmtAYmluZXJhLmRl X-IsSubscribed: yes Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2011-q4/txt/msg00003.txt.bz2 On 09/30/2011 03:32 AM, Thiago Manel wrote: > I'm in the same situation, my workaround was to do: > > 1. get task_struct from task_current() > 2. then task_struct->fs_struct > 3. then fs_struct->pwd > > Now, looking sys_getcwd code, it seems that I missed some validations ... That sounds interesting. Is that code of yours laying around in some public git repo? If not: would you be willing to share it, maybe even be interested in turning this into a getcwd function for the tapsets shipped with systemtap? (Assuming systemtap upstream is willing to include such file if the license fits.) Best, Sebastian