Re: [RFC, PATCH] Fixup COMPAT_VDSO to work with CONFIG_PARAVIRT

From: Zachary Amsden
Date: Fri Mar 16 2007 - 15:38:31 EST


Eric W. Biederman wrote:
I'm not quite familiar with the context. And I'm to lazy to look right now.
What is the difference with COMPAT_VDSO that it doesn't do relocation?
What are we preserving?

COMPAT_VDSO causes the link address to be fixed at compile time to match the virtual address of the VDSO. !COMPAT_VDSO just links at zero.

The practical question here is if we already have all of the relocation logic
for the VDSO why do we need to add more?

There wasn't relocation logic before, the VDSO just got remapped to a different virtual address without any relocation at all. Which is safe, because it is all hand-coded assembly, relocatable code. But not complete, since the ELF headers don't have any fixup applied for the relocation, and there are broken linkers which look at the ELF headers and assert fail if ph->p_vaddr != _rtld_local._dl_sysinfo_dso; these broken dynamic linkers are what COMPAT_VDSO is protecting.

I'm tempted to rant on the pure insanity of address space randomization but
that is a whole other issue...

Firesticks in ant nests is all I'm saying about that.

Zach
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/