Re: vDSO for ppc64 : Preliminary release #3

From: Benjamin Herrenschmidt
Date: Thu Sep 09 2004 - 07:05:17 EST


On Thu, 2004-09-09 at 21:22, Paul Mackerras wrote:
> Jakub Jelinek writes:
>
> > That is on purpose, even if vDSO location is randomized (e.g. on IA-32),
> > no relocations should happen, so that the vDSO can be shared (unless
> > written into by the debugger, that is). ld.so knows how to deal with
> > .dynamic section relocation of vDSOs.
>
> On 64-bit architectures which use procedure descriptors, the
> descriptors will have to be relocated (unless you or Alan can come up
> with some toolchain or ld.so magic or something). But the descriptors
> are in the data section rather than the text, of course.

In the case of the ppc vDSO, there is no .data section, the descriptors
are in the .opd section along with the .text, but that isn't a problem.
That means that 1 page of vDSO text will be COW'ed for the few apps that
request a different address (again, unless we want randomizing). The
vDSO also has a special data page that _has_ to be shared, but it's
separate and doesn't overlap the actual .so pages so it shouldn't be
affected by a possible relocation.

Of course, unless somebody comes up with a clever trick to avoid those
altogether...

Ben.


-
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/