Re: [RFC][PATCH] linux-2.6.2-rc2_vsyscall-gtod_B1.patch

Ulrich Drepper
2004-01-30T00:40:53Z

john stultz wrote:

> Another issue with having a separate entry point for vgettimeofday is
> that I don't quite understand how glibc detects if vsyscall is
> available, and how deals with the vsyscall page moving around.

Well, this is indeed a problem which needs an addition solution. If
we'd look for the symbol, it's automatically handled. Likewise if the
normal syscall handler does it magically.

If a call to the magic address is needed we'd need from kind of version
information in the vDSO to check for the existence of the extension.
This check needs to be done for every call unless a new-enough kernel is
assumed outright. One could add a functions to the vDSO which is called
via the symbol table and which returns the necessary information to make
the decision. The result would have to be stored in a local variable to
avoid making that call over and over again. This all requires the PIC
setup which makes the whole thing once again more expensive than the
simple implicit table lookup.

--
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖