Red Hat Bugzilla – Bug 240429
RHEL5 Kernel crash when specifying mem= or highmem= kernel parameter
Last modified: 2018-10-19 22:52:33 EDT
Description of problem:
When specifying mem= or highmem= on the kernel (not HV) command-line, the kernel
will crash fairly early on, in setup-xen.c. The problem seems to be that the
initial setup code always assumes max_pfn >= xen_start_info->nr_pages. When
specifying mem= on the kernel command-line, however, this is not the case, so
the setup code actually allocates the p2m table as the sizeof max_pfn, and then
attempts to copy sizeof xen_start_info->nr_pages, which overflows the table and
crashes the machine.
Note that this is a problem in upstream Xen, as well as in RHEL-4 PV.
Created attachment 154921 [details]
Patch to fix mem= kernel parameter
This is the patch I am currently testing to fix the problem when specifying
mem= on the kernel command-line. Once I confirm it in my testing, I'll post it
Created attachment 154933 [details]
Patch to fix mem= kernel parameter (revised)
Silly me; x86_64 uses end_pfn instead of max_pfn. Let's try again.
Patch posted upstream:
change QA contact
This was committed to xen-3.1-testing as c/s 15098.
This request was evaluated by Red Hat Product Management for
inclusion, but this component is not scheduled to be updated in
the current Red Hat Enterprise Linux release. If you would like
this request to be reviewed for the next minor release, ask your
support representative to set the next rhel-x.y flag to "?".
May I ask the reason for this BZ being closed WONTFIX? Was this not
reproduced with 5.3rc?
This event sent from IssueTracker by tumeya
Oops. I missed that there was an IT attached to this. Basically, I hadn't seen any customer demand for it, so I thought it wasn't worth spending time on. If there is an IT attached, though, I'll open it back up.
Created attachment 335116 [details]
Another version of the patch, that seems to work better for me
Here's another version of the patch. This one seems to fix the crashes on both i386 and x86_64 for me. I've tested with an i386 PV guest, an x86_64 PV guest, and an x86_64 dom0; they all seem to do OK. I still need to test with an i386 dom0, but once I've done that, we should be good to go. This is essentially a backport of upstream xen-unstable c/s 15098, with two RHEL-specific tweaks.
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.
~~ Attention - RHEL 5.4 Beta Released! ~~
RHEL 5.4 Beta has been released! There should be a fix present in the Beta release that addresses this particular request. Please test and report back results here, at your earliest convenience. RHEL 5.4 General Availability release is just around the corner!
If you encounter any issues while testing Beta, please describe the issues you have encountered and set the bug into NEED_INFO. If you encounter new issues, please clone this bug to open a new issue and request it be reviewed for inclusion in RHEL 5.4 or a later update, if it is not of urgent severity.
Please do not flip the bug status to VERIFIED. Only post your verification results, and if available, update Verified field with the appropriate value.
Questions can be posted to this bug or your customer or partner representative.
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.