src/tapset ChangeLog nfs.stp

Stone, Joshua I joshua.i.stone@intel.com
Tue Aug 21 19:10:00 GMT 2007


Wenji Huang wrote:
> Stone,
> 
>     Yes, It is more safe to duplicate this function with kread. It
>     returns same result as kernel iov_length. And in case of bad
>     pointer/nr_segs, there is kernel read fault error. Please review
>     it.
>     
>     function __iov_length:long(iov:long, nr_segs:long) %{ /*pure*/
>         unsigned long seg; size_t ret = 0; const struct iovec *iov =
>         (const struct iovec *) (long) THIS->iov; unsigned long
>         nr_segs = (unsigned long) THIS->nr_segs;
>         
>         for (seg = 0; seg < nr_segs; seg++)
>                 ret += kread(&(iov[seg].iov_len));
> 
>         THIS->__retvalue = (long) ret;
>         CATCH_DEREF_FAULT();
>     %}
> 
> Thanks,
> Wenji,

That looks great, thank you.

Josh


More information about the Systemtap mailing list