All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Magenheimer <dan.magenheimer@oracle.com>
To: Jan Beulich <jbeulich@novell.com>,
	Keir Fraser <keir.fraser@eu.citrix.com>,
	"Xen-Devel (E-mail)" <xen-devel@lists.xensource.com>
Subject: RE: crash in page_list_* macro
Date: Fri, 13 Feb 2009 00:12:01 +0000 (GMT)	[thread overview]
Message-ID: <71368aa3-70ea-4749-a1ee-3e8d435c1d54@default> (raw)
In-Reply-To: <4993F5E6.76E4.0078.0@novell.com>

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@oracle.com> 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

      reply	other threads:[~2009-02-13  0:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-12  3:42 crash in page_list_* macro Dan Magenheimer
2009-02-12  8:38 ` Keir Fraser
2009-02-12  9:11 ` Jan Beulich
2009-02-13  0:12   ` Dan Magenheimer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=71368aa3-70ea-4749-a1ee-3e8d435c1d54@default \
    --to=dan.magenheimer@oracle.com \
    --cc=jbeulich@novell.com \
    --cc=keir.fraser@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.