From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH] fix segfault in xl migrate --debug Date: Fri, 28 Nov 2014 12:09:41 +0000 Message-ID: <1417176581.23604.25.camel@citrix.com> References: <547643C8.5000806@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <547643C8.5000806@citrix.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: Andrew Cooper , Konrad Rzeszutek Wilk Cc: Ian Jackson , xen-devel@lists.xen.org, Wei Liu , Stefano Stabellini , M A Young List-Id: xen-devel@lists.xenproject.org On Wed, 2014-11-26 at 21:19 +0000, Andrew Cooper wrote: > On 26/11/2014 19:54, M A Young wrote: > > > If differences are found during the verification phase of xl migrate > > --debug then it is likely to crash with a segfault because the > > bogus > > pagebuf->pfn_types[pfn] is used in a print statement instead of > > pfn_type[pfn] . > > > > Signed-off-by: Michael Young > > > > > > > > Reviewed-by: Andrew Cooper Acked-by: Ian Campbell Needs a release ack if this is to be for 4.5, Konrad CCd. On the one hand this fixes an issue which is only present if you enable debug/verify mode, so it's not that critical. On the other hand it only touches code which is used if you enable debug/verify mode, so it's not that risky. I'm inclined towards the apply it for 4.5 end of the scale... > > > xl migrate --debug can segfault because pagebuf->pfn_types[pfn] is > > used in a print statement instead of pfn_type[pfn] > > > > --- xen-4.5.0-rc1/tools/libxc/xc_domain_restore.c.orig 2014-10-24 15:22:40.000000000 +0100 > > +++ xen-4.5.0-rc1/tools/libxc/xc_domain_restore.c 2014-11-25 21:01:16.604081467 +0000 > > @@ -1404,7 +1404,7 @@ > > int v; > > > > DPRINTF("************** pfn=%lx type=%lx gotcs=%08lx " > > - "actualcs=%08lx\n", pfn, pagebuf->pfn_types[pfn], > > + "actualcs=%08lx\n", pfn, pfn_type[pfn], > > csum_page(region_base + i * PAGE_SIZE), > > csum_page(buf)); > > >