Bug 240454 - RHEL4 Kernel crash when specifying mem= or highmem= kernel parameter
RHEL4 Kernel crash when specifying mem= or highmem= kernel parameter
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel-xen (Show other bugs)
4.6
All Linux
medium Severity medium
: ---
: ---
Assigned To: Chris Lalancette
Martin Jenner
:
Depends On: 240429
Blocks:
  Show dependency treegraph
 
Reported: 2007-05-17 13:05 EDT by Chris Lalancette
Modified: 2009-06-09 15:05 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-09-23 01:51:12 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
RHEL4 version of the patch to fix memory parameter at PV boot-time when specifying mem= (2.98 KB, patch)
2007-05-17 13:15 EDT, Chris Lalancette
no flags Details | Diff
RHEL4 revised patch to fix mem= (3.57 KB, patch)
2007-05-17 19:21 EDT, Chris Lalancette
no flags Details | Diff
Another version of the mem= patch for RHEL-4; I forgot a #include for x86_64 (4.17 KB, patch)
2007-05-30 16:06 EDT, Chris Lalancette
no flags Details | Diff

  None (edit)
Description Chris Lalancette 2007-05-17 13:05:59 EDT
+++ This bug was initially created as a clone of Bug #240429 +++

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.

-- Additional comment from clalance@redhat.com on 2007-05-17 10:40 EST --
Created an attachment (id=154921)
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
to xen-devel.

Chris Lalancette

-- Additional comment from clalance@redhat.com on 2007-05-17 13:00 EST --
Created an attachment (id=154933)
Patch to fix mem= kernel parameter (revised)

Silly me; x86_64 uses end_pfn instead of max_pfn.  Let's try again.

Chris Lalancette
Comment 1 Chris Lalancette 2007-05-17 13:15:05 EDT
Created attachment 154937 [details]
RHEL4 version of the patch to fix memory parameter at PV boot-time when specifying mem=

RHEL-4 version of the patch for PV guests to properly set the amount of memory
when specifying mem= on the kernel commandline.

Chris Lalancette
Comment 2 RHEL Product and Program Management 2007-05-17 13:24:21 EDT
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 3 Chris Lalancette 2007-05-17 19:21:05 EDT
Created attachment 154963 [details]
RHEL4 revised patch to fix mem=

The previous version of this patch was a little wrong in that it didn't free
the right amount of memory and didn't work properly when max_pfn <
xen_start_info->nr_pages (which is the case with maxmem= and memory=).	This
updated patch fixes it.  Note that this patch should be applied *after* the
patches in BZ 234496.

Chris Lalancette
Comment 4 Chris Lalancette 2007-05-30 16:06:05 EDT
Created attachment 155743 [details]
Another version of the mem= patch for RHEL-4; I forgot a #include for x86_64

This version of the patch now builds on x86_64; it was missing a #include for
<xen/interface/memory.h>

Chris Lalancette
Comment 5 Red Hat Bugzilla 2007-07-24 20:46:44 EDT
change QA contact
Comment 6 RHEL Product and Program Management 2007-09-07 15:35:10 EDT
This request was previously evaluated by Red Hat Product Management
for inclusion in the current Red Hat Enterprise Linux release, but
Red Hat was unable to resolve it in time.  This request will be
reviewed for a future Red Hat Enterprise Linux release.
Comment 7 Don Dutile 2008-01-04 15:15:18 EST
clearing devel-ack; not supported upstream or rhel5.
Comment 8 Chris Lalancette 2008-09-23 01:51:12 EDT
No customer interest at the moment, and needs more work than what I posted upstream.  I'm going to close it as WONTFIX for now, and if someone wants it in the future, we can revisit it.

Chris Lalancette

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