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

Re: [Xen-devel] DomU Kernel Mapping

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>