Skip to contentSkip to conversation

ld.so on FC7 is mmap'ing shared libraries right in over guest memory.

PATCH In review Rusty Russell 3 participants 3 messages Aug 9, 2007 – Aug 10, 2007 Documentation

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ld.so on FC7 is mmap'ing shared libraries right in over guest memory.

From: Ronald G. Minnich <[email protected]>

[ FC7 maps shared libraries very low, where the launcher maps guest's physical memory. Quick fix is to link Launcher static, real fix is for 2.6.24. ]

-static is a simple fix. I expect this problem will be more common than we like, as different distro's make different "improvements" to ld.so

Documentation/lguest/Makefile +3 -1
index 31e794e..60136d8 100644
@@ -13,7 +13,9 @@ LGUEST_GUEST_TOP := ($(CONFIG_PAGE_OFFSET) - 0x08000000)
 
 CFLAGS:=-Wall -Wmissing-declarations -Wmissing-prototypes -O3 -Wl,-T,lguest.lds
 LDLIBS:=-lz
-
+# Removing this works for some versions of ld.so (eg. Ubuntu Feisty) and
+# not others (eg. FC7).
+LDFLAGS+=-static
 all: lguest.lds lguest
 
 # The linker script on x86 is so complex the only way of creating one
#1 lore raw
Quoted 8 lines · Rusty Russell

From: Ronald G. Minnich <[email protected]>

[ FC7 maps shared libraries very low, where the launcher maps guest's physical memory. Quick fix is to link Launcher static, real fix is for 2.6.24. ]

-static is a simple fix. I expect this problem will be more common than we like, as different distro's make different "improvements" to ld.so

this description is incorrect; it's not an ld.so change that causes the low mapping.

It's a command line option to the prelink program (which is in most distributions) that makes it use the entire address space, not just the higher bits....

#2 lore raw
Quoted 11 lines · Arjan van de Ven
Quoted 8 lines · Rusty Russell

From: Ronald G. Minnich <[email protected]>

[ FC7 maps shared libraries very low, where the launcher maps guest's physical memory. Quick fix is to link Launcher static, real fix is for 2.6.24. ]

-static is a simple fix. I expect this problem will be more common than we like, as different distro's make different "improvements" to ld.so

Quoted 6 lines

this description is incorrect; it's not an ld.so change that causes the low mapping.

It's a command line option to the prelink program (which is in most distributions) that makes it use the entire address space, not just the higher bits....

oops. That'll teach me.

Thanks for the correction :-)

ron