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

xen-users

[Top] [All Lists]

Re: [Xen-devel] DomU Kernel Mapping

To: Security Initiative Team <passrete@xxxxxxxxx>
Subject: Re: [Xen-devel] DomU Kernel Mapping
From: Derek Murray <Derek.Murray@xxxxxxxxxxxx>
Date: 2007年4月18日 08:48:01 -0400
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: 2007年4月18日 05:46:58 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <865245.77795.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
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: <865245.77795.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
As Mats says, the code is in tools/libxc. When you load an ELF binary (such as a Linux kernel), the function xc_dom_elfloader.c::xc_dom_load_elf_kernel() performs the mapping and loading of the kernel. The following chain of function calls maps the memory into dom0 for loading the kernel:
xc_dom.h::xc_dom_seg_to_ptr() calls
xc_dom_core.c::xc_dom_pfn_to_ptr() calls
xc_dom_boot.c::xc_dom_boot_domU_map() calls
xc_{linux,solaris}.c::xc_map_foreign_ranges() which (for the Linux case) performs an ioctl on the privcmd device, and maps the memory into dom0 user-space using the mmu_update hypercall. A call to libelf-loader.c::elf_load_binary() copies the kernel into domU. I should add that I'm currently working on moving this code to a small, trusted domain. The goal would be to remove dom0's ability to map arbitrary memory from other guests.
Hope this helps.
Regards,
Derek Murray.
On 17 Apr 2007, at 13:53, Security Initiative Team wrote:
Where is the code that maps the kernel of a DomU into memory?
i.e, when you do a xm create <config file>
what code is called to actually map the kernel into memory?
Is it a python script or is it re-directed to Dom0 to do?
Thanks.
-Brian
Ahhh...imagining that irresistible "new car" smell?
Check out new cars at Yahoo! Autos.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
Previous by Date: RE: [Xen-users] Live Migration, ARP, MAC addresses and switches , Graham, Simon
Next by Date: RE: [Xen-users] xen version for 2.6.20 , Petersson, Mats
Previous by Thread: [Xen-devel] RE: [Xen-users] DomU Kernel Mapping , Petersson, Mats
Next by Thread: RE: [Xen-users] DomU Kernel Mapping , Petersson, Mats
Indexes: [Date] [Thread] [Top] [All Lists]

Copyright ©, Citrix Systems Inc. All rights reserved. Legal and Privacy
Citrix This site is hosted by Citrix

AltStyle によって変換されたページ (->オリジナル) /