This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Heed help: Calling sys_getcwd to resolve relative pathnames from within systemtap
- From: Sebastian Pipping <sebastian at pipping dot org>
- To: systemtap at sourceware dot org
- Date: Mon, 03 Oct 2011 17:53:26 +0200
- Subject: Re: Heed help: Calling sys_getcwd to resolve relative pathnames from within systemtap
- References: <4E83BC3B.4080801@pipping.org> <CAHiC6b17y2c1BdMPdzbg3zpJXUTA5T98opE78Sa4EL9j1-+hhw@mail.gmail.com>
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