This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: kprobe fault handling
On Fri, 2006-02-10 at 17:47 -0500, Frank Ch. Eigler wrote:
> > What makes the __copy_from_user functions more unsafe than the
> > strncpy_from_user or get_user functions? Or are they all unsafe?
>
> Those kernel functions are similarly unsafe (for purposes of
> systemtap), since they can sleep (wait while page faults are being
> serviced).
I started this whole thread to explain that my tests were now showing
that was indeed the case. However that was due to an easily fixed bug in
the fault handler. You can't deem high-level functions unsafe to use
because a bug in a lower-level routine temporarily made them that way.
> This is why Roland went out of his way to collect
> alternatives in loc2c-runtime.h. This was explained at the time.
IIRC, he explained to you why using __get_user_asm was safe. That is the
same function used by copy_from_user and get_user.
Martin