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

[Xen-changelog] [xen stable-4.10] x86/shim: don't use 32-bit compare on boolean variable



commit da7543dd322a7a2a640543309df55b5f2143cfde
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Thu Feb 1 11:32:45 2018 +0100
Commit:     Wei Liu <wei.liu2@xxxxxxxxxx>
CommitDate: Mon Mar 5 16:01:13 2018 +0000

    x86/shim: don't use 32-bit compare on boolean variable
    
    Current upstream gas silently assumes 32-bit operand size for most
    operations where the size can't be inferred from an involved register
    (my own one doesn't anymore, which is how I've noticed this). It is pure
    luck that the 3 bytes following pvh_boot are currently padding ones.
    
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Reviewed-by: Andrew Cooper <andrew.cooper@xxxxxxxxxx>
    Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
    (cherry picked from commit 98dc9606868a807206ad0f4c3a45046d4e0e1260)
---
 xen/arch/x86/boot/head.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/boot/head.S b/xen/arch/x86/boot/head.S
index e586913b6d..ad7c376305 100644
--- a/xen/arch/x86/boot/head.S
+++ b/xen/arch/x86/boot/head.S
@@ -585,7 +585,7 @@ trampoline_setup:
         push    %eax                /* Magic number. */
         call    reloc
 #ifdef CONFIG_PVH_GUEST
-        cmp     $0, sym_fs(pvh_boot)
+        cmpb    $0, sym_fs(pvh_boot)
         je      1f
         mov     %eax, sym_fs(pvh_start_info_pa)
         jmp     2f
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.10

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

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