All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kip Macy <kip.macy@gmail.com>
To: Leendert van Doorn <leendert@watson.ibm.com>
Cc: xen-devel <xen-devel@lists.xensource.com>
Subject: Re: xc_ptrace fix
Date: Thu, 28 Apr 2005 21:24:36 -0700	[thread overview]
Message-ID: <b1fa291705042821245b90b06d@mail.gmail.com> (raw)
In-Reply-To: <20050429033018.1E44B111C@huxley.watson.ibm.com>

What you're doing could work in principle, but the page array would
have to be equal to the number of pages on the machine not the number
of "physical" pages in the guest. In the paravirtualized case you are
reading from the hardware page tables, so although the guest may only
be using 64MB its pages may reside at the edge of 4GB. The
segmentation fault I sent earlier was caused by the inevitable
indexing off the edge of the array.

Looking at the code in DOM0_GETMEMINFO:
            for ( i = 0; (i < max_pfns) && (list_ent != &d->page_list); i++ )
            {
                pfn = list_entry(list_ent, struct pfn_info, list) -
                    frame_table;
               if ( put_user(pfn, buffer) )

It only adds an entry for each page in use, which I assume means it is
just the p2m mapping of page frames.


> So it does not return an indentity map for paravirtualized guests?
> 
> Sorry about that, I'll make sure my fixes are programmed more defensive
> next time.

Thanks. 


                              -Kip

  reply	other threads:[~2005-04-29  4:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-29  3:30 xc_ptrace fix Leendert van Doorn
2005-04-29  4:24 ` Kip Macy [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-04-29  2:08 Kip Macy

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=b1fa291705042821245b90b06d@mail.gmail.com \
    --to=kip.macy@gmail.com \
    --cc=leendert@watson.ibm.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.