Bug 519771 - pvclock return bogus wallclock values
Summary: pvclock return bogus wallclock values
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel
Version: 5.4
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Glauber Costa
QA Contact: Red Hat Kernel QE team
URL:
Whiteboard:
Depends On:
Blocks: 520417 524152 528898
TreeView+ depends on / blocked
 
Reported: 2009-08-27 18:48 UTC by Glauber Costa
Modified: 2010-03-30 07:42 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-03-30 07:42:41 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2010:0178 normal SHIPPED_LIVE Important: Red Hat Enterprise Linux 5.5 kernel security and bug fix update 2010-03-29 12:18:21 UTC

Description Glauber Costa 2009-08-27 18:48:49 UTC
I've just found a totally nasty bug today with kvmclock, thanks to testing done by lihuang at #476075.

Issue is at follows:

in RHEL5 kernel, __pa can miscalculate the address of C symbols. We have to use __pa_symbol() for that. So we effectively register the wallclock time MSR in the wrong address, and get a bogus value in return.

I haven't seen this before, because userspace uses hwclock program to adjust clock on bootup (which is harmful, because it increases delta between host and guest).

Furthermore, if we disable hwclock and fix the above issue, wall clock will still be wrong in 10 minutes. This is because I failed to adjust an initial base for monotonic clock, making the first interrupt after bootup try to compensate exactly 10 minutes of lost ticks.

Again, the presence of the hwclock utility papered over this.

I already have a patch that fixes both issues.

Comment 3 Don Zickus 2009-09-22 20:17:21 UTC
in kernel-2.6.18-166.el5
You can download this test kernel from http://people.redhat.com/dzickus/el5

Please do NOT transition this bugzilla state to VERIFIED until our QE team
has sent specific instructions indicating when to do so.  However feel free
to provide a comment indicating that this fix has been verified.

Comment 9 errata-xmlrpc 2010-03-30 07:42:41 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2010-0178.html


Note You need to log in before you can comment on or make changes to this bug.