xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xen/arch/x86: Fix early boot command line parsing
@ 2013-12-02 19:15 Daniel Kiper
  2013-12-03  2:14 ` Andrew Cooper
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Kiper @ 2013-12-02 19:15 UTC (permalink / raw)
  To: jbeulich, keir, xen-devel; +Cc: Daniel Kiper

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 does not work on at least my 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. Additionally, encode other characters accordingly to
the gas documentation.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
---
 xen/arch/x86/boot/cmdline.S |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/xen/arch/x86/boot/cmdline.S b/xen/arch/x86/boot/cmdline.S
index 05ffb94..4ea56b3 100644
--- a/xen/arch/x86/boot/cmdline.S
+++ b/xen/arch/x86/boot/cmdline.S
@@ -138,11 +138,11 @@
         call    .Lstrlen
         add     $4,%esp
         xadd    %eax,%ebx
-        cmpb    $'\0',(%ebx)
+        cmpb    $0,(%ebx)
         je      3f
-        cmpb    $' ',(%ebx)
+        cmpb    $' ,(%ebx)
         je      3f
-        cmpb    $'=',(%ebx)
+        cmpb    $'=,(%ebx)
         jne     1b
 3:      pop     %ebx
         ret
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-12-03 10:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-02 19:15 [PATCH] xen/arch/x86: Fix early boot command line parsing Daniel Kiper
2013-12-03  2:14 ` Andrew Cooper
2013-12-03 10:34   ` Jan Beulich
2013-12-03 10:47     ` Andrew Cooper
2013-12-03 10:59   ` Daniel Kiper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).