Bug 240777 - nash support for spaces in kernel command line
Summary: nash support for spaces in kernel command line
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: mkinitrd (Show other bugs)
(Show other bugs)
Version: 4.5
Hardware: All Linux
high
high
Target Milestone: ---
: ---
Assignee: Martin Sivák
QA Contact: David Lawrence
URL:
Whiteboard:
Keywords: Reopened
Depends On:
Blocks: 240779 240785
TreeView+ depends on / blocked
 
Reported: 2007-05-21 16:30 UTC by Brad Hinson
Modified: 2018-10-19 18:35 UTC (History)
4 users (show)

Fixed In Version: RHBA-2007-0835
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-05-18 20:29:54 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Add nash support for kernel args with spaces enclosed in quotes (780 bytes, patch)
2007-05-21 16:33 UTC, Brad Hinson
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2007:0835 normal SHIPPED_LIVE mkinitrd bug fix update 2007-11-14 21:03:50 UTC
Red Hat Product Errata RHBA-2009:1008 normal SHIPPED_LIVE mkinitrd bug fix update 2009-05-18 14:10:55 UTC

Description Brad Hinson 2007-05-21 16:30:06 UTC
Description of problem:
The kernel is started with the command line:
 root=/dev/dasda1 selinux=0 vmhalt="CPU 0 CMD IPL CMS"

The kernel starts the init process from the initrd (which is nash) with the
following arguments / environment:
 argv[0] = /bin/bash
 argv[1] = /init
 envp[0] = HOME=/
 envp[1] = TERM=linux
 envp[2] = BOOT_IMAGE=0

Nash then starts the "real" init process from the root filesystem with:
 argv[0] = /sbin/init
 argv[1] = /root=/dev/dasda1
 argv[2] = selinux=0
 argv[3] = vmhalt="CPU
 argv[4] = 0
 argv[5] = CMD
 argv[6] = IPL
 argv[7] = CMS
 argv[8] = BOOT_IMAGE=0
 envp[0] = HOME=/
 envp[1] = TERM=linux
 envp[2] = BOOT_IMAGE=0
The vmhalt= parameter has been split into several elements. The "0" in argv[4]
is interpreted by init as the new run level. Run level 0 shuts down the system.


Version-Release number of selected component (if applicable):
mkinitrd-4.2.1.8


How reproducible:
Always.  Boot with kernel parmeter in the form vmhalt="something with a zero"
 
Actual results:
Since arguments aren't grouped due to spaces, zero is interpreted as runlevel
and system shuts down.


Additional info:
Originally reported on s/390, but affects all arches.

Comment 1 Brad Hinson 2007-05-21 16:33:10 UTC
Created attachment 155109 [details]
Add nash support for kernel args with spaces enclosed in quotes

Comment 3 RHEL Product and Program Management 2007-05-21 16:44:35 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 8 Peter Jones 2007-09-25 21:18:12 UTC
Fixed in mkinitrd-4.2.1.13-2 .

Comment 12 errata-xmlrpc 2007-11-15 16:11:39 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 the 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/RHBA-2007-0835.html


Comment 14 Issue Tracker 2007-12-03 19:06:39 UTC
Looking at bugzilla 240777 I don't see the attached patch in
mkinitrd-4.2.1.13-1.src.rpm, which is what is referenced in
RHBA-2007:0835-5.  Bug 240777 actually says it'll be fixed in 4.2.1.13-2,
which I don't see on RHN.

Did this one get missed?


This event sent from IssueTracker by bhinson 
 issue 120779

Comment 15 Issue Tracker 2007-12-03 19:07:19 UTC
SEG;
    IBM's last posting says it all; mkinitrd-4.2.1.13-2* should have made
it in to 4.6 but apparently didn't; mkinitrd-4.2.1.13-1* are the packages
on engarchive


Internal Status set to 'Waiting on SEG'

This event sent from IssueTracker by bhinson 
 issue 120779

Comment 18 RHEL Product and Program Management 2008-09-05 17:12:53 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 20 Joel Andres Granados 2009-01-07 14:44:49 UTC
The package has been rebuilt and has the patch in the new build.

Comment 25 errata-xmlrpc 2009-05-18 20:29:54 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/RHBA-2009-1008.html


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