[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 4/5] xen/memory: Fix acquire_resource size semantics
On 31/07/2020 15:44, Jan Beulich wrote: > On 28.07.2020 13:37, Andrew Cooper wrote: >> @@ -1026,19 +1047,6 @@ static int acquire_resource( >> if ( xmar.pad != 0 ) >> return -EINVAL; >> >> - if ( guest_handle_is_null(xmar.frame_list) ) >> - { >> - if ( xmar.nr_frames ) >> - return -EINVAL; >> - >> - xmar.nr_frames = ARRAY_SIZE(mfn_list); >> - >> - if ( __copy_field_to_guest(arg, &xmar, nr_frames) ) >> - return -EFAULT; >> - >> - return 0; >> - } >> - >> if ( xmar.nr_frames > ARRAY_SIZE(mfn_list) ) >> return -E2BIG; > While arguably minor, the error code in the null-handle case > would imo better be the same, no matter how big xmar.nr_frames > is. This clause doesn't survive the fixes to batching. Given how broken this infrastructure is, I'm not concerned with transient differences in error codes for users which will ultimately fail anyway. ~Andrew
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |