xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* is_loadable_phdr
@ 2010-01-28 19:55 Brad Plant
  2010-01-28 21:14 ` is_loadable_phdr Keir Fraser
  0 siblings, 1 reply; 3+ messages in thread
From: Brad Plant @ 2010-01-28 19:55 UTC (permalink / raw)
  To: xen-devel@lists.xensource.com; +Cc: pageexec


[-- Attachment #1.1: Type: text/plain, Size: 941 bytes --]

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 #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-01-28 22:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-28 19:55 is_loadable_phdr Brad Plant
2010-01-28 21:14 ` is_loadable_phdr Keir Fraser
2010-01-28 22:02   ` is_loadable_phdr Brad Plant

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).