WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ppc-devel

[Fwd: Re: [XenPPC] [PATCH] Parse Xen command line properly]

To: xen-ppc-devel <xen-ppc-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Fwd: Re: [XenPPC] [PATCH] Parse Xen command line properly]
From: Maria Butrico <butrico@xxxxxxxxxxxxxx>
Date: Mon, 02 Oct 2006 06:36:55 -0400
Delivery-date: Mon, 02 Oct 2006 03:38:06 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ppc-devel-request@lists.xensource.com?subject=help>
List-id: Xen PPC development <xen-ppc-devel.lists.xensource.com>
List-post: <mailto:xen-ppc-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=unsubscribe>
Reply-to: butrico@xxxxxxxxxxxxxx
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.7 (Windows/20060909)

--- Begin Message ---
To: Amos Waterland <apw@xxxxxxxxxx>
Subject: Re: [XenPPC] [PATCH] Parse Xen command line properly
From: Maria Butrico <butrico@xxxxxxxxxxxxx>
Date: Mon, 02 Oct 2006 06:33:46 -0400
In-reply-to: <20061002042347.GA27054@xxxxxxxxxxxxxxxxxxxxx>
References: <20061002042347.GA27054@xxxxxxxxxxxxxxxxxxxxx>
Reply-to: butrico@xxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.7 (Windows/20060909)
A long overdue comment about the size of the buffer buff and the size of the buffer bootargs also 256 bytes in boot_of.c. With the long file name for our nfs roots, combined with long names for our initialization scripts, I have actually gotten over the limit. Naturally this occurred just shortly before an important deadline. My current command line, for linux only, is 208 characters.
Amos Waterland wrote:
We are improperly feeding the entire boot parameter string to Xen's
generic command line parser.  This can have unexpected results when one
of the dom0 parameters, such as console=X, has meaning to the Xen
parser.  First reported by Maria Butrico.

Signed-off-by: Amos Waterland <apw@xxxxxxxxxx>

---

 setup.c |   16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff -r 261c458e46af xen/arch/powerpc/setup.c
--- a/xen/arch/powerpc/setup.c  Fri Sep 29 18:13:27 2006 -0400
+++ b/xen/arch/powerpc/setup.c  Mon Oct 02 00:17:07 2006 -0400
@@ -279,8 +279,20 @@ static void __init __start_xen(multiboot
     ticks_per_usec = timebase_freq / 1000000ULL;
/* Parse the command-line options. */
-    if ((mbi->flags & MBI_CMDLINE) && (mbi->cmdline != 0))
-        cmdline_parse(__va((ulong)mbi->cmdline));
+    if ((mbi->flags & MBI_CMDLINE) && (mbi->cmdline != 0)) {
+        char *end, *src = (char *)(ulong)mbi->cmdline;
+        char buff[256];
+
+        end = strstr(src, "--");
+
+        if (end && (end - src < sizeof(buff))) {
+            strlcpy(buff, src, end - src);
+        } else {
+            strlcpy(buff, src, sizeof(buff));
+        }
+
+        cmdline_parse(buff);
+    }
/* We initialise the serial devices very early so we can get debugging. */
     ns16550.io_base = 0x3f8;

_______________________________________________
Xen-ppc-devel mailing list
Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ppc-devel



--- End Message ---
_______________________________________________
Xen-ppc-devel mailing list
Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ppc-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Fwd: Re: [XenPPC] [PATCH] Parse Xen command line properly], Maria Butrico <=