Bug 605697 - [RHEL 5.5] 32-bit pvhvm guest on 64-bit host crash w/xm mem-set
Summary: [RHEL 5.5] 32-bit pvhvm guest on 64-bit host crash w/xm mem-set
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel-xen
Version: 5.6
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Radim Krčmář
QA Contact: Virtualization Bugs
URL:
Whiteboard:
: 620733 (view as bug list)
Depends On:
Blocks: 514489 605694 637658
TreeView+ depends on / blocked
 
Reported: 2010-06-18 15:08 UTC by Jarod Wilson
Modified: 2011-02-02 09:41 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 626806 637658 (view as bug list)
Environment:
Last Closed: 2011-01-13 21:38:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Prevent crashing of x86 guest on x86_64 host by checking for -ENOSYS first. (2.11 KB, patch)
2010-09-16 13:27 UTC, Radim Krčmář
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:0017 0 normal SHIPPED_LIVE Important: Red Hat Enterprise Linux 5.6 kernel security and bug fix update 2011-01-13 10:37:42 UTC

Comment 4 RHEL Program Management 2010-06-30 18:30:44 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 5 Andrew Jones 2010-08-18 13:44:48 UTC
*** Bug 620733 has been marked as a duplicate of this bug. ***

Comment 6 Andrew Jones 2010-08-24 12:52:57 UTC
Getting ballooning to work for 32on64 HVM guests looks like it will require more changes than we want to make, at least for 5.6, especially considering there haven't been any customer requests for this feature. However, when a sysadmin types 'xm mem-set' on their HVM guest it's not very nice to watch it crash.  I'll attach a simple patch for the kernel that simply propagates the error (rather than BUGs).

Comment 7 Andrew Jones 2010-08-24 13:25:14 UTC
Ugh... I spoke too soon. Looking at the balloon driver's design, it's not trivial to just propagate the error. I think we'll have to be satisfied with just guarding against this in the tools until we can get ballooning working 100% (if we decide to do so).

I'll clone this bug to userspace to work up a patch there for 5.6. And flip the flag in this kernel side bug to 5.7.

Comment 8 Radim Krčmář 2010-09-16 13:27:42 UTC
Created attachment 447743 [details]
Prevent crashing of x86 guest on x86_64 host by checking for -ENOSYS first.

I've explored the hypervisor (backport) and tools (guard) variants and adapting the patch from oracle still seems like a best solution, as the other would require to pull lots of possibly buggy code from upstream, while this patch does similar job and with ifdefs it changes only the vulnerable kernels.

Comment 9 Paolo Bonzini 2010-09-16 14:18:59 UTC
Note to QE: please make sure that both echo to /proc/xen/balloon, and "xm mem-set" are tested.

Comment 10 Jarod Wilson 2010-09-20 16:39:16 UTC
We have a patch posted for 5.6 right now, so flipping flag back to 5.6...

Comment 13 RHEL Program Management 2010-09-21 05:29:13 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 14 Jarod Wilson 2010-09-21 21:00:31 UTC
in kernel-2.6.18-223.el5
You can download this test kernel (or newer) from http://people.redhat.com/jwilson/el5

Detailed testing feedback is always welcomed.

Comment 16 Yufang Zhang 2010-12-16 08:21:35 UTC
QA verified this bug with -237 kernel-xen package:

1. Start a 32bit RHEL5.5 HVM guest.
2. Make sure balloon module is loaded.
3. In Domain0, try to balloon down the pvHVM guest via xm mem-set

At step 3, the guest memory size changes from 512M to 400M. And the guest didn't crash. 

BTW, it seems that no /proc/xen/balloon interface is provided in RHEL5.5 HVM guest, so should "echo to /proc/xen/balloon" be tested too?

Comment 17 Paolo Bonzini 2010-12-16 13:27:23 UTC
No, I'll check why /proc/xen is not found.  Maybe Andrew knows already though.

Comment 18 Andrew Jones 2010-12-16 21:55:45 UTC
(In reply to comment #17)
> No, I'll check why /proc/xen is not found.  Maybe Andrew knows already though.

It's only created for xen kernels (not bare-metal/HVM kernels), because all calls to create_xen_proc_entry are wrapped with an #ifdef like this

#if defined(CONFIG_PROC_FS) && defined(CONFIG_XEN_PRIVILEGED_GUEST)
        if ((balloon_pde = create_xen_proc_entry("balloon", 0644)) == NULL) {

Comment 20 errata-xmlrpc 2011-01-13 21:38:21 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-2011-0017.html


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