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

[Xen-changelog] [xen stable-4.7] x86/entry: Fix passing 6th argument for compat hypercalls



commit 7e5f68befc6fc40b50d2fece228dad72f4fdfd43
Author:     Jason Andryuk <jandryuk@xxxxxxxxx>
AuthorDate: Tue Mar 20 14:49:26 2018 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Tue Mar 20 14:49:26 2018 +0100

    x86/entry: Fix passing 6th argument for compat hypercalls
    
    Commit ec05090403ef4d760fbe701e31afd0f0edc414d5 ("x86/entry: Erase guest
    GPR state on entry to Xen") zero-ed %rbp, compat arg 6, but it is not
    restored before passing to hypercalls.  We need to pass the saved compat
    arg 6 to the hypercall in r9, the 6th function argument.
    
    Signed-off-by: Jason Andryuk <jandryuk@xxxxxxxxx>
    Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
---
 xen/arch/x86/x86_64/compat/entry.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/x86_64/compat/entry.S 
b/xen/arch/x86/x86_64/compat/entry.S
index 21fa130fb9..cbd2384ceb 100644
--- a/xen/arch/x86/x86_64/compat/entry.S
+++ b/xen/arch/x86/x86_64/compat/entry.S
@@ -58,7 +58,7 @@ UNLIKELY_END(msi_check)
         xchgl %ecx,%esi              /* Arg 2, Arg 4 */
         movl  %edx,%edx              /* Arg 3        */
         movl  %edi,%r8d              /* Arg 5        */
-        movl  %ebp,%r9d              /* Arg 6        */
+        movl  UREGS_rbp(%rsp),%r9d   /* Arg 6        */
         movl  UREGS_rbx(%rsp),%edi   /* Arg 1        */
 #define SHADOW_BYTES 0  /* No on-stack shadow state */
 #endif
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.7

_______________________________________________
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®.