WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

RE: [Xen-devel] crash in page_list_* macro

To: Jan Beulich <jbeulich@xxxxxxxxxx>, Keir Fraser <keir.fraser@xxxxxxxxxxxxx>, "Xen-Devel (E-mail)" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] crash in page_list_* macro
From: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>
Date: Fri, 13 Feb 2009 00:12:01 +0000 (GMT)
Cc:
Delivery-date: Thu, 12 Feb 2009 16:13:24 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4993F5E6.76E4.0078.0@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thanks for the replies.

It seems it's not a good idea to put a page into a page_list
when it's already there (among thousands of other list
entries). :-} :-}  That resulted in all sorts of
interesting symptoms!  Took me all day to track down my
problem, but I think I nailed it.

Dan

> > Is the memory where the list header is stored overloaded and
> > sometimes overwritten for other purposes?  Note all pages
> > on my page_list have been gotten via pi=alloc_domheap_pages(0,0,0).
> > Next I use va=page_to_virt(pi), use the page for awhile,
> > use pi=virt_to_page(va) and put it on the page_list, then
> > later when I page_list_remove_head(my_page_list), the
> > list pointers are apparently corrupt.
> 
> So long as you allocate anonymous domheap memory, or xenheap 
> memory, the
> page_list fields should belong to you. The list structure is 
> pretty simple
> and I can't see anything wrong with the macros. An empty list 
> is noted by
> NULL head/tail pointers, otherwise point at head/tail pages 
> within which
> next/prev pointers are 32-bit MFNs. The head and tail pages 
> do not point at
> the page_list_head but instead contain ~0 sentinel next/prev 
> link values.
> 
>  -- Keir

> >>> Dan Magenheimer <dan.magenheimer@xxxxxxxxxx> 12.02.09 04:42 >>>
> >Is the memory where the list header is stored overloaded and
> >sometimes overwritten for other purposes?  Note all pages
> 
> The list headers are not overloaded in any way. The list 
> entries do have
> an overlay union field, used only by shadow code (so your code would
> need to make use of it explicitly, which I doubt).
> 
> So according to your description of how you use the page I 
> can't see any
> potential for corruption.
> 
> Jan

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>