From: Necrosoft <necrosoft82@alice.it>
To: xen-devel@lists.xensource.com
Subject: Re: Question about xc_ptrace and PV domU process memory map.
Date: Tue, 13 Nov 2007 14:49:53 +0100 [thread overview]
Message-ID: <4739AB81.6040909@alice.it> (raw)
In-Reply-To: <E1Irddm-0003Bk-Us@host-192-168-0-1-bcn-london>
>You mean xc_ptrace ? I think these functions are designed only to be
>used following PTRACE_ATTACH. PTRACE_ATTACH will pause the target
>domain, which may not be what you want.
>
yes xc_ptrace. Can be ok pause the domU.
>
>http://xenaccess.sourceforge.net/ may be more what you want. (I have
>no knowledge of whether XenAccess is any good - I just saw the link
>from wiki.xensource.com.)
>
I look this...the portions of code about mapping virt. address seem
quite similar...
>
>If you want to use libxc you will have to put up with pausing the
>domain, or do some work on the races which result from allowing it to
>run: by my reading of the code it's not correct to arrange to skip the
>pause, or unpause the domain after PTRACE_ATTACH, because
>xc_ptrace.c:map_domain_va assumes that the domain does not allocate
>additional pages between its calls to xc_get_tot_pages and
>xc_get_pfn_list.
>
So yes, in this week I look better the code and in effect fails for
incorrect current_domid. Now I did another test:
1. Run in domU a test program, I take a virtual address (for example in
hex format). This program enter in active waiting and so I pause the
domain. cr3, now, is relative to PGD for this program.
2. Now I call map_dom_va passing the virtual address described above.
This function call map_dom_va_32 but this fails at l2e entry retrieve.
In particular is verified the guard:
if( !(l2e & _PAGE_PRESENT) ) { return NULL; }
So l2e is 0, while l2 is a valid address mapped with
xc_map_foreign_range. Can you suggest some ideas concerning this type of
failure?
Thanks
Best Regards
next parent reply other threads:[~2007-11-13 13:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1Irddm-0003Bk-Us@host-192-168-0-1-bcn-london>
2007-11-13 13:49 ` Necrosoft [this message]
2007-11-09 23:09 Question about xc_ptrace and PV domU process memory map Necrosoft
2007-11-12 15:59 ` Ian Jackson
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=4739AB81.6040909@alice.it \
--to=necrosoft82@alice.it \
--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.