This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] glibc vDSO bits for ppc/ppc64 update
- From: Ulrich Drepper <drepper at redhat dot com>
- To: Tom Gall <tom_gall at vnet dot ibm dot com>
- Cc: libc-alpha at sources dot redhat dot com, benh at kernel dot crashing dot org
- Date: Tue, 15 Nov 2005 23:38:46 -0800
- Subject: Re: [PATCH] glibc vDSO bits for ppc/ppc64 update
- References: <Pine.LNX.4.64.0511111555580.6838@triton>
Tom Gall wrote:
Enclosed is the next revision of the glibc vDSO implementation for
ppc/ppc64 that goes hand in hand with benh's vDSO kernel work currently
available at http://gate.crashing.org/~benh/ppc64-vdso-update.diff.
I assume benh already told you what is wrong with the patch. You cannot
just call the vdso functions. They work like syscalls, especially with
the most recent kernels. They return error values and set the bit in
cr0 on error. You need to define some asm macro like INTERNAL_SYSCALL.
Ideally with the same interface. Then handle the error case
appropriate (again, same macros as for INTERNAL_SYSCALL).
The SYSCALL_GETRES_MONOTONIC has a stray #ifdef.
About the name lookup in the vdso. You use the traditional lookup which
of course works. But since the vdso symbol table only contains
definitions which are actually used it would be faster to just iterate
over the symbol table and determine whether the symbol is used or not.
Furthermore, the symbols in the vdso are versioned, right? So use the
version name in the lookup. We know at each time which version we want.
This needs to be hardcoded.
There is no user of _dl_vdso_sym and _dl_vdso_vsym. Scratch the
definitions.
There are still plenty of formatting bugs. Missing white spaces etc.
Unnecessary { }.
use __builtin_expect for error cases.
--
â Ulrich Drepper â Red Hat, Inc. â 444 Castro St â Mountain View, CA â