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

Re: [Xen-devel] [PATCH 5/8] kexec: extend hypercall with improved load/unload ops



>>> On 17.04.13 at 12:11, David Vrabel <david.vrabel@xxxxxxxxxx> wrote:
> On 17/04/13 09:55, Jan Beulich wrote:
>>>>> On 16.04.13 at 19:13, David Vrabel <david.vrabel@xxxxxxxxxx> wrote:
>>> -static int kexec_exec(XEN_GUEST_HANDLE_PARAM(void) uarg)
>>> +static int kexec_load(XEN_GUEST_HANDLE_PARAM(void) uarg)
>>>  {
>>> -    xen_kexec_exec_t exec;
>>> -    xen_kexec_image_t *image;
>>> -    int base, bit, pos, ret = -EINVAL;
>>> +    xen_kexec_load_t load;
>>> +    xen_kexec_segment_t *segments;
>>> +    struct kexec_image *kimage = NULL;
>>> +    int ret;
>>>  
>>> -    if ( unlikely(copy_from_guest(&exec, uarg, 1)) )
>>> +    if ( copy_from_guest(&load, uarg, 1) )
>>>          return -EFAULT;
>>>  
>>> -    if ( kexec_load_get_bits(exec.type, &base, &bit) )
>>> +    if ( load.nr_segments >= KEXEC_SEGMENT_MAX )
>>>          return -EINVAL;
>> 
>> Especially since you named the padding field _rsvd, you ought
>> to verify it to be zero somewhere here. Or if you're really sure
>> that nobody will ever want to make use of the field, name it
>> _pad instead.
> 
> 8 bits isn't likely to be useful and the interface can always be
> extended by adding a new sub-ob.  I'll rename it to _pad.
> 
> Do you want to put your acked-by on this patch (with this change) or on
> any of the other patches?

No, I didn't look at this closely enough to do so.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.