(Translated by https://www.hiragana.jp/)
VDSO: Difference between revisions - Wikipedia Jump to content

VDSO: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
m Avoid one sentence per paragraph.
Line 2: Line 2:
{{Refimprove|date=June 2010}}
{{Refimprove|date=June 2010}}
{{lowercase}}
{{lowercase}}
'''vDSO''' ('''virtual dynamic 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 mode switch from user to kernel mode that is inherent when calling these same kernel space routines by means of the [[system call]] interface.<ref>{{cite web|url=http://manpages.ubuntu.com/manpages/wily/man7/vdso.7.html|title=vDSO - overview of the virtual ELF dynamic shared object|publisher=Canonical|accessdate=10 December 2015}}</ref>
'''vDSO''' ('''virtual dynamic 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 mode switch from user to kernel mode that is inherent when calling these same kernel space routines by means of the [[system call]] interface.<ref>{{cite web|url=http://manpages.ubuntu.com/manpages/wily/man7/vdso.7.html|title=vDSO - overview of the virtual ELF dynamic shared object|publisher=Canonical|accessdate=10 December 2015}}</ref> vDSO has been developed to offer the '''vsyscall''' features while overcoming its limitations: a small amount of [[static memory allocation|statically allocated]] memory, which allows only 4 system calls, and the same addresses ABI in each process, which compromises security. This security issue has been mitigated by [[Sigreturn-oriented programming#Vsyscall emulation|emulating a virtual system call]], but the emulation introduces additional latency.<ref name="SO">{{cite web|url=https://stackoverflow.com/q/19938324 |title=Community answer to question "What are vDSO and vsyscall?"|accessdate=19 November 2016}}</ref>


vDSO uses standard mechanisms for [[linker (computing)|link]]ing and [[loader (computing)|loading]] i.e. standard [[Executable and Linkable Format]] (ELF) format.<ref>{{cite web|url=http://www.linuxjournal.com/content/creating-vdso-colonels-other-chicken|title=Creating a vDSO: the Colonel's Other Chicken|publisher=Linuxjournal.com|accessdate=16 February 2015}}</ref><ref>{{cite web|url=https://lwn.net/Articles/446528/|title=On vsyscalls and the vDSO|publisher=Lwn.net|accessdate=16 February 2015}}</ref> vDSO is a memory area allocated in user space which exposes some kernel functionalities. vDSO is [[dynamic allocation|dynamically allocated]], offers improved safety through memory space randomization, and supports more than 4 system calls. vDSO links are provided via the [[glibc]] library. If the kernel does not have vDSO support, a traditional [[syscall]] is made.<ref name="SO"/> vDSO helps to reduce the calling overhead on simple kernel routines, and it also can work as a way to select the best system-call method on some [[computer architectures]] such as [[IA-32]].<ref>{{cite web|url=https://lwn.net/Articles/604515/|title=Anatomy of a system call, part 2|publisher=Lwn.net|accessdate=19 November 2018}}</ref> 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.
vDSO has been developed to offer the '''vsyscall''' features while overcoming its limitations: a small amount of [[static memory allocation|statically allocated]] memory, which allows only 4 system calls, and the same addresses ABI in each process, which compromises security. This security issue has been mitigated by [[Sigreturn-oriented programming#Vsyscall emulation|emulating a virtual system call]], but the emulation introduces additional latency.<ref name="SO">{{cite web|url=https://stackoverflow.com/q/19938324 |title=Community answer to question "What are vDSO and vsyscall?"|accessdate=19 November 2016}}</ref>

vDSO uses standard mechanisms for [[linker (computing)|link]]ing and [[loader (computing)|loading]] i.e. standard [[Executable and Linkable Format]] (ELF) format.<ref>{{cite web|url=http://www.linuxjournal.com/content/creating-vdso-colonels-other-chicken|title=Creating a vDSO: the Colonel's Other Chicken|publisher=Linuxjournal.com|accessdate=16 February 2015}}</ref><ref>{{cite web|url=https://lwn.net/Articles/446528/|title=On vsyscalls and the vDSO|publisher=Lwn.net|accessdate=16 February 2015}}</ref>

vDSO is a memory area allocated in user space which exposes some kernel functionalities. vDSO is [[dynamic allocation|dynamically allocated]], offers improved safety through memory space randomization, and supports more than 4 system calls. vDSO links are provided via the [[glibc]] library. If the kernel does not have vDSO support, a traditional [[syscall]] is made.<ref name="SO"/>

vDSO helps to reduce the calling overhead on simple kernel routines, and it also can work as a way to select the best system-call method on some [[computer architectures]] such as [[IA-32]].<ref>{{cite web|url=https://lwn.net/Articles/604515/|title=Anatomy of a system call, part 2|publisher=Lwn.net|accessdate=19 November 2018}}</ref>

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==
==See also==

Revision as of 14:39, 19 April 2020

vDSO (virtual dynamic 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 mode switch from user to kernel mode 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 while overcoming its limitations: a small amount of statically allocated memory, which allows only 4 system calls, and the same addresses ABI in each process, which compromises security. This security issue has been mitigated by emulating a virtual system call, but the emulation introduces additional 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, offers improved safety through memory space randomization, and supports more than 4 system calls. vDSO links are provided via the glibc library. If the kernel does not have vDSO support, a traditional syscall is made.[2] vDSO helps to reduce the calling overhead on simple kernel routines, and it also can work as a way to select the best system-call method on some computer architectures such as IA-32.[5] 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

References

  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.
  5. ^ "Anatomy of a system call, part 2". Lwn.net. Retrieved 19 November 2018.