On 22/05/18 21:25, Steve Ellcey wrote: > 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. i removed the test as it cannot really test if vdso is in use or not, i might do something with ifunc + bindnow testing separately. committed as: This patch uses an ifunc to implement gettimeofday in the shared libc. This is faster compared to the vsyscall mechanism that has to check a global pointer, demangle it and call it indirectly when the VDSO is present. Resolving the gettimeofday symbol directly to the VDSO code is safe because there are no failures that the libc has to handle by setting errno like in a generic vsyscall (the only failure when the VDSO code falls back to a syscall is EFAULT, but passing an invalid pointer is undefined behaviour so returning -EFAULT is fine). If the kernel supports the VDSO interface we use it for extern calls, otherwise the old vsyscall method is used which falls back to a syscall. The static version of gettimeofday continues to use a syscall, libc.so internal calls use the old vsyscall method. 2018-06-14 Steve Ellcey Szabolcs Nagy * sysdeps/unix/sysv/linux/aarch64/gettimeofday.c: New file.