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

Re: [Xen-devel] [PATCH v3] x86/HVM: add padding to struct hvm_hw_cpu



El 19/01/16 a les 16.13, Jan Beulich ha escrit:
>>>> On 18.01.16 at 17:25, <roger.pau@xxxxxxxxxx> wrote:
>> --- a/xen/arch/x86/hvm/hvm.c
>> +++ b/xen/arch/x86/hvm/hvm.c
>> @@ -1990,6 +1990,9 @@ static int hvm_load_cpu_ctxt(struct domain *d, 
>> hvm_domain_context_t *h)
>>      if ( hvm_load_entry_zeroextend(CPU, h, &ctxt) != 0 )
>>          return -EINVAL;
>>  
>> +    if ( ctxt.pad0 != 0 )
>> +        return -EINVAL;
> 
> Right after I had committed and pushed the patch it occurred to
> me that this seems to be missing a save side counterpart, which
> would constitute both an information leak and a functional bug.
> Would you please take another look?

Sure, thanks for realising! Now that you make me look at it
hvm_save_cpu_ctxt should zero hvm_hw_cpu on each iteration, IMHO the
current code is asking for trouble. I will send a patch ASAP.

Roger.


_______________________________________________
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®.