This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug runtime/14848] Reading user memory fails occasionally when it shouldn't
- From: "dsmith at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sourceware dot org
- Date: Tue, 27 Nov 2012 19:23:42 +0000
- Subject: [Bug runtime/14848] Reading user memory fails occasionally when it shouldn't
- Auto-submitted: auto-generated
- References: <bug-14848-6586@http.sourceware.org/bugzilla/>
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.