From: Roger Pau Monne Date: Thu, 31 Oct 2019 11:58:29 +0000 (+0100) Subject: x86/shim: copy back the result of EVTCHNOP_status X-Git-Tag: archive/raspbian/4.14.0+80-gd101b417b7-1+rpi1^2~63^2~1222 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=0f45bbbc404e2d1257476f9caa6644c209ec2c90;p=xen.git 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é Reviewed-by: Wei Liu Release-acked-by: Juergen Gross --- 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; }