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

[Xen-changelog] [xen master] x86emul: correct stub invocation constraints again



commit ba39e9b2108319d2b7b842781106386b8ed62fab
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Fri Apr 28 16:03:40 2017 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Fri Apr 28 16:03:40 2017 +0200

    x86emul: correct stub invocation constraints again
    
    While the hypervisor side of commit cd91ab08ea ("x86emul: correct stub
    invocation constraints") was fine, the tools side triggered a bogus
    error with old gcc (4.3 and 4.4 at least). Use a slightly less
    appropriate variant instead, proven to be good enough to not
    re-introduce the original problem: Which of the addresses is actually
    used doesn't matter much as long as the compiler can't prove that the
    two pointers don't alias one another.
    
    Reported-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Tested-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
    Release-acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 xen/arch/x86/x86_emulate/x86_emulate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c 
b/xen/arch/x86/x86_emulate/x86_emulate.c
index a695d5a..8a30715 100644
--- a/xen/arch/x86/x86_emulate/x86_emulate.c
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c
@@ -855,7 +855,7 @@ do{ asm volatile (                                          
            \
 # define invoke_stub(pre, post, constraints...)                         \
     asm volatile ( pre "\n\tcall *%[stub]\n\t" post                     \
                    : constraints, [stub] "rm" (stub.func),              \
-                     "m" (*(uint8_t(*)[MAX_INST_LEN + 1])stub.buf) )
+                     "m" (*(typeof(stub.buf) *)stub.addr) )
 #endif
 
 #define emulate_stub(dst, src...) do {                                  \
--
generated by git-patchbot for /home/xen/git/xen.git#master

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