From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Subject: Re: [PATCH v3] x86/HVM: add padding to struct hvm_hw_cpu Date: Tue, 19 Jan 2016 16:21:14 +0100 Message-ID: <569E546A.7040307@citrix.com> References: <569D103702000078000C8166@prv-mh.provo.novell.com> <1453134353-79201-1-git-send-email-roger.pau@citrix.com> <569E60B102000078000C8B2C@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aLY5w-0007ao-Ii for xen-devel@lists.xenproject.org; Tue, 19 Jan 2016 15:21:20 +0000 In-Reply-To: <569E60B102000078000C8B2C@prv-mh.provo.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: Andrew Cooper , Ian Jackson , Ian Campbell , xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org El 19/01/16 a les 16.13, Jan Beulich ha escrit: >>>> On 18.01.16 at 17:25, 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.