From: "Jan Beulich" Subject: Re: [PATCH] don't put dom0 console info directly after start_info data Date: Fri, 19 Jun 2015 13:04:36 +0100 Message-ID: <55842174020000780008703D@mail.emea.novell.com> References: <1434712013-31328-1-git-send-email-jgross@suse.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 1Z5v2D-0001cY-Rn for xen-devel@lists.xenproject.org; Fri, 19 Jun 2015 12:04:37 +0000 In-Reply-To: <1434712013-31328-1-git-send-email-jgross@suse.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Juergen Gross Cc: andrew.cooper3@citrix.com, keir@xen.org, xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org >>> On 19.06.15 at 13:06, <"jgross@suse.com".non-mime.internet> wrote: > The console information of dom0 is living in the same memory page as the > start_info data. Don't put the console data directly after the start_info > to leave some room for future structure enlargements. Otherwise a dom0 > with a newer start_info layout than the hypervisor could interprete > console data as part of the start_info data. > > Before commit 50bd1f0825339dfacde471df7664729216fc46e3 there used to be a > padding at the end of start_info, but this was removed as it was regarded > to be not necessary. Said commit removed padding from shared_info, not start_info. Nor would the suggested change be the correct one for a problem like this. Instead the kernel should check how much of the shared info structure it knows about is valid (which Dom0 can easily do using console.dom0.info_off - that is, after all, why this is being placed at a variable offset; DomU currently has no problem, as the rest of the page is zero for it). If a future extension makes it so that this can't be determined implicitly, a suitable SIF_* flag would need to be added. Jan