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

[Xen-changelog] [xen staging] x86/shim: copy back the result of EVTCHNOP_status



commit 0f45bbbc404e2d1257476f9caa6644c209ec2c90
Author:     Roger Pau Monne <roger.pau@xxxxxxxxxx>
AuthorDate: Thu Oct 31 12:58:29 2019 +0100
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Fri Nov 1 10:48:04 2019 +0000

    x86/shim: copy back the result of EVTCHNOP_status
    
    The event channel data was not copied back to guest memory, fix this
    by doing the copy.
    
    Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
    Reviewed-by: Wei Liu <wl@xxxxxxx>
    Release-acked-by: Juergen Gross <jgross@xxxxxxxx>
---
 xen/arch/x86/pv/shim.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/xen/arch/x86/pv/shim.c b/xen/arch/x86/pv/shim.c
index 4329eaaefe..35bf3945ac 100644
--- a/xen/arch/x86/pv/shim.c
+++ b/xen/arch/x86/pv/shim.c
@@ -514,6 +514,9 @@ static long pv_shim_event_channel_op(int cmd, 
XEN_GUEST_HANDLE_PARAM(void) arg)
         else
             rc = xen_hypercall_event_channel_op(EVTCHNOP_status, &status);
 
+        if ( !rc && __copy_to_guest(arg, &status, 1) )
+            rc = -EFAULT;
+
         break;
     }
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging

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