From: Ian Campbell Subject: Re: Is there an issue with turning off "scrubbing free RAM" on boot with Xen 4.1.3 Date: Mon, 11 Nov 2013 10:47:56 +0000 Message-ID: <1384166876.8909.13.camel@kazak.uk.xensource.com> References: <52559F56.3070901@mokumsolutions.com> <52567676.3010102@citrix.com> <20131110222511.GA22949@u109add4315675089e695.ant.amazon.com> <1384164875.3189.179.camel@kazak.uk.xensource.com> <5280C0730200007800101B69@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Vfp2I-0003V0-7c for xen-devel@lists.xenproject.org; Mon, 11 Nov 2013 10:48:02 +0000 In-Reply-To: <5280C0730200007800101B69@nat28.tlf.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: Roddy Rodstein , Matt Wilson , xen-devel@lists.xenproject.org, Andrew Cooper List-Id: xen-devel@lists.xenproject.org On Mon, 2013-11-11 at 10:33 +0000, Jan Beulich wrote: > >>> On 11.11.13 at 11:14, Ian Campbell wrote: > > On Sun, 2013-11-10 at 14:25 -0800, Matt Wilson wrote: > >> On Thu, Oct 10, 2013 at 10:42:14AM +0100, Andrew Cooper wrote: > >> > In the Xen model, domains are responsible for clearing any sensitive > >> > data they have out of memory before shutdown. > >> > >> This isn't strictly true. Memory is scrubbed by Xen when the domain > >> cannot do it for itself (i.e., when a domain is dying during > >> shutdown). > > > > Isn't this only when the domain is killed by the toolstack or crashes > > etc. On a graceful shutdown I thought the guest was still responsible > > for clearing any memory it cared about. > > No, the scrubbing is independent of the shutdown reason: > > /* > * Normally we expect a domain to clear pages before freeing them, if > * it cares about the secrecy of their contents. However, after a > * domain has died we assume responsibility for erasure. > */ > if ( unlikely(d->is_dying) ) > for ( i = 0; i < (1 << order); i++ ) > scrub_one_page(&pg[i]); My mistake, thanks for the correction. This does seem safer/wiser in any case... Ian.