x86/domctl: Further fix to XEN_DOMCTL_[gs]etvcpuextstate
PATCH 1/1 x86/domctl: Further fix to XEN_DOMCTL_[gs]etvcpuextstate
Do not clobber errors from certain codepaths. Clobbering of -EINVAL from failing "evc->size <= PV_XSAVE_SIZE(_xcr0_accum)" was a pre-existing bug.
However, clobbering -EINVAL/-EFAULT from the get codepath was a bug unintentionally introduced by 090ca8c1 "x86/domctl: two functional fixes to XEN_DOMCTL_[gs]etvcpuextstate".
Signed-off-by Andrew Cooper <[email protected]>
CC Jan Beulich <[email protected]>
---
The pre-posted version of 090ca8c1 also tried to fix the evc->size race condition and already had this "ret = 0" removed. I missed that hunk when stripping the fixes back, after deciding that the size race condition shouldn't be fixed.
I should really see about making some hypercall regression tests, in some copious free time...
--- xen/arch/x86/domctl.c | 2 -- 1 file changed, 2 deletions(-)
xen/arch/x86/domctl.c +0 -2
@@ -1277,8 +1277,6 @@ long arch_do_domctl(xfree (receive_buf); } - ret =0 ; - vcpuextstate_out:if ( domctl->cmd == XEN_DOMCTL_getvcpuextstate ) copyback =1 ;
Signature · 1 line
1.7.10.4