Back to home page

OSCL-LXR

 
 

    


0001 What:           vDSO
0002 Date:           July 2011
0003 KernelVersion:  3.0
0004 Contact:        Andy Lutomirski <luto@kernel.org>
0005 Description:
0006 
0007 On some architectures, when the kernel loads any userspace program it
0008 maps an ELF DSO into that program's address space.  This DSO is called
0009 the vDSO and it often contains useful and highly-optimized alternatives
0010 to real syscalls.
0011 
0012 These functions are called just like ordinary C function according to
0013 your platform's ABI.  Call them from a sensible context.  (For example,
0014 if you set CS on x86 to something strange, the vDSO functions are
0015 within their rights to crash.)  In addition, if you pass a bad
0016 pointer to a vDSO function, you might get SIGSEGV instead of -EFAULT.
0017 
0018 To find the DSO, parse the auxiliary vector passed to the program's
0019 entry point.  The AT_SYSINFO_EHDR entry will point to the vDSO.
0020 
0021 The vDSO uses symbol versioning; whenever you request a symbol from the
0022 vDSO, specify the version you are expecting.
0023 
0024 Programs that dynamically link to glibc will use the vDSO automatically.
0025 Otherwise, you can use the reference parser in
0026 tools/testing/selftests/vDSO/parse_vdso.c.
0027 
0028 Unless otherwise noted, the set of symbols with any given version and the
0029 ABI of those symbols is considered stable.  It may vary across architectures,
0030 though.
0031 
0032 Note:
0033  As of this writing, this ABI documentation as been confirmed for x86_64.
0034  The maintainers of the other vDSO-using architectures should confirm
0035  that it is correct for their architecture.