Skip to contentSkip to conversation

x86/shim: copy back the result of EVTCHNOP_status

PATCH In review Roger Pau Monne 4 participants 6 messages Oct 31, 2019 – Nov 8, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
Cc: Juergen Gross <[email protected]>

---
 xen/arch/x86/pv/shim.c | 3 +++
 1 file changed, 3 insertions(+)
xen/arch/x86/pv/shim.c +3 -0
index 4329eaaefe..35bf3945ac 100644
@@ -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;
     }
 
Signature · 7 lines
2.23.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#4 lore raw
Quoted 8 lines · Wei Liu
Quoted 6 lines · Jürgen Groß
Quoted 4 lines · Roger Pau Monne

The event channel data was not copied back to guest memory, fix this by doing the copy.

Jan? Andrew?

Whats up? c/s 0f45bbbc40 not good enough?

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#5 lore raw
Quoted 11 lines · Andrew Cooper
Quoted 8 lines · Wei Liu
Quoted 6 lines · Jürgen Groß
Quoted 4 lines · Roger Pau Monne

The event channel data was not copied back to guest memory, fix this by doing the copy.

Jan? Andrew?

Whats up? c/s 0f45bbbc40 not good enough?

Oh, I missed that. Sorry for the noise.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel