This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] glibc vDSO bits for ppc/ppc64 update


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 â


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]