string pointers in probe scripts
Martin Hunt
hunt@redhat.com
Thu Aug 25 21:25:00 GMT 2005
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
More information about the Systemtap
mailing list