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] Use VDSO interface for gettimeofday on aarch64


On Wed, 2018-05-16 at 11:44 +0100, Szabolcs Nagy wrote:
> On 16/05/18 00:07, Steve Ellcey wrote:
> > 
> > There do seem to be places where libc calls gettimeofday
> > (nis/nis_call.c,
> > login/logwtmp.c, resolv/gai_suspend.c, others).  Most of them call
> > __gettimeofday but some just call gettimeofday.  I am not sure what
> > if anything needs to be done with these calls, they don't seem to
> > have changed when x86 or powerpc made their gettimeofday/vdso
> > changes..
> > 
> What i wanted to know/document is that internal libc.so
> calls don't go via the ifunc resolver, but call the
> vsyscall and this is the only reason why it should remain
> a vsyscall instead of a syscall as far as i can see
> (otherwise if ifunc already checked the vdso then there
> would be no point doing that in vsyscall too)
> 
> The other thing that would be nice to document is that
> why this change is safe for gettimeofday but not clock_gettime.
> (former does not have to set errno other than EFAULT but that
> case never works with vdso anyway, so the gettimeofday vdso
> function is a complete implementation, while clock_gettime
> has to deal with errno after the vdso call)

Szabolcs,

I am having trouble figuring out how to document these issues.  The
problem is that I don't understand the details of the
syscall/vsyscall/vdso interfaces well enough to add intelligent
comments to the code that would address your comments.

Any chance you could add the comments that you think are needed and
check the patch in?  It seems like you and Adhemerval are both happy
with the code, it is just the comments (and the test if you want to use
the nanosleep test instead of adding the new ones) that need fixing.

Steve Ellcey
sellcey@cavium.com


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