This is the mail archive of the glibc-bugs@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]

[Bug libc/12813] New: Linux x86_64: glibc should prefer the vDSO over vsyscalls


http://sourceware.org/bugzilla/show_bug.cgi?id=12813

           Summary: Linux x86_64: glibc should prefer the vDSO over
                    vsyscalls
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper.fsp@gmail.com
        ReportedBy: luto@mit.edu


As of right now, all functionality in the vsyscall page is available through
the vDSO on x86_64.  The missing function was time(), but that landed here:

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f144a6b4d1688675d88990e29567b2335b48205e

and is faster than the vsyscall version because of

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=973aa8181e10050809b56ecbaadd01495766a19e

Currently (AFAICT), glibc will use the gettimeofday vsyscall in static builds
due to:

#ifdef SHARED
        movq    __vdso_gettimeofday(%rip), %rax
        PTR_DEMANGLE (%rax)
#else
        movq    $VSYSCALL_ADDR_vgettimeofday, %rax
#endif

and will unconditionally use the vsyscall versions of time and getcpu.


It would be nice to kill off the vsyscall page entirely and replace it with
some kind of emulation layer that keeps old code working (with a performance
penalty) but doesn't leave a syscall instruction sitting at a fixed address.

Before doing that, glibc should stop using it in new code, at least on kernels
that have a vDSO.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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