vDSO

From Wikipedia, the free encyclopedia
Jump to: navigation, search

vDSO (virtual dynamically linked shared object) is a Linux kernel mechanism for exporting a carefully selected set of kernel space routines to user space applications so that applications can call these kernel space routines in-process, without incurring the performance penalty of a context switch that is inherent when calling these same kernel space routines by means of the system call interface.[1]

vDSO has been developed to offer the vsyscall features and to overcome its limitations : small amount of allocated memory allowing only 4 system calls and same addresses ABI in each process compromising security. This security issue has been by emulating a virtual system call introducing a penalty latency.[2]

vDSO uses standard mechanisms for linking and loading i.e. standard Executable and Linkable Format (ELF) format.[3][4]

vDSO is a memory area allocated in user space which exposes some kernel functionalities. vDSO is dynamically allocated (vsyscall is statically allocated) offering memory space randomization safer and more than 4 system calls. vDSO links are provided via the glibc library. If the Linux kernel does not have vDSO support, a traditional syscall is made.[2]

It helps to reduce the calling overhead on simple kernel routines, and also can work as a way to select the best system call method on some architectures.

An advantage over other methods is that such exported routines can provide proper DWARF (Debug With Attributed Record Format) debugging information.

Implementation generally implies hooks in the dynamic linker to find the vDSOs.

See also[edit]

References[edit]

  1. ^ "vDSO - overview of the virtual ELF dynamic shared object". Canonical. Retrieved 10 December 2015. 
  2. ^ a b "Community answer to question "What are vDSO and vsyscall?"". Retrieved 19 November 2016. 
  3. ^ "Creating a vDSO: the Colonel's Other Chicken". Linuxjournal.com. Retrieved 16 February 2015. 
  4. ^ "On vsyscalls and the vDSO". Lwn.net. Retrieved 16 February 2015.