vdso 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. What: vDSO
  2. Date: July 2011
  3. KernelVersion: 3.0
  4. Contact: Andy Lutomirski <luto@kernel.org>
  5. Description:
  6. On some architectures, when the kernel loads any userspace program it
  7. maps an ELF DSO into that program's address space. This DSO is called
  8. the vDSO and it often contains useful and highly-optimized alternatives
  9. to real syscalls.
  10. These functions are called according to your platform's ABI. On many
  11. platforms they are called just like ordinary C function. On other platforms
  12. (ex: powerpc) they are called with the same convention as system calls which
  13. is different from ordinary C functions. Call them from a sensible context.
  14. (For example, if you set CS on x86 to something strange, the vDSO functions are
  15. within their rights to crash.) In addition, if you pass a bad
  16. pointer to a vDSO function, you might get SIGSEGV instead of -EFAULT.
  17. To find the DSO, parse the auxiliary vector passed to the program's
  18. entry point. The AT_SYSINFO_EHDR entry will point to the vDSO.
  19. The vDSO uses symbol versioning; whenever you request a symbol from the
  20. vDSO, specify the version you are expecting.
  21. Programs that dynamically link to glibc will use the vDSO automatically.
  22. Otherwise, you can use the reference parser in
  23. tools/testing/selftests/vDSO/parse_vdso.c.
  24. Unless otherwise noted, the set of symbols with any given version and the
  25. ABI of those symbols is considered stable. It may vary across architectures,
  26. though.
  27. Note:
  28. As of this writing, this ABI documentation as been confirmed for x86_64.
  29. The maintainers of the other vDSO-using architectures should confirm
  30. that it is correct for their architecture.