[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] x86: fix early option scanning



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1182347869 -3600
# Node ID 3187ffc5272cc1169e00423d9946abcc89a454d0
# Parent  168b143a1a88d254961bf08e653606b11b690b10
x86: fix early option scanning

Make sure command lines like
... vgaxyz vga=
... console=vga vga=
do not mistakenly ignore the vga= option due to finding 'vga' earlier
on the line.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 xen/arch/x86/boot/cmdline.S |   23 ++++++++++++-----------
 1 files changed, 12 insertions(+), 11 deletions(-)

diff -r 168b143a1a88 -r 3187ffc5272c xen/arch/x86/boot/cmdline.S
--- a/xen/arch/x86/boot/cmdline.S       Wed Jun 20 14:43:41 2007 +0100
+++ b/xen/arch/x86/boot/cmdline.S       Wed Jun 20 14:57:49 2007 +0100
@@ -119,30 +119,31 @@ 3:      pop     %edi
         ret
 
 .Lfind_option:
-        push    %ebx
-        push    4+8(%esp)
-        push    4+8(%esp)
+        mov     4(%esp),%eax
+        dec     %eax
+        push    %ebx
+1:      pushl   4+8(%esp)
+        inc     %eax
+        push    %eax
         call    .Lstrstr
         add     $8,%esp
         test    %eax,%eax
         jz      3f
         cmp     %eax,4+4(%esp)
-        je      1f
+        je      2f
         cmpb    $' ',-1(%eax)
-        jne     2f
-1:      mov     %eax,%ebx
-        push    4+8(%esp)
+        jne     1b
+2:      mov     %eax,%ebx
+        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     1b
 3:      pop     %ebx
         ret
 

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.