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

[Xen-changelog] [xen master] x86: fix early boot command line parsing



commit dc37e0bfffc673f4bdce1d69ad86098bfb0ab531
Author:     Daniel Kiper <daniel.kiper@xxxxxxxxxx>
AuthorDate: Wed Dec 4 13:26:37 2013 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Wed Dec 4 13:26:37 2013 +0100

    x86: fix early boot command line parsing
    
    There is no reliable way to encode NUL character as a character so encode
    it as a number. Read: 
http://sourceware.org/binutils/docs/as/Characters.html.
    Octal and hex encoding do not work on at least one system (GNU assembler
    version 2.22 (x86_64-linux-gnu) using BFD version (GNU Binutils for Debian) 
2.22).
    Without this fix e.g. no-real-mode option at the end of xen.gz command line
    is not detected.
    
    Signed-off-by: Daniel Kiper <daniel.kiper@xxxxxxxxxx>
    Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Acked-by: Keir Fraser <keir@xxxxxxx>
---
 xen/arch/x86/boot/cmdline.S |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/xen/arch/x86/boot/cmdline.S b/xen/arch/x86/boot/cmdline.S
index 05ffb94..e1f4595 100644
--- a/xen/arch/x86/boot/cmdline.S
+++ b/xen/arch/x86/boot/cmdline.S
@@ -138,7 +138,8 @@
         call    .Lstrlen
         add     $4,%esp
         xadd    %eax,%ebx
-        cmpb    $'\0',(%ebx)
+        /* NUL check (as $'\0' == 0x30 in GAS) */
+        cmpb    $0,(%ebx)
         je      3f
         cmpb    $' ',(%ebx)
         je      3f
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
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®.