2014-01-01 08:25:39 +00:00
|
|
|
.\" Written by Mike Frysinger <vapier@gentoo.org>
|
|
|
|
.\"
|
|
|
|
.\" %%%LICENSE_START(PUBLIC_DOMAIN)
|
|
|
|
.\" This page is in the public domain.
|
|
|
|
.\" %%%LICENSE_END
|
|
|
|
.\"
|
2014-01-01 10:14:33 +00:00
|
|
|
.\" Useful background:
|
2014-01-01 19:54:51 +00:00
|
|
|
.\" http://articles.manugarg.com/systemcallinlinux2_6.html
|
|
|
|
.\" https://lwn.net/Articles/446528/
|
|
|
|
.\" http://www.linuxjournal.com/content/creating-vdso-colonels-other-chicken
|
|
|
|
.\" http://www.trilithium.com/johan/2005/08/linux-gate/
|
2014-01-01 10:14:33 +00:00
|
|
|
.\"
|
pldd.1, bpf.2, chdir.2, clone.2, fanotify_init.2, fanotify_mark.2, intro.2, ipc.2, mount.2, mprotect.2, msgctl.2, msgget.2, msgop.2, pivot_root.2, pkey_alloc.2, poll.2, prctl.2, semctl.2, semget.2, semop.2, setxattr.2, shmctl.2, shmget.2, shmop.2, tkill.2, dlopen.3, exec.3, ftok.3, getutent.3, on_exit.3, strcat.3, cpuid.4, proc.5, capabilities.7, cgroup_namespaces.7, credentials.7, fanotify.7, mount_namespaces.7, namespaces.7, sched.7, signal.7, socket.7, unix.7, user_namespaces.7, vdso.7, xattr.7, ld.so.8: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-08-02 06:34:32 +00:00
|
|
|
.TH VDSO 7 2019-08-02 "Linux" "Linux Programmer's Manual"
|
2014-01-01 08:25:39 +00:00
|
|
|
.SH NAME
|
2015-12-30 15:12:37 +00:00
|
|
|
vdso \- overview of the virtual ELF dynamic shared object
|
2014-01-01 08:25:39 +00:00
|
|
|
.SH SYNOPSIS
|
|
|
|
.B #include <sys/auxv.h>
|
_syscall.2, clock_getres.2, clone.2, copy_file_range.2, create_module.2, delete_module.2, fallocate.2, futex.2, get_kernel_syms.2, get_robust_list.2, getcpu.2, getdents.2, gettid.2, gettimeofday.2, getunwind.2, init_module.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl_userfaultfd.2, ioprio_set.2, kcmp.2, kexec_load.2, keyctl.2, link.2, llseek.2, memfd_create.2, mmap.2, mq_getsetattr.2, msgctl.2, msgget.2, open_by_handle_at.2, outb.2, perf_event_open.2, pivot_root.2, process_vm_readv.2, query_module.2, readdir.2, recvmmsg.2, rename.2, request_key.2, restart_syscall.2, rt_sigqueueinfo.2, s390_pci_mmio_write.2, s390_runtime_instr.2, sched_setattr.2, seccomp.2, select.2, select_tut.2, send.2, sendmmsg.2, set_thread_area.2, set_tid_address.2, sgetmask.2, shmop.2, sigaction.2, sigprocmask.2, splice.2, spu_create.2, spu_run.2, statx.2, subpage_prot.2, sync_file_range.2, syscall.2, sysctl.2, sysfs.2, tee.2, timer_create.2, timer_delete.2, timer_getoverrun.2, timer_settime.2, tkill.2, uselib.2, utimensat.2, vmsplice.2, wait.2, aio_init.3, asinh.3, atan2.3, atanh.3, backtrace.3, basename.3, bswap.3, bzero.3, catgets.3, catopen.3, dladdr.3, dlsym.3, endian.3, envz_add.3, erf.3, erfc.3, error.3, ferror.3, ffs.3, fgetc.3, fmemopen.3, fopen.3, fopencookie.3, fseek.3, ftw.3, futimes.3, getdate.3, getenv.3, getline.3, getlogin.3, getrpcent.3, getsubopt.3, getutmp.3, getw.3, gnu_get_libc_version.3, inet_net_pton.3, isalpha.3, lio_listio.3, makedev.3, malloc_get_state.3, malloc_stats.3, malloc_trim.3, malloc_usable_size.3, matherr.3, memchr.3, nextup.3, ntp_gettime.3, posix_madvise.3, program_invocation_name.3, pthread_atfork.3, pthread_attr_setaffinity_np.3, pthread_attr_setdetachstate.3, pthread_attr_setguardsize.3, pthread_attr_setinheritsched.3, pthread_attr_setschedparam.3, pthread_attr_setschedpolicy.3, pthread_attr_setscope.3, pthread_attr_setstack.3, pthread_attr_setstackaddr.3, pthread_attr_setstacksize.3, pthread_cleanup_push_defer_np.3, pthread_detach.3, pthread_equal.3, pthread_exit.3, pthread_join.3, pthread_kill.3, pthread_kill_other_threads_np.3, pthread_rwlockattr_setkind_np.3, pthread_self.3, pthread_setcancelstate.3, pthread_setconcurrency.3, pthread_setschedprio.3, pthread_testcancel.3, pthread_tryjoin_np.3, pthread_yield.3, puts.3, random.3, random_r.3, rpc.3, sched_getcpu.3, setnetgrent.3, sigwait.3, stdin.3, strerror.3, strfmon.3, timeradd.3, tmpnam.3, toupper.3, towlower.3, towupper.3, ttyname.3, uselocale.3, xdr.3, dsp56k.4, sigevent.7, vdso.7: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-15 17:26:11 +00:00
|
|
|
.PP
|
2014-01-01 08:25:39 +00:00
|
|
|
.B void *vdso = (uintptr_t) getauxval(AT_SYSINFO_EHDR);
|
|
|
|
.SH DESCRIPTION
|
2014-02-01 06:55:22 +00:00
|
|
|
The "vDSO" (virtual dynamic shared object) is a small shared library that
|
2014-01-01 19:54:51 +00:00
|
|
|
the kernel automatically maps into the
|
2014-01-01 08:25:39 +00:00
|
|
|
address space of all user-space applications.
|
2014-01-01 10:14:33 +00:00
|
|
|
Applications usually do not need to concern themselves with these details
|
2014-01-01 08:25:39 +00:00
|
|
|
as the vDSO is most commonly called by the C library.
|
2014-01-01 19:41:50 +00:00
|
|
|
This way you can code in the normal way using standard functions
|
2014-01-01 10:14:33 +00:00
|
|
|
and the C library will take care
|
|
|
|
of using any functionality that is available via the vDSO.
|
environ.7, epoll.7, feature_test_macros.7, futex.7, ip.7, ipv6.7, locale.7, man-pages.7, man.7, math_error.7, netdevice.7, netlink.7, packet.7, raw.7, rtld-audit.7, rtnetlink.7, sock_diag.7, socket.7, tcp.7, udp.7, udplite.7, unix.7, uri.7, vdso.7: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 01:01:48 +00:00
|
|
|
.PP
|
2014-01-01 08:25:39 +00:00
|
|
|
Why does the vDSO exist at all?
|
2014-01-01 19:54:51 +00:00
|
|
|
There are some system calls the kernel provides that
|
2014-01-02 19:12:10 +00:00
|
|
|
user-space code ends up using frequently,
|
2014-01-01 19:54:51 +00:00
|
|
|
to the point that such calls can dominate overall performance.
|
2014-01-01 10:14:33 +00:00
|
|
|
This is due both to the frequency of the call as well as the
|
2014-02-01 02:50:51 +00:00
|
|
|
context-switch overhead that results
|
2014-01-01 08:25:39 +00:00
|
|
|
from exiting user space and entering the kernel.
|
environ.7, epoll.7, feature_test_macros.7, futex.7, ip.7, ipv6.7, locale.7, man-pages.7, man.7, math_error.7, netdevice.7, netlink.7, packet.7, raw.7, rtld-audit.7, rtnetlink.7, sock_diag.7, socket.7, tcp.7, udp.7, udplite.7, unix.7, uri.7, vdso.7: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 01:01:48 +00:00
|
|
|
.PP
|
2014-01-01 19:54:51 +00:00
|
|
|
The rest of this documentation is geared toward the curious and/or
|
|
|
|
C library writers rather than general developers.
|
2014-01-01 08:25:39 +00:00
|
|
|
If you're trying to call the vDSO in your own application rather than using
|
|
|
|
the C library, you're most likely doing it wrong.
|
|
|
|
.SS Example background
|
|
|
|
Making system calls can be slow.
|
2014-01-01 10:14:33 +00:00
|
|
|
In x86 32-bit systems, you can trigger a software interrupt
|
|
|
|
.RI ( "int $0x80" )
|
|
|
|
to tell the kernel you wish to make a system call.
|
|
|
|
However, this instruction is expensive: it goes through
|
|
|
|
the full interrupt-handling paths
|
|
|
|
in the processor's microcode as well as in the kernel.
|
|
|
|
Newer processors have faster (but backward incompatible) instructions to
|
2014-01-01 08:25:39 +00:00
|
|
|
initiate system calls.
|
|
|
|
Rather than require the C library to figure out if this functionality is
|
2014-01-01 19:54:51 +00:00
|
|
|
available at run time,
|
2014-01-01 10:14:33 +00:00
|
|
|
the C library can use functions provided by the kernel in
|
2014-01-01 08:25:39 +00:00
|
|
|
the vDSO.
|
environ.7, epoll.7, feature_test_macros.7, futex.7, ip.7, ipv6.7, locale.7, man-pages.7, man.7, math_error.7, netdevice.7, netlink.7, packet.7, raw.7, rtld-audit.7, rtnetlink.7, sock_diag.7, socket.7, tcp.7, udp.7, udplite.7, unix.7, uri.7, vdso.7: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 01:01:48 +00:00
|
|
|
.PP
|
2014-01-01 08:25:39 +00:00
|
|
|
Note that the terminology can be confusing.
|
2014-01-01 10:14:33 +00:00
|
|
|
On x86 systems, the vDSO function
|
|
|
|
used to determine the preferred method of making a system call is
|
clone.2, getcpu.2, shmget.2, syscall.2, dladdr.3, proc.5, vdso.7: Consistently use "x86-64", not "x86_64"
When referring to the architecture, consistently use "x86-64",
not "x86_64". Hitherto, there was a mixture of usages, with
"x86-64" predominant.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-10-18 07:19:34 +00:00
|
|
|
named "__kernel_vsyscall", but on x86-64,
|
2014-01-01 19:54:51 +00:00
|
|
|
the term "vsyscall" also refers to an obsolete way to ask the kernel
|
|
|
|
what time it is or what CPU the caller is on.
|
environ.7, epoll.7, feature_test_macros.7, futex.7, ip.7, ipv6.7, locale.7, man-pages.7, man.7, math_error.7, netdevice.7, netlink.7, packet.7, raw.7, rtld-audit.7, rtnetlink.7, sock_diag.7, socket.7, tcp.7, udp.7, udplite.7, unix.7, uri.7, vdso.7: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 01:01:48 +00:00
|
|
|
.PP
|
2014-01-01 10:14:33 +00:00
|
|
|
One frequently used system call is
|
|
|
|
.BR gettimeofday (2).
|
|
|
|
This system call is called both directly by user-space applications
|
|
|
|
as well as indirectly by
|
2014-01-01 08:25:39 +00:00
|
|
|
the C library.
|
2014-01-01 19:54:51 +00:00
|
|
|
Think timestamps or timing loops or polling\(emall of these
|
|
|
|
frequently need to know what time it is right now.
|
|
|
|
This information is also not secret\(emany application in any
|
|
|
|
privilege mode (root or any unprivileged user) will get the same answer.
|
|
|
|
Thus the kernel arranges for the information required to answer
|
|
|
|
this question to be placed in memory the process can access.
|
2014-01-01 10:14:33 +00:00
|
|
|
Now a call to
|
|
|
|
.BR gettimeofday (2)
|
|
|
|
changes from a system call to a normal function
|
2014-01-01 08:25:39 +00:00
|
|
|
call and a few memory accesses.
|
|
|
|
.SS Finding the vDSO
|
2014-01-01 19:54:51 +00:00
|
|
|
The base address of the vDSO (if one exists) is passed by the kernel to
|
|
|
|
each program in the initial auxiliary vector (see
|
2014-01-10 19:04:54 +00:00
|
|
|
.BR getauxval (3)),
|
2014-01-01 10:14:33 +00:00
|
|
|
via the
|
2014-01-01 08:25:39 +00:00
|
|
|
.B AT_SYSINFO_EHDR
|
|
|
|
tag.
|
environ.7, epoll.7, feature_test_macros.7, futex.7, ip.7, ipv6.7, locale.7, man-pages.7, man.7, math_error.7, netdevice.7, netlink.7, packet.7, raw.7, rtld-audit.7, rtnetlink.7, sock_diag.7, socket.7, tcp.7, udp.7, udplite.7, unix.7, uri.7, vdso.7: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 01:01:48 +00:00
|
|
|
.PP
|
2014-01-01 08:25:39 +00:00
|
|
|
You must not assume the vDSO is mapped at any particular location in the
|
|
|
|
user's memory map.
|
2014-01-01 19:54:51 +00:00
|
|
|
The base address will usually be randomized at run time every time a new
|
2014-01-01 08:25:39 +00:00
|
|
|
process image is created (at
|
|
|
|
.BR execve (2)
|
|
|
|
time).
|
2014-01-01 10:14:33 +00:00
|
|
|
This is done for security reasons,
|
|
|
|
to prevent "return-to-libc" attacks.
|
environ.7, epoll.7, feature_test_macros.7, futex.7, ip.7, ipv6.7, locale.7, man-pages.7, man.7, math_error.7, netdevice.7, netlink.7, packet.7, raw.7, rtld-audit.7, rtnetlink.7, sock_diag.7, socket.7, tcp.7, udp.7, udplite.7, unix.7, uri.7, vdso.7: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 01:01:48 +00:00
|
|
|
.PP
|
2014-01-01 10:14:33 +00:00
|
|
|
For some architectures, there is also an
|
2014-01-01 08:25:39 +00:00
|
|
|
.B AT_SYSINFO
|
|
|
|
tag.
|
|
|
|
This is used only for locating the vsyscall entry point and is frequently
|
|
|
|
omitted or set to 0 (meaning it's not available).
|
2014-01-01 10:14:33 +00:00
|
|
|
This tag is a throwback to the initial vDSO work (see
|
|
|
|
.IR History
|
|
|
|
below) and its use should be avoided.
|
2014-01-01 08:25:39 +00:00
|
|
|
.SS File format
|
|
|
|
Since the vDSO is a fully formed ELF image, you can do symbol lookups on it.
|
2014-01-01 19:54:51 +00:00
|
|
|
This allows new symbols to be added with newer kernel releases,
|
|
|
|
and allows the C library to detect available functionality at
|
|
|
|
run time when running under different kernel versions.
|
2014-01-01 10:14:33 +00:00
|
|
|
Oftentimes the C library will do detection with the first call and then
|
2014-01-01 08:25:39 +00:00
|
|
|
cache the result for subsequent calls.
|
environ.7, epoll.7, feature_test_macros.7, futex.7, ip.7, ipv6.7, locale.7, man-pages.7, man.7, math_error.7, netdevice.7, netlink.7, packet.7, raw.7, rtld-audit.7, rtnetlink.7, sock_diag.7, socket.7, tcp.7, udp.7, udplite.7, unix.7, uri.7, vdso.7: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 01:01:48 +00:00
|
|
|
.PP
|
2014-01-01 08:25:39 +00:00
|
|
|
All symbols are also versioned (using the GNU version format).
|
|
|
|
This allows the kernel to update the function signature without breaking
|
2014-01-01 10:14:33 +00:00
|
|
|
backward compatibility.
|
2014-01-01 08:25:39 +00:00
|
|
|
This means changing the arguments that the function accepts as well as the
|
|
|
|
return value.
|
2014-01-01 10:14:33 +00:00
|
|
|
Thus, when looking up a symbol in the vDSO,
|
|
|
|
you must always include the version
|
2014-01-01 08:25:39 +00:00
|
|
|
to match the ABI you expect.
|
environ.7, epoll.7, feature_test_macros.7, futex.7, ip.7, ipv6.7, locale.7, man-pages.7, man.7, math_error.7, netdevice.7, netlink.7, packet.7, raw.7, rtld-audit.7, rtnetlink.7, sock_diag.7, socket.7, tcp.7, udp.7, udplite.7, unix.7, uri.7, vdso.7: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 01:01:48 +00:00
|
|
|
.PP
|
2014-01-01 10:14:33 +00:00
|
|
|
Typically the vDSO follows the naming convention of prefixing
|
|
|
|
all symbols with "__vdso_" or "__kernel_"
|
|
|
|
so as to distinguish them from other standard symbols.
|
|
|
|
For example, the "gettimeofday" function is named "__vdso_gettimeofday".
|
environ.7, epoll.7, feature_test_macros.7, futex.7, ip.7, ipv6.7, locale.7, man-pages.7, man.7, math_error.7, netdevice.7, netlink.7, packet.7, raw.7, rtld-audit.7, rtnetlink.7, sock_diag.7, socket.7, tcp.7, udp.7, udplite.7, unix.7, uri.7, vdso.7: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 01:01:48 +00:00
|
|
|
.PP
|
2014-01-01 10:14:33 +00:00
|
|
|
You use the standard C calling conventions when calling
|
|
|
|
any of these functions.
|
2014-01-01 08:25:39 +00:00
|
|
|
No need to worry about weird register or stack behavior.
|
|
|
|
.SH NOTES
|
|
|
|
.SS Source
|
2014-01-01 19:54:51 +00:00
|
|
|
When you compile the kernel,
|
|
|
|
it will automatically compile and link the vDSO code for you.
|
2014-01-01 10:14:33 +00:00
|
|
|
You will frequently find it under the architecture-specific directory:
|
environ.7, epoll.7, feature_test_macros.7, futex.7, ip.7, ipv6.7, locale.7, man-pages.7, man.7, math_error.7, netdevice.7, netlink.7, packet.7, raw.7, rtld-audit.7, rtnetlink.7, sock_diag.7, socket.7, tcp.7, udp.7, udplite.7, unix.7, uri.7, vdso.7: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 01:01:48 +00:00
|
|
|
.PP
|
2018-09-22 10:24:43 +00:00
|
|
|
find arch/$ARCH/ \-name \(aq*vdso*.so*\(aq \-o \-name \(aq*gate*.so*\(aq
|
membarrier.2, crypt.3, dladdr.3, duplocale.3, fmemopen.3, gethostbyname.3, mallopt.3, newlocale.3, resolver.3, sigsetops.3, strfmon.3, tzset.3, console_ioctl.4, lirc.4, loop.4, vcs.4, dir_colors.5, locale.5, proc.5, tzfile.5, attributes.7, bootparam.7, capabilities.7, feature_test_macros.7, icmp.7, man-pages.7, netlink.7, path_resolution.7, pipe.7, socket.7, unix.7, vdso.7: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-02-03 08:14:22 +00:00
|
|
|
.\"
|
2014-01-01 08:25:39 +00:00
|
|
|
.SS vDSO names
|
2014-02-01 06:46:37 +00:00
|
|
|
The name of the vDSO varies across architectures.
|
2014-01-10 19:04:54 +00:00
|
|
|
It will often show up in things like glibc's
|
2014-01-01 10:14:33 +00:00
|
|
|
.BR ldd (1)
|
|
|
|
output.
|
2014-01-01 08:25:39 +00:00
|
|
|
The exact name should not matter to any code, so do not hardcode it.
|
|
|
|
.if t \{\
|
|
|
|
.ft CW
|
|
|
|
\}
|
|
|
|
.TS
|
|
|
|
l l.
|
|
|
|
user ABI vDSO name
|
|
|
|
_
|
2018-09-22 10:24:43 +00:00
|
|
|
aarch64 linux\-vdso.so.1
|
|
|
|
arm linux\-vdso.so.1
|
|
|
|
ia64 linux\-gate.so.1
|
|
|
|
mips linux\-vdso.so.1
|
|
|
|
ppc/32 linux\-vdso32.so.1
|
|
|
|
ppc/64 linux\-vdso64.so.1
|
2019-06-11 13:33:56 +00:00
|
|
|
riscv linux\-vdso.so.1
|
2018-09-22 10:24:43 +00:00
|
|
|
s390 linux\-vdso32.so.1
|
|
|
|
s390x linux\-vdso64.so.1
|
|
|
|
sh linux\-gate.so.1
|
|
|
|
i386 linux\-gate.so.1
|
|
|
|
x86-64 linux\-vdso.so.1
|
|
|
|
x86/x32 linux\-vdso.so.1
|
2014-01-01 08:25:39 +00:00
|
|
|
.TE
|
|
|
|
.if t \{\
|
|
|
|
.in
|
|
|
|
.ft P
|
|
|
|
\}
|
2018-04-24 16:25:44 +00:00
|
|
|
.SS strace(1), seccomp(2), and the vDSO
|
2015-12-15 19:24:21 +00:00
|
|
|
When tracing systems calls with
|
|
|
|
.BR strace (1),
|
|
|
|
symbols (system calls) that are exported by the vDSO will
|
|
|
|
.I not
|
|
|
|
appear in the trace output.
|
2018-04-24 16:25:44 +00:00
|
|
|
Those system calls will likewise not be visible to
|
|
|
|
.BR seccomp (2)
|
|
|
|
filters.
|
2014-01-02 19:12:10 +00:00
|
|
|
.SH ARCHITECTURE-SPECIFIC NOTES
|
2014-01-01 19:41:50 +00:00
|
|
|
The subsections below provide architecture-specific notes
|
|
|
|
on the vDSO.
|
environ.7, epoll.7, feature_test_macros.7, futex.7, ip.7, ipv6.7, locale.7, man-pages.7, man.7, math_error.7, netdevice.7, netlink.7, packet.7, raw.7, rtld-audit.7, rtnetlink.7, sock_diag.7, socket.7, tcp.7, udp.7, udplite.7, unix.7, uri.7, vdso.7: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 01:01:48 +00:00
|
|
|
.PP
|
2014-01-01 19:41:50 +00:00
|
|
|
Note that the vDSO that is used is based on the ABI of your user-space code
|
|
|
|
and not the ABI of the kernel.
|
|
|
|
Thus, for example,
|
|
|
|
when you run an i386 32-bit ELF binary,
|
|
|
|
you'll get the same vDSO regardless of whether you run it under
|
clone.2, getcpu.2, shmget.2, syscall.2, dladdr.3, proc.5, vdso.7: Consistently use "x86-64", not "x86_64"
When referring to the architecture, consistently use "x86-64",
not "x86_64". Hitherto, there was a mixture of usages, with
"x86-64" predominant.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-10-18 07:19:34 +00:00
|
|
|
an i386 32-bit kernel or under an x86-64 64-bit kernel.
|
2014-01-02 19:12:10 +00:00
|
|
|
Therefore, the name of the user-space ABI should be used to determine
|
2014-01-01 19:41:50 +00:00
|
|
|
which of the sections below is relevant.
|
2014-01-01 10:14:33 +00:00
|
|
|
.SS ARM functions
|
2015-06-01 19:48:59 +00:00
|
|
|
.\" See linux/arch/arm/vdso/vdso.lds.S
|
|
|
|
.\" Commit: 8512287a8165592466cb9cb347ba94892e9c56a5
|
|
|
|
The table below lists the symbols exported by the vDSO.
|
|
|
|
.if t \{\
|
|
|
|
.ft CW
|
|
|
|
\}
|
|
|
|
.TS
|
|
|
|
l l.
|
|
|
|
symbol version
|
|
|
|
_
|
|
|
|
__vdso_gettimeofday LINUX_2.6 (exported since Linux 4.1)
|
|
|
|
__vdso_clock_gettime LINUX_2.6 (exported since Linux 4.1)
|
|
|
|
.TE
|
|
|
|
.if t \{\
|
|
|
|
.in
|
|
|
|
.ft P
|
|
|
|
\}
|
environ.7, epoll.7, feature_test_macros.7, futex.7, ip.7, ipv6.7, locale.7, man-pages.7, man.7, math_error.7, netdevice.7, netlink.7, packet.7, raw.7, rtld-audit.7, rtnetlink.7, sock_diag.7, socket.7, tcp.7, udp.7, udplite.7, unix.7, uri.7, vdso.7: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 01:01:48 +00:00
|
|
|
.PP
|
2014-01-01 08:25:39 +00:00
|
|
|
.\" See linux/arch/arm/kernel/entry-armv.S
|
|
|
|
.\" See linux/Documentation/arm/kernel_user_helpers.txt
|
2015-06-01 19:48:59 +00:00
|
|
|
Additionally, the ARM port has a code page full of utility functions.
|
2014-01-01 08:25:39 +00:00
|
|
|
Since it's just a raw page of code, there is no ELF information for doing
|
|
|
|
symbol lookups or versioning.
|
|
|
|
It does provide support for different versions though.
|
environ.7, epoll.7, feature_test_macros.7, futex.7, ip.7, ipv6.7, locale.7, man-pages.7, man.7, math_error.7, netdevice.7, netlink.7, packet.7, raw.7, rtld-audit.7, rtnetlink.7, sock_diag.7, socket.7, tcp.7, udp.7, udplite.7, unix.7, uri.7, vdso.7: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 01:01:48 +00:00
|
|
|
.PP
|
2014-01-01 10:14:33 +00:00
|
|
|
For information on this code page,
|
|
|
|
it's best to refer to the kernel documentation
|
2014-01-01 08:25:39 +00:00
|
|
|
as it's extremely detailed and covers everything you need to know:
|
2014-01-01 10:14:33 +00:00
|
|
|
.IR Documentation/arm/kernel_user_helpers.txt .
|
2014-01-01 08:25:39 +00:00
|
|
|
.SS aarch64 functions
|
|
|
|
.\" See linux/arch/arm64/kernel/vdso/vdso.lds.S
|
2014-01-01 19:41:50 +00:00
|
|
|
The table below lists the symbols exported by the vDSO.
|
2014-01-01 08:25:39 +00:00
|
|
|
.if t \{\
|
|
|
|
.ft CW
|
|
|
|
\}
|
|
|
|
.TS
|
|
|
|
l l.
|
|
|
|
symbol version
|
|
|
|
_
|
|
|
|
__kernel_rt_sigreturn LINUX_2.6.39
|
|
|
|
__kernel_gettimeofday LINUX_2.6.39
|
|
|
|
__kernel_clock_gettime LINUX_2.6.39
|
|
|
|
__kernel_clock_getres LINUX_2.6.39
|
|
|
|
.TE
|
|
|
|
.if t \{\
|
|
|
|
.in
|
|
|
|
.ft P
|
|
|
|
\}
|
2019-06-13 11:25:26 +00:00
|
|
|
.SS bfin (Blackfin) functions (port removed in Linux 4.17)
|
2014-01-01 08:25:39 +00:00
|
|
|
.\" See linux/arch/blackfin/kernel/fixed_code.S
|
|
|
|
.\" See http://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:fixed-code
|
2014-01-01 19:54:51 +00:00
|
|
|
As this CPU lacks a memory management unit (MMU),
|
|
|
|
it doesn't set up a vDSO in the normal sense.
|
|
|
|
Instead, it maps at boot time a few raw functions into
|
|
|
|
a fixed location in memory.
|
2014-01-01 08:25:39 +00:00
|
|
|
User-space applications then call directly into that region.
|
2014-01-01 19:54:51 +00:00
|
|
|
There is no provision for backward compatibility
|
|
|
|
beyond sniffing raw opcodes,
|
2014-01-01 10:14:33 +00:00
|
|
|
but as this is an embedded CPU, it can get away with things\(emsome of the
|
2014-01-01 08:25:39 +00:00
|
|
|
object formats it runs aren't even ELF based (they're bFLT/FLAT).
|
environ.7, epoll.7, feature_test_macros.7, futex.7, ip.7, ipv6.7, locale.7, man-pages.7, man.7, math_error.7, netdevice.7, netlink.7, packet.7, raw.7, rtld-audit.7, rtnetlink.7, sock_diag.7, socket.7, tcp.7, udp.7, udplite.7, unix.7, uri.7, vdso.7: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 01:01:48 +00:00
|
|
|
.PP
|
2014-01-01 19:41:50 +00:00
|
|
|
For information on this code page,
|
|
|
|
it's best to refer to the public documentation:
|
2014-01-01 08:25:39 +00:00
|
|
|
.br
|
futex.2, open_by_handle_at.2, seccomp.2, socket.2, console_codes.4, protocols.5, aio.7, capabilities.7, libc.7, netlink.7, raw.7, standards.7, unicode.7, uri.7, vdso.7: tfix
Escape hyphens in URLs.
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-01-29 15:21:13 +00:00
|
|
|
http://docs.blackfin.uclinux.org/doku.php?id=linux\-kernel:fixed\-code
|
2016-04-05 15:24:34 +00:00
|
|
|
.SS mips functions
|
|
|
|
.\" See linux/arch/mips/vdso/vdso.ld.S
|
environ.7, epoll.7, feature_test_macros.7, futex.7, ip.7, ipv6.7, locale.7, man-pages.7, man.7, math_error.7, netdevice.7, netlink.7, packet.7, raw.7, rtld-audit.7, rtnetlink.7, sock_diag.7, socket.7, tcp.7, udp.7, udplite.7, unix.7, uri.7, vdso.7: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 01:01:48 +00:00
|
|
|
.PP
|
2016-04-05 15:24:34 +00:00
|
|
|
The table below lists the symbols exported by the vDSO.
|
|
|
|
.if t \{\
|
|
|
|
.ft CW
|
|
|
|
\}
|
|
|
|
.TS
|
|
|
|
l l.
|
|
|
|
symbol version
|
|
|
|
_
|
|
|
|
__kernel_gettimeofday LINUX_2.6 (exported since Linux 4.4)
|
|
|
|
__kernel_clock_gettime LINUX_2.6 (exported since Linux 4.4)
|
|
|
|
.TE
|
|
|
|
.if t \{\
|
|
|
|
.in
|
|
|
|
.ft P
|
|
|
|
\}
|
2014-01-01 08:25:39 +00:00
|
|
|
.SS ia64 (Itanium) functions
|
|
|
|
.\" See linux/arch/ia64/kernel/gate.lds.S
|
|
|
|
.\" Also linux/arch/ia64/kernel/fsys.S and linux/Documentation/ia64/fsys.txt
|
2014-01-01 19:41:50 +00:00
|
|
|
The table below lists the symbols exported by the vDSO.
|
2014-01-01 08:25:39 +00:00
|
|
|
.if t \{\
|
|
|
|
.ft CW
|
|
|
|
\}
|
|
|
|
.TS
|
|
|
|
l l.
|
|
|
|
symbol version
|
|
|
|
_
|
|
|
|
__kernel_sigtramp LINUX_2.5
|
|
|
|
__kernel_syscall_via_break LINUX_2.5
|
|
|
|
__kernel_syscall_via_epc LINUX_2.5
|
|
|
|
.TE
|
|
|
|
.if t \{\
|
|
|
|
.in
|
|
|
|
.ft P
|
|
|
|
\}
|
environ.7, epoll.7, feature_test_macros.7, futex.7, ip.7, ipv6.7, locale.7, man-pages.7, man.7, math_error.7, netdevice.7, netlink.7, packet.7, raw.7, rtld-audit.7, rtnetlink.7, sock_diag.7, socket.7, tcp.7, udp.7, udplite.7, unix.7, uri.7, vdso.7: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 01:01:48 +00:00
|
|
|
.PP
|
2014-01-01 10:14:33 +00:00
|
|
|
The Itanium port is somewhat tricky.
|
2014-01-01 19:54:51 +00:00
|
|
|
In addition to the vDSO above, it also has "light-weight system calls"
|
|
|
|
(also known as "fast syscalls" or "fsys").
|
2014-01-01 10:14:33 +00:00
|
|
|
You can invoke these via the
|
|
|
|
.I __kernel_syscall_via_epc
|
|
|
|
vDSO helper.
|
2014-01-01 08:25:39 +00:00
|
|
|
The system calls listed here have the same semantics as if you called them
|
|
|
|
directly via
|
2014-01-01 10:14:33 +00:00
|
|
|
.BR syscall (2),
|
2014-01-01 08:25:39 +00:00
|
|
|
so refer to the relevant
|
|
|
|
documentation for each.
|
|
|
|
The table below lists the functions available via this mechanism.
|
|
|
|
.if t \{\
|
|
|
|
.ft CW
|
|
|
|
\}
|
|
|
|
.TS
|
|
|
|
l.
|
|
|
|
function
|
|
|
|
_
|
|
|
|
clock_gettime
|
|
|
|
getcpu
|
|
|
|
getpid
|
|
|
|
getppid
|
|
|
|
gettimeofday
|
|
|
|
set_tid_address
|
|
|
|
.TE
|
|
|
|
.if t \{\
|
|
|
|
.in
|
|
|
|
.ft P
|
|
|
|
\}
|
|
|
|
.SS parisc (hppa) functions
|
|
|
|
.\" See linux/arch/parisc/kernel/syscall.S
|
|
|
|
.\" See linux/Documentation/parisc/registers
|
2018-05-22 13:14:41 +00:00
|
|
|
The parisc port has a code page with utility functions
|
2014-01-01 19:54:51 +00:00
|
|
|
called a gateway page.
|
2014-01-01 10:14:33 +00:00
|
|
|
Rather than use the normal ELF auxiliary vector approach,
|
|
|
|
it passes the address of
|
2014-01-01 08:25:39 +00:00
|
|
|
the page to the process via the SR2 register.
|
|
|
|
The permissions on the page are such that merely executing those addresses
|
2014-01-02 19:12:10 +00:00
|
|
|
automatically executes with kernel privileges and not in user space.
|
2014-01-01 08:25:39 +00:00
|
|
|
This is done to match the way HP-UX works.
|
environ.7, epoll.7, feature_test_macros.7, futex.7, ip.7, ipv6.7, locale.7, man-pages.7, man.7, math_error.7, netdevice.7, netlink.7, packet.7, raw.7, rtld-audit.7, rtnetlink.7, sock_diag.7, socket.7, tcp.7, udp.7, udplite.7, unix.7, uri.7, vdso.7: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 01:01:48 +00:00
|
|
|
.PP
|
2014-01-01 08:25:39 +00:00
|
|
|
Since it's just a raw page of code, there is no ELF information for doing
|
|
|
|
symbol lookups or versioning.
|
2014-01-01 10:14:33 +00:00
|
|
|
Simply call into the appropriate offset via the branch instruction,
|
|
|
|
for example:
|
environ.7, epoll.7, feature_test_macros.7, futex.7, ip.7, ipv6.7, locale.7, man-pages.7, man.7, math_error.7, netdevice.7, netlink.7, packet.7, raw.7, rtld-audit.7, rtnetlink.7, sock_diag.7, socket.7, tcp.7, udp.7, udplite.7, unix.7, uri.7, vdso.7: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 01:01:48 +00:00
|
|
|
.PP
|
2014-01-01 10:14:33 +00:00
|
|
|
ble <offset>(%sr2, %r0)
|
2014-01-01 08:25:39 +00:00
|
|
|
.if t \{\
|
|
|
|
.ft CW
|
|
|
|
\}
|
|
|
|
.TS
|
|
|
|
l l.
|
|
|
|
offset function
|
|
|
|
_
|
2018-05-22 13:14:41 +00:00
|
|
|
00b0 lws_entry (CAS operations)
|
|
|
|
00e0 set_thread_pointer (used by glibc)
|
2014-01-01 08:25:39 +00:00
|
|
|
0100 linux_gateway_entry (syscall)
|
|
|
|
.TE
|
|
|
|
.if t \{\
|
|
|
|
.in
|
|
|
|
.ft P
|
|
|
|
\}
|
|
|
|
.SS ppc/32 functions
|
|
|
|
.\" See linux/arch/powerpc/kernel/vdso32/vdso32.lds.S
|
2014-01-01 19:41:50 +00:00
|
|
|
The table below lists the symbols exported by the vDSO.
|
2014-01-01 08:25:39 +00:00
|
|
|
The functions marked with a
|
|
|
|
.I *
|
2014-01-01 19:41:50 +00:00
|
|
|
are available only when the kernel is
|
|
|
|
a PowerPC64 (64-bit) kernel.
|
2014-01-01 08:25:39 +00:00
|
|
|
.if t \{\
|
|
|
|
.ft CW
|
|
|
|
\}
|
|
|
|
.TS
|
|
|
|
l l.
|
|
|
|
symbol version
|
|
|
|
_
|
|
|
|
__kernel_clock_getres LINUX_2.6.15
|
|
|
|
__kernel_clock_gettime LINUX_2.6.15
|
|
|
|
__kernel_datapage_offset LINUX_2.6.15
|
|
|
|
__kernel_get_syscall_map LINUX_2.6.15
|
|
|
|
__kernel_get_tbfreq LINUX_2.6.15
|
|
|
|
__kernel_getcpu \fI*\fR LINUX_2.6.15
|
|
|
|
__kernel_gettimeofday LINUX_2.6.15
|
|
|
|
__kernel_sigtramp_rt32 LINUX_2.6.15
|
|
|
|
__kernel_sigtramp32 LINUX_2.6.15
|
|
|
|
__kernel_sync_dicache LINUX_2.6.15
|
|
|
|
__kernel_sync_dicache_p5 LINUX_2.6.15
|
|
|
|
.TE
|
|
|
|
.if t \{\
|
|
|
|
.in
|
|
|
|
.ft P
|
|
|
|
\}
|
environ.7, epoll.7, feature_test_macros.7, futex.7, ip.7, ipv6.7, locale.7, man-pages.7, man.7, math_error.7, netdevice.7, netlink.7, packet.7, raw.7, rtld-audit.7, rtnetlink.7, sock_diag.7, socket.7, tcp.7, udp.7, udplite.7, unix.7, uri.7, vdso.7: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 01:01:48 +00:00
|
|
|
.PP
|
2016-04-18 15:21:02 +00:00
|
|
|
The
|
|
|
|
.B CLOCK_REALTIME_COARSE
|
|
|
|
and
|
|
|
|
.B CLOCK_MONOTONIC_COARSE
|
|
|
|
clocks are
|
|
|
|
.I not
|
|
|
|
supported by the
|
|
|
|
.I __kernel_clock_getres
|
|
|
|
and
|
|
|
|
.I __kernel_clock_gettime
|
|
|
|
interfaces;
|
|
|
|
the kernel falls back to the real system call.
|
2014-01-01 08:25:39 +00:00
|
|
|
.SS ppc/64 functions
|
|
|
|
.\" See linux/arch/powerpc/kernel/vdso64/vdso64.lds.S
|
2014-01-01 19:41:50 +00:00
|
|
|
The table below lists the symbols exported by the vDSO.
|
2014-01-01 08:25:39 +00:00
|
|
|
.if t \{\
|
|
|
|
.ft CW
|
|
|
|
\}
|
|
|
|
.TS
|
|
|
|
l l.
|
|
|
|
symbol version
|
|
|
|
_
|
|
|
|
__kernel_clock_getres LINUX_2.6.15
|
|
|
|
__kernel_clock_gettime LINUX_2.6.15
|
|
|
|
__kernel_datapage_offset LINUX_2.6.15
|
|
|
|
__kernel_get_syscall_map LINUX_2.6.15
|
|
|
|
__kernel_get_tbfreq LINUX_2.6.15
|
|
|
|
__kernel_getcpu LINUX_2.6.15
|
|
|
|
__kernel_gettimeofday LINUX_2.6.15
|
|
|
|
__kernel_sigtramp_rt64 LINUX_2.6.15
|
|
|
|
__kernel_sync_dicache LINUX_2.6.15
|
|
|
|
__kernel_sync_dicache_p5 LINUX_2.6.15
|
|
|
|
.TE
|
|
|
|
.if t \{\
|
|
|
|
.in
|
|
|
|
.ft P
|
|
|
|
\}
|
environ.7, epoll.7, feature_test_macros.7, futex.7, ip.7, ipv6.7, locale.7, man-pages.7, man.7, math_error.7, netdevice.7, netlink.7, packet.7, raw.7, rtld-audit.7, rtnetlink.7, sock_diag.7, socket.7, tcp.7, udp.7, udplite.7, unix.7, uri.7, vdso.7: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 01:01:48 +00:00
|
|
|
.PP
|
2016-04-18 15:21:02 +00:00
|
|
|
The
|
|
|
|
.B CLOCK_REALTIME_COARSE
|
|
|
|
and
|
|
|
|
.B CLOCK_MONOTONIC_COARSE
|
|
|
|
clocks are
|
|
|
|
.I not
|
|
|
|
supported by the
|
|
|
|
.I __kernel_clock_getres
|
|
|
|
and
|
|
|
|
.I __kernel_clock_gettime
|
|
|
|
interfaces;
|
|
|
|
the kernel falls back to the real system call.
|
2019-06-11 13:33:56 +00:00
|
|
|
.SS riscv functions
|
|
|
|
.\" See linux/arch/riscv/kernel/vdso/vdso.lds.S
|
|
|
|
The table below lists the symbols exported by the vDSO.
|
|
|
|
.if t \{\
|
|
|
|
.ft CW
|
|
|
|
\}
|
|
|
|
.TS
|
|
|
|
l l.
|
|
|
|
symbol version
|
|
|
|
_
|
|
|
|
__kernel_rt_sigreturn LINUX_4.15
|
|
|
|
__kernel_gettimeofday LINUX_4.15
|
|
|
|
__kernel_clock_gettime LINUX_4.15
|
|
|
|
__kernel_clock_getres LINUX_4.15
|
|
|
|
__kernel_getcpu LINUX_4.15
|
|
|
|
__kernel_flush_icache LINUX_4.15
|
|
|
|
.TE
|
|
|
|
.if t \{\
|
|
|
|
.in
|
|
|
|
.ft P
|
|
|
|
\}
|
2014-01-01 08:25:39 +00:00
|
|
|
.SS s390 functions
|
|
|
|
.\" See linux/arch/s390/kernel/vdso32/vdso32.lds.S
|
2014-01-01 19:41:50 +00:00
|
|
|
The table below lists the symbols exported by the vDSO.
|
2014-01-01 08:25:39 +00:00
|
|
|
.if t \{\
|
|
|
|
.ft CW
|
|
|
|
\}
|
|
|
|
.TS
|
|
|
|
l l.
|
|
|
|
symbol version
|
|
|
|
_
|
|
|
|
__kernel_clock_getres LINUX_2.6.29
|
|
|
|
__kernel_clock_gettime LINUX_2.6.29
|
|
|
|
__kernel_gettimeofday LINUX_2.6.29
|
|
|
|
.TE
|
|
|
|
.if t \{\
|
|
|
|
.in
|
|
|
|
.ft P
|
|
|
|
\}
|
|
|
|
.SS s390x functions
|
|
|
|
.\" See linux/arch/s390/kernel/vdso64/vdso64.lds.S
|
2014-01-01 19:41:50 +00:00
|
|
|
The table below lists the symbols exported by the vDSO.
|
2014-01-01 08:25:39 +00:00
|
|
|
.if t \{\
|
|
|
|
.ft CW
|
|
|
|
\}
|
|
|
|
.TS
|
|
|
|
l l.
|
|
|
|
symbol version
|
|
|
|
_
|
|
|
|
__kernel_clock_getres LINUX_2.6.29
|
|
|
|
__kernel_clock_gettime LINUX_2.6.29
|
|
|
|
__kernel_gettimeofday LINUX_2.6.29
|
|
|
|
.TE
|
|
|
|
.if t \{\
|
|
|
|
.in
|
|
|
|
.ft P
|
|
|
|
\}
|
|
|
|
.SS sh (SuperH) functions
|
|
|
|
.\" See linux/arch/sh/kernel/vsyscall/vsyscall.lds.S
|
2014-01-01 19:41:50 +00:00
|
|
|
The table below lists the symbols exported by the vDSO.
|
2014-01-01 08:25:39 +00:00
|
|
|
.if t \{\
|
|
|
|
.ft CW
|
|
|
|
\}
|
|
|
|
.TS
|
|
|
|
l l.
|
|
|
|
symbol version
|
|
|
|
_
|
|
|
|
__kernel_rt_sigreturn LINUX_2.6
|
|
|
|
__kernel_sigreturn LINUX_2.6
|
|
|
|
__kernel_vsyscall LINUX_2.6
|
|
|
|
.TE
|
|
|
|
.if t \{\
|
|
|
|
.in
|
|
|
|
.ft P
|
|
|
|
\}
|
|
|
|
.SS i386 functions
|
|
|
|
.\" See linux/arch/x86/vdso/vdso32/vdso32.lds.S
|
2014-01-01 19:41:50 +00:00
|
|
|
The table below lists the symbols exported by the vDSO.
|
2014-01-01 08:25:39 +00:00
|
|
|
.if t \{\
|
|
|
|
.ft CW
|
|
|
|
\}
|
|
|
|
.TS
|
|
|
|
l l.
|
|
|
|
symbol version
|
|
|
|
_
|
|
|
|
__kernel_sigreturn LINUX_2.5
|
|
|
|
__kernel_rt_sigreturn LINUX_2.5
|
|
|
|
__kernel_vsyscall LINUX_2.5
|
2014-08-02 16:46:23 +00:00
|
|
|
.\" Added in 7a59ed415f5b57469e22e41fc4188d5399e0b194 and updated
|
|
|
|
.\" in 37c975545ec63320789962bf307f000f08fabd48.
|
2014-08-17 15:36:39 +00:00
|
|
|
__vdso_clock_gettime LINUX_2.6 (exported since Linux 3.15)
|
|
|
|
__vdso_gettimeofday LINUX_2.6 (exported since Linux 3.15)
|
|
|
|
__vdso_time LINUX_2.6 (exported since Linux 3.15)
|
2014-01-01 08:25:39 +00:00
|
|
|
.TE
|
|
|
|
.if t \{\
|
|
|
|
.in
|
|
|
|
.ft P
|
|
|
|
\}
|
clone.2, getcpu.2, shmget.2, syscall.2, dladdr.3, proc.5, vdso.7: Consistently use "x86-64", not "x86_64"
When referring to the architecture, consistently use "x86-64",
not "x86_64". Hitherto, there was a mixture of usages, with
"x86-64" predominant.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-10-18 07:19:34 +00:00
|
|
|
.SS x86-64 functions
|
2014-01-01 08:25:39 +00:00
|
|
|
.\" See linux/arch/x86/vdso/vdso.lds.S
|
2014-01-01 19:41:50 +00:00
|
|
|
The table below lists the symbols exported by the vDSO.
|
2014-01-01 08:25:39 +00:00
|
|
|
All of these symbols are also available without the "__vdso_" prefix, but
|
|
|
|
you should ignore those and stick to the names below.
|
|
|
|
.if t \{\
|
|
|
|
.ft CW
|
|
|
|
\}
|
|
|
|
.TS
|
|
|
|
l l.
|
|
|
|
symbol version
|
|
|
|
_
|
|
|
|
__vdso_clock_gettime LINUX_2.6
|
|
|
|
__vdso_getcpu LINUX_2.6
|
|
|
|
__vdso_gettimeofday LINUX_2.6
|
|
|
|
__vdso_time LINUX_2.6
|
|
|
|
.TE
|
|
|
|
.if t \{\
|
|
|
|
.in
|
|
|
|
.ft P
|
|
|
|
\}
|
|
|
|
.SS x86/x32 functions
|
|
|
|
.\" See linux/arch/x86/vdso/vdso32.lds.S
|
2014-01-01 19:41:50 +00:00
|
|
|
The table below lists the symbols exported by the vDSO.
|
2014-01-01 08:25:39 +00:00
|
|
|
.if t \{\
|
|
|
|
.ft CW
|
|
|
|
\}
|
|
|
|
.TS
|
|
|
|
l l.
|
|
|
|
symbol version
|
|
|
|
_
|
|
|
|
__vdso_clock_gettime LINUX_2.6
|
|
|
|
__vdso_getcpu LINUX_2.6
|
|
|
|
__vdso_gettimeofday LINUX_2.6
|
|
|
|
__vdso_time LINUX_2.6
|
|
|
|
.TE
|
|
|
|
.if t \{\
|
|
|
|
.in
|
|
|
|
.ft P
|
|
|
|
\}
|
|
|
|
.SS History
|
2014-01-01 10:14:33 +00:00
|
|
|
The vDSO was originally just a single function\(emthe vsyscall.
|
|
|
|
In older kernels, you might see that name
|
|
|
|
in a process's memory map rather than "vdso".
|
2014-01-10 19:04:54 +00:00
|
|
|
Over time, people realized that this mechanism
|
2014-01-01 10:14:33 +00:00
|
|
|
was a great way to pass more functionality
|
2014-01-01 08:25:39 +00:00
|
|
|
to user space, so it was reconceived as a vDSO in the current format.
|
|
|
|
.SH SEE ALSO
|
|
|
|
.BR syscalls (2),
|
|
|
|
.BR getauxval (3),
|
|
|
|
.BR proc (5)
|
environ.7, epoll.7, feature_test_macros.7, futex.7, ip.7, ipv6.7, locale.7, man-pages.7, man.7, math_error.7, netdevice.7, netlink.7, packet.7, raw.7, rtld-audit.7, rtnetlink.7, sock_diag.7, socket.7, tcp.7, udp.7, udplite.7, unix.7, uri.7, vdso.7: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 01:01:48 +00:00
|
|
|
.PP
|
2014-01-01 10:14:33 +00:00
|
|
|
The documents, examples, and source code in the Linux source code tree:
|
ioctl_console.2, ioctl_getfsmap.2, ioctl_iflags.2, ioctl_list.2, ioctl_ns.2, kcmp.2, kexec_load.2, keyctl.2, link.2, mmap.2, modify_ldt.2, msgctl.2, poll.2, query_module.2, quotactl.2, recv.2, recvmmsg.2, sched_setscheduler.2, seccomp.2, select.2, semctl.2, semop.2, send.2, set_thread_area.2, setns.2, shmctl.2, shmget.2, sigaction.2, sysinfo.2, timer_create.2, timerfd_create.2, uname.2, unshare.2, userfaultfd.2, ustat.2, utimensat.2, vmsplice.2, wait.2, adjtime.3, backtrace.3, bswap.3, btree.3, clock_getcpuclockid.3, confstr.3, dbopen.3, dl_iterate_phdr.3, dlinfo.3, duplocale.3, encrypt.3, end.3, endian.3, err.3, errno.3, fmemopen.3, fopencookie.3, frexp.3, fts.3, ftw.3, getaddrinfo.3, getaddrinfo_a.3, getcontext.3, getgrouplist.3, getifaddrs.3, getipnodebyname.3, getnameinfo.3, getopt.3, getprotoent_r.3, getpwent_r.3, getrpcent.3, getservent_r.3, getttyent.3, getumask.3, glob.3, gnu_get_libc_version.3, hash.3, hsearch.3, inet.3, inet_pton.3, insque.3, isalpha.3, makecontext.3, mallopt.3, mbstowcs.3, mcheck.3, memchr.3, mq_getattr.3, mq_open.3, mtrace.3, newlocale.3, ntp_gettime.3, offsetof.3, posix_openpt.3, printf.3, pthread_setname_np.3, pthread_setschedparam.3, rpc.3, scanf.3, sched_getcpu.3, sem_wait.3, setaliasent.3, sigqueue.3, sigvec.3, stdarg.3, strcat.3, strcpy.3, strftime.3, strtol.3, toupper.3, ttyslot.3, fuse.4, loop.4, st.4, elf.5, cgroup_namespaces.7, cgroups.7, feature_test_macros.7, inode.7, inotify.7, keyrings.7, man-pages.7, math_error.7, mount_namespaces.7, mq_overview.7, pthreads.7, sched.7, session-keyring.7, udplite.7, unix.7, vdso.7: Use consistent markup for code snippets
The preferred form is
.PP/.IP
.in +4n
.EX
<code>
.EE
.in
.PP/.IP
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-18 19:37:55 +00:00
|
|
|
.PP
|
2014-01-01 10:14:33 +00:00
|
|
|
.in +4n
|
ioctl_console.2, ioctl_getfsmap.2, ioctl_iflags.2, ioctl_list.2, ioctl_ns.2, kcmp.2, kexec_load.2, keyctl.2, link.2, mmap.2, modify_ldt.2, msgctl.2, poll.2, query_module.2, quotactl.2, recv.2, recvmmsg.2, sched_setscheduler.2, seccomp.2, select.2, semctl.2, semop.2, send.2, set_thread_area.2, setns.2, shmctl.2, shmget.2, sigaction.2, sysinfo.2, timer_create.2, timerfd_create.2, uname.2, unshare.2, userfaultfd.2, ustat.2, utimensat.2, vmsplice.2, wait.2, adjtime.3, backtrace.3, bswap.3, btree.3, clock_getcpuclockid.3, confstr.3, dbopen.3, dl_iterate_phdr.3, dlinfo.3, duplocale.3, encrypt.3, end.3, endian.3, err.3, errno.3, fmemopen.3, fopencookie.3, frexp.3, fts.3, ftw.3, getaddrinfo.3, getaddrinfo_a.3, getcontext.3, getgrouplist.3, getifaddrs.3, getipnodebyname.3, getnameinfo.3, getopt.3, getprotoent_r.3, getpwent_r.3, getrpcent.3, getservent_r.3, getttyent.3, getumask.3, glob.3, gnu_get_libc_version.3, hash.3, hsearch.3, inet.3, inet_pton.3, insque.3, isalpha.3, makecontext.3, mallopt.3, mbstowcs.3, mcheck.3, memchr.3, mq_getattr.3, mq_open.3, mtrace.3, newlocale.3, ntp_gettime.3, offsetof.3, posix_openpt.3, printf.3, pthread_setname_np.3, pthread_setschedparam.3, rpc.3, scanf.3, sched_getcpu.3, sem_wait.3, setaliasent.3, sigqueue.3, sigvec.3, stdarg.3, strcat.3, strcpy.3, strftime.3, strtol.3, toupper.3, ttyslot.3, fuse.4, loop.4, st.4, elf.5, cgroup_namespaces.7, cgroups.7, feature_test_macros.7, inode.7, inotify.7, keyrings.7, man-pages.7, math_error.7, mount_namespaces.7, mq_overview.7, pthreads.7, sched.7, session-keyring.7, udplite.7, unix.7, vdso.7: Use consistent markup for code snippets
The preferred form is
.PP/.IP
.in +4n
.EX
<code>
.EE
.in
.PP/.IP
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-18 19:37:55 +00:00
|
|
|
.EX
|
2014-01-01 08:25:39 +00:00
|
|
|
Documentation/ABI/stable/vdso
|
2014-01-01 10:14:33 +00:00
|
|
|
Documentation/ia64/fsys.txt
|
2014-01-01 08:25:39 +00:00
|
|
|
Documentation/vDSO/* (includes examples of using the vDSO)
|
2014-01-01 10:14:33 +00:00
|
|
|
|
2018-09-22 10:24:43 +00:00
|
|
|
find arch/ \-iname \(aq*vdso*\(aq \-o \-iname \(aq*gate*\(aq
|
execve.2, ioctl_console.2, ioctl_iflags.2, ioctl_ns.2, ioctl_userfaultfd.2, kcmp.2, kexec_load.2, keyctl.2, link.2, listxattr.2, membarrier.2, memfd_create.2, mmap.2, modify_ldt.2, mprotect.2, msgctl.2, nanosleep.2, open_by_handle_at.2, perf_event_open.2, poll.2, posix_fadvise.2, process_vm_readv.2, ptrace.2, query_module.2, quotactl.2, readdir.2, readv.2, recv.2, recvmmsg.2, request_key.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setattr.2, sched_setscheduler.2, seccomp.2, select.2, select_tut.2, semctl.2, semop.2, send.2, sendmmsg.2, set_thread_area.2, setns.2, shmctl.2, shmget.2, sigaction.2, sigaltstack.2, signal.2, sigwaitinfo.2, stat.2, statfs.2, statx.2, sync_file_range.2, syscall.2, sysctl.2, sysinfo.2, tee.2, timer_create.2, timer_settime.2, timerfd_create.2, unshare.2, userfaultfd.2, ustat.2, utime.2, utimensat.2, vmsplice.2, wait.2, adjtime.3, aio_init.3, backtrace.3, basename.3, bswap.3, btree.3, clock_getcpuclockid.3, cmsg.3, confstr.3, dbopen.3, dl_iterate_phdr.3, dladdr.3, dlinfo.3, dlopen.3, duplocale.3, encrypt.3, end.3, endian.3, err.3, errno.3, ether_aton.3, fgetgrent.3, fgetpwent.3, fmemopen.3, frexp.3, ftime.3, fts.3, getaddrinfo.3, getaddrinfo_a.3, getdate.3, getfsent.3, getgrent.3, getgrent_r.3, getgrnam.3, getgrouplist.3, gethostbyname.3, getifaddrs.3, getipnodebyname.3, getmntent.3, getnameinfo.3, getnetent.3, getopt.3, getprotoent.3, getprotoent_r.3, getpw.3, getpwent.3, getpwent_r.3, getpwnam.3, getrpcent.3, getservent.3, getservent_r.3, getspnam.3, getttyent.3, glob.3, gnu_get_libc_version.3, hash.3, hsearch.3, if_nameindex.3, inet.3, inet_net_pton.3, inet_pton.3, insque.3, isalpha.3, makecontext.3, mallinfo.3, malloc_info.3, mallopt.3, matherr.3, mbstowcs.3, mcheck.3, memchr.3, mq_getattr.3, mq_open.3, mq_receive.3, mq_send.3, mtrace.3, newlocale.3, ntp_gettime.3, posix_openpt.3, printf.3, pthread_attr_init.3, pthread_attr_setschedparam.3, pthread_cancel.3, pthread_cleanup_push.3, pthread_cleanup_push_defer_np.3, pthread_create.3, pthread_getattr_default_np.3, pthread_getattr_np.3, pthread_getcpuclockid.3, pthread_setname_np.3, pthread_setschedparam.3, pthread_sigmask.3, pthread_tryjoin_np.3, readdir.3, realpath.3, recno.3, regex.3, rpc.3, scanf.3, sched_getcpu.3, sem_wait.3, setaliasent.3, sigqueue.3, statvfs.3, strcat.3, strcpy.3, strftime.3, strtok.3, strtol.3, strverscmp.3, toupper.3, ttyslot.3, xdr.3, fuse.4, loop.4, rtc.4, st.4, acct.5, core.5, elf.5, slabinfo.5, aio.7, arp.7, capabilities.7, cgroup_namespaces.7, cgroups.7, ddp.7, fanotify.7, feature_test_macros.7, inode.7, inotify.7, ip.7, keyrings.7, locale.7, mount_namespaces.7, namespaces.7, netdevice.7, netlink.7, packet.7, pkeys.7, pthreads.7, sched.7, session-keyring.7, sock_diag.7, socket.7, spufs.7, udplite.7, unix.7, user_namespaces.7, vdso.7, x25.7, ld.so.8: Use consistent markup for code snippets
Change .nf/.fi to .EX/.EE
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-18 19:52:46 +00:00
|
|
|
.EE
|
2014-01-01 10:14:33 +00:00
|
|
|
.in
|