This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: SYSTEMTAP TEST RESULTS : Kernel version 2.6.35-rc3 on POWER ppc64 architecture.


On 06/24/2010 08:43 PM, Josh Stone wrote:
> On 06/24/2010 02:54 PM, Josh Stone wrote:
>> Still, I'm tempted to just treat this as the special case that it
>> is. Within the translator, we could recognize when a SyS_foo is
>> matched in the kernel and silently rewrite it as SYSC_foo instead.
> 
> Ok, I was tempted enough to try it, and it almost works, but...
> 
>> We could even let .return go on these inlines, as it should do the
>> right thing as far as kretprobes is concerned.
> 
> This doesn't fire -- the return-address fixup doesn't do the right thing
> unless the probe is at the beginning of the actual function.
> 
> So we could rewrite only the syscall entry, but we're still at a loss
> for $target vars in the return.  I don't think there's much point in a
> special-case halfway solution.

Since fixing this in the translator didn't work, I figured out a
reasonable way to fix this in the tapset itself.  PR11751 was fixed in
commit 23fdba5.  I used @cast() so that:

  pipe0 = user_int(&$fildes[0])
  pipe1 = user_int(&$fildes[1])

is now:

  pipe0 = user_int(&@cast($fildes, "int")[0])
  pipe1 = user_int(&@cast($fildes, "int")[1])

This seems to work everywhere I tested it (on systems that use syscall
wrappers and on those that don't).

-- 
David Smith
dsmith@redhat.com
Red Hat
http://www.redhat.com
256.217.0141 (direct)
256.837.0057 (fax)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]