This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: string pointers in probe scripts
- From: Martin Hunt <hunt at redhat dot com>
- To: Kevin Stafford <kevinrs at us dot ibm dot com>
- Cc: systemtap at sources dot redhat dot com
- Date: Thu, 25 Aug 2005 14:24:45 -0700
- Subject: Re: string pointers in probe scripts
- Organization: Red Hat Inc.
- References: <430E3348.6050302@us.ibm.com>
On Thu, 2005-08-25 at 14:08 -0700, Kevin Stafford wrote:
> if I change log(string(fname));
> to log(fname);
That is correct.
> it will compile the module but then I get...
> ____________________________________________
> [root@localhost src]# ./stap -v -g testsuite/test.stp
> Created temporary directory "/tmp/stap8iUh6w"
> ...
> make: Leaving directory `/home/krstaffo/kernels/linux-2.6.13-rc5'
> Pass 4: compiled into "stap_0_1124994346.ko"
> Running /usr/bin/sudo /usr/local/libexec/systemtap/stpd
> /tmp/stap8iUh6w/stap_0_1124994346.ko
> started
> ERROR: pointer dereference fault near identifier '$filename' at
> testsuite/three.stp:17:8
> Running /bin/rm -rf /tmp/stap8iUh6w
> ____________________________________________
> I am wondering if this is happening because the filename parm in
> sys_open is pointing out
> to user land. I suspect access to pointers referencing user space is not
> supported.
>
> This is with the latest elfutils packages (114+) and the very latest CVS
> SystemTap src.
I ran into the same problem earlier today while trying to rewrite
shellsnoop as a systemtap script. I hadn't investigated, but it appears
to be a bug. It should work.
I'm filing a BZ on it.
Martin