Red Hat Bugzilla – Bug 494876
[RHEL5.4]: Explicitly zero CR in getvcpucontext
Last modified: 2009-09-02 05:00:27 EDT
Description of problem:
There was recently a patch posted to xen-devel to explicitly zero out the CR memory in the hypervisor:
Supposedly, this affects recent SUSE guests and recent PV-OPS guests, but after a quick look at the code, I can't seem to see how this will make a difference. As far as I can tell, neither the SLES11 kernel nor the kernel.org PV-OPS kernel uses the CR memory region. That being said, it's certainly possible I'm missing something, so we should find out for sure, and backport xen-unstable c/s 19505 if necessary.
Assigned for triage. Miroslav, we have to figure out whether this is actually needed or not. At a quick glance, I couldn't figure it out. If we don't need it, I'd want to know why we don't need it while upstream does, especially since supporting pv-ops guests is a high priority for us going forward.
I'd recommended copy this patch as it guarantees that guest won't received undefined value that can cause guest to behave unstable. If we want to be sure that each calling getvcpucontext hypercall returns concrete value.
OK, a couple of things. First, the patch that actually was committed into the upstream tree is slightly different than the one posted to the mailing list. This happens often in the Xen world, you'll get used to it :). That being said, we like to stay as close as possible to what is in the upstream; it makes future porting work easier.
The second thing is that I still don't understand how or why this patch is needed. Maybe I'm just missing something, but doing a "grep -rI ctrlreg *" in the pv-ops source tree, I *only* see ctrlreg being used, not ctrlreg. Now, it's entirely possible that I'm missing something, and it's copied around as part of a larger data structure. But before committing the patch to the tree, I would like to understand better where and how this is used. Maybe you can point out what I'm missing to make this patch useful. Or, if need be, we can always email Ian Campbell (the original patch author) to see why exactly he posted the patch in the first place.
*** Bug 499598 has been marked as a duplicate of this bug. ***
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.
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.