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] Unable to bring up Mini-OS on x86_64

To: "Keir Fraser" <Keir.Fraser@xxxxxxxxxxxx>
Subject: RE: [Xen-devel] Unable to bring up Mini-OS on x86_64
From: "Puthiyaparambil, Aravindh" <aravindh.puthiyaparambil@xxxxxxxxxx>
Date: Wed, 17 May 2006 14:49:46 -0400
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 17 May 2006 11:50:51 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcZ5KhHAFtQN0QilSdy7t1hqvVHmXwAsQPFQ
Thread-topic: [Xen-devel] Unable to bring up Mini-OS on x86_64
> Whatever the problem is, it'd be good to fix whatever bug this is
> triggering in the builder as well as fixing mini-os (although maybe
the
> bug is solely in the builder). It shouldn't be possible for bogus
> kernel images to kill xend, although I'm sure xc_linux_build() has
> various holes in this respect. It'd be nice to fix them as we find
them
> though.

Ok, I have found the bug. Mini-OS does not define VIRT_BASE in its
__xen_guest section. This causes dsi->elf_paddr_offset in
parseelfimage() [xc_load_elf.c] to be set to 0. This in turn causes
parray[pa>>PAGE_SHIFT] in loadelfimage[xc_load_elf.c] to go out of
bounds causing a segmentation fault.

This can also happen when an OS elfimage has VIRT_BASE or
ELF_PADDR_OFFSET set to 0. 

The case where VIRT_BASE is set correctly and ELF_PADDR_OFFSET is 0 has
been taken care of.

The fix here is to always ensure that VIRT_BASE is always defined and
when defined it is not set to 0 i.e. always ensure that virt_base
variable in parseelfimage() [xc_load_elf.c] is not 0. 

I will send in a patch for this.

Thanks,
Aravindh

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

<Prev in Thread] Current Thread [Next in Thread>