This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Cannot access data passed in via gettimeofday
- From: fche at redhat dot com (Frank Ch. Eigler)
- To: Perry Cheng <perryche at us dot ibm dot com>
- Cc: "systemtap at sources dot redhat dot com" <systemtap at sources dot redhat dot com>
- Date: 15 Dec 2006 08:17:04 -0500
- Subject: Re: Cannot access data passed in via gettimeofday
- References: <OF0D2461E2.660D946F-ON85257244.0078E70A-85257244.0079C9A5@us.ibm.com>
Perry Cheng <perryche@us.ibm.com> writes:
> [...] I can't seem to see the data at all despite using the
> copy_from_user function to copy data from user to kernel space.
> [...]
Please be aware that might_sleep functions such as copy_from_user
should not generally be called from systemtap probe handlers.
Instead, one needs to use the atomic variants provided in the standard
tapset ... except we seem to lack a variant for copying over a struct
or an integer! We have had one old bug to improve target expression
syntax so this would be automated (#2049, to allow e.g. $tv=>tv_sec).
All that doesn't explain though why you're getting odd results. Does
the $tv pointer value itself seem plausible? Kernel/gcc version?
- FChE