[Bug runtime/14848] Reading user memory fails occasionally when it shouldn't
dsmith at redhat dot com
sourceware-bugzilla@sourceware.org
Tue Nov 27 19:24:00 GMT 2012
http://sourceware.org/bugzilla/show_bug.cgi?id=14848
--- Comment #1 from David Smith <dsmith at redhat dot com> 2012-11-27 19:23:42 UTC ---
It looks like this is a "compat" issue. When we're doing a 32-bit executable on
a 64-bit kernel, user 'clock_settime()' ends up calling kernel
'compat_sys_clock_settime()', which looks like this:
====
long compat_sys_clock_settime(clockid_t which_clock,
struct compat_timespec __user *tp)
{
long err;
mm_segment_t oldfs;
struct timespec ts;
if (get_compat_timespec(&ts, tp))
return -EFAULT;
oldfs = get_fs();
set_fs(KERNEL_DS);
err = sys_clock_settime(which_clock,
(struct timespec __user *) &ts);
set_fs(oldfs);
return err;
}
====
I believe "access_ok()" is failing because the address that sys_clock_settime()
gets isn't a user address, it is a kernel address.
I don't know how to fix/workaround this yet.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Systemtap
mailing list