This is the mail archive of the libc-alpha@sources.redhat.com 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] ppc64 vdso


On Fri, 2004-11-05 at 00:43 -0800, Roland McGrath wrote:
> > Let me know if it's ok to inline a 75k patch in a mail next time.
> 
> We don't want to see the kernel patches here at all.
> Just talk about what they do at user level, and post glibc patches here.

Makes sense

> > The vDSO also exports 2 more things: a map of implemented syscalls
> 
> Describe it.

Ok, here we go. The current implementation (of course, I'll be happy to change
things if you want to) is a .so exporting various functions using, currently,
the normal ABI (that is function descriptors on ppc64) with no .data nor
.bss segment. Those are (the naming is totally arbitrary and I'm ready to
change things if necessary) :

- Signal trampolines. (__v_sigtramp_rt64, __v_sigtramp_rt32, __v_sigtramp32).
I don't think glibc need to directly access those symbols, the kernel will
setup the signal return address to them, they provide the necessary cfi infos
to make the exception unwinding happy (thanks Alan Modra).

- _v_get_syscall_map(). the prototype of this is

   void *_v_get_syscall_map(unsigned int *syscall_count) ;

   returns a pointer to the syscall map. the map is agnostic to the
   size of "long", unlike kernel bitops, it stores bits from top to
   bottom so that memory actually contains a linear bitmap
   check for syscall N by testing bit (0x80000000 >> (N & 0x1f)) of
   32 bits int at N >> 5.

- _v_gettimeofday(), same prototype as gettimeofday(), that is:

   int _v_gettimeofday(struct timeval *tv, struct timezone *tz);

   Should match what the normal glibc/syscall does unless I've missed
   something. 100% userland & lock-less implementation.

- __v_get_datapage() is for internal use by the vdso (hence the 2 underscores),
   used to access the last page of the vDSO which is shared with the kernel
   and contains various things used by gettimeofday or other future routines
   that will end up in the vDSO.

Ben.



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