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-devel

[Xen-devel] [PATCH] x86: fix early option scanning

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] x86: fix early option scanning
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Tue, 19 Jun 2007 11:38:51 +0200
Delivery-date: Tue, 19 Jun 2007 02:36:16 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Make sure command lines like
... vgaxyz vga=
... console=vga vga=
mistakenly ignore the vga= option due to finding 'vga' earlier on the line.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

Index: 2007-06-18/xen/arch/x86/boot/cmdline.S
===================================================================
--- 2007-06-18.orig/xen/arch/x86/boot/cmdline.S 2007-06-15 14:05:46.000000000 
+0200
+++ 2007-06-18/xen/arch/x86/boot/cmdline.S      2007-06-18 14:40:13.000000000 
+0200
@@ -119,9 +119,11 @@
         ret
 
 .Lfind_option:
+        mov     4(%esp),%eax
         push    %ebx
-        push    4+8(%esp)
-        push    4+8(%esp)
+0:
+        pushl   4+8(%esp)
+        push    %eax
         call    .Lstrstr
         add     $8,%esp
         test    %eax,%eax
@@ -129,20 +131,20 @@
         cmp     %eax,4+4(%esp)
         je      1f
         cmpb    $' ',-1(%eax)
-        jne     2f
+        je      1f
+2:      inc     %eax
+        jmp     0b
 1:      mov     %eax,%ebx
-        push    4+8(%esp)
+        pushl   4+8(%esp)
         call    .Lstrlen
         add     $4,%esp
-        xchg    %eax,%ebx
-        add     %eax,%ebx
+        xadd    %eax,%ebx
         cmpb    $'\0',(%ebx)
         je      3f
         cmpb    $' ',(%ebx)
         je      3f
         cmpb    $'=',(%ebx)
-        je      3f
-2:      xor     %eax,%eax
+        jne     2b
 3:      pop     %ebx
         ret
 




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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] x86: fix early option scanning, Jan Beulich <=