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] is_loadable_phdr

Hi,

I'm attempting to boot the latest mainline kernel patched with PaX. The PaX 
patch marks some segments as read-only (R--) which is resulting in these 
segments not being loaded due to is_loadable_phdr returning zero for read-only 
segments:

int elf_phdr_is_loadable(struct elf_binary *elf, const elf_phdr * phdr)
{
        uint64_t p_type = elf_uval(elf, phdr, p_type);
        uint64_t p_flags = elf_uval(elf, phdr, p_flags);

        return ((p_type == PT_LOAD) && (p_flags & (PF_W | PF_X)) != 0);
}

I'm trying to get an understanding of why a segment has to be writeable or 
executable for xen to load it. Does anyone know why this is so?

Also, is it likely that this behaviour could be changed? My understanding is 
that it's perfectly valid to have an ELF kernel with read-only segments in it. 
Attempting to use an image with a read-only segment leads to the kernel failing 
to boot with weird and hard to debug crashes.

Cheers,

Brad

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>