[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] libelf: make elf_phdr_is_loadable load read-only segments.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1264749272 0
# Node ID 2bc69db28153e8da148cda58b1a6c5ddd23ca8b2
# Parent  8dcedf17b5b4ffbbd50c19dabd3b221f6d58be89
libelf: make elf_phdr_is_loadable load read-only segments.

From: Brad Plant <bplant@xxxxxxxxxxxx>
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/common/libelf/libelf-tools.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -r 8dcedf17b5b4 -r 2bc69db28153 xen/common/libelf/libelf-tools.c
--- a/xen/common/libelf/libelf-tools.c  Fri Jan 29 07:10:28 2010 +0000
+++ b/xen/common/libelf/libelf-tools.c  Fri Jan 29 07:14:32 2010 +0000
@@ -235,7 +235,7 @@ int elf_phdr_is_loadable(struct elf_bina
     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);
+    return ((p_type == PT_LOAD) && (p_flags & (PF_R | PF_W | PF_X)) != 0);
 }
 
 /*

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.