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

[Xen-devel] Re: Question about xc_ptrace and PV domU process memory map.

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Re: Question about xc_ptrace and PV domU process memory map.
From: Necrosoft <necrosoft82@xxxxxxxx>
Date: Tue, 13 Nov 2007 14:49:53 +0100
Delivery-date: Tue, 13 Nov 2007 05:47:33 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <E1Irddm-0003Bk-Us@host-192-168-0-1-bcn-london>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <E1Irddm-0003Bk-Us@host-192-168-0-1-bcn-london>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.13) Gecko/20060427 Debian/1.7.13-0ubuntu04.10

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

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] Re: Question about xc_ptrace and PV domU process memory map., Necrosoft <=