.\" http://www.linuxjournal.com/content/creating-vdso-colonels-other-chicken
.\" http://www.trilithium.com/johan/2005/08/linux-gate/
.\"
-.TH VDSO 7 2016-05-09 "Linux" "Linux Programmer's Manual"
+.TH VDSO 7 2019-08-02 "Linux" "Linux Programmer's Manual"
.SH NAME
vdso \- overview of the virtual ELF dynamic shared object
.SH SYNOPSIS
Note that the terminology can be confusing.
On x86 systems, the vDSO function
used to determine the preferred method of making a system call is
-named "__kernel_vsyscall", but on x86_64,
+named "__kernel_vsyscall", but on x86-64,
the term "vsyscall" also refers to an obsolete way to ask the kernel
what time it is or what CPU the caller is on.
.PP
it will automatically compile and link the vDSO code for you.
You will frequently find it under the architecture-specific directory:
.PP
- find arch/$ARCH/ -name '*vdso*.so*' -o -name '*gate*.so*'
+ find arch/$ARCH/ \-name \(aq*vdso*.so*\(aq \-o \-name \(aq*gate*.so*\(aq
.\"
.SS vDSO names
The name of the vDSO varies across architectures.
l l.
user ABI vDSO name
_
-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
-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
+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
+riscv linux\-vdso.so.1
+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
.TE
.if t \{\
.in
.ft P
\}
-.SS strace(1) and the vDSO
+.SS strace(1), seccomp(2), and the vDSO
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.
+Those system calls will likewise not be visible to
+.BR seccomp (2)
+filters.
.SH ARCHITECTURE-SPECIFIC NOTES
The subsections below provide architecture-specific notes
on the vDSO.
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
-an i386 32-bit kernel or under an x86_64 64-bit kernel.
+an i386 32-bit kernel or under an x86-64 64-bit kernel.
Therefore, the name of the user-space ABI should be used to determine
which of the sections below is relevant.
.SS ARM functions
.in
.ft P
\}
-.SS bfin (Blackfin) functions
+.SS bfin (Blackfin) functions (port removed in Linux 4.17)
.\" See linux/arch/blackfin/kernel/fixed_code.S
.\" See http://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:fixed-code
As this CPU lacks a memory management unit (MMU),
.SS parisc (hppa) functions
.\" See linux/arch/parisc/kernel/syscall.S
.\" See linux/Documentation/parisc/registers
-The parisc port has a code page full of utility functions
+The parisc port has a code page with utility functions
called a gateway page.
Rather than use the normal ELF auxiliary vector approach,
it passes the address of
l l.
offset function
_
-00b0 lws_entry
-00e0 set_thread_pointer
+00b0 lws_entry (CAS operations)
+00e0 set_thread_pointer (used by glibc)
0100 linux_gateway_entry (syscall)
-0268 syscall_nosys
-0274 tracesys
-0324 tracesys_next
-0368 tracesys_exit
-03a0 tracesys_sigexit
-03b8 lws_start
-03dc lws_exit_nosys
-03e0 lws_exit
-03e4 lws_compare_and_swap64
-03e8 lws_compare_and_swap
-0404 cas_wouldblock
-0410 cas_action
.TE
.if t \{\
.in
.I __kernel_clock_gettime
interfaces;
the kernel falls back to the real system call.
+.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
+\}
.SS s390 functions
.\" See linux/arch/s390/kernel/vdso32/vdso32.lds.S
The table below lists the symbols exported by the vDSO.
.in
.ft P
\}
-.SS x86_64 functions
+.SS x86-64 functions
.\" See linux/arch/x86/vdso/vdso.lds.S
The table below lists the symbols exported by the vDSO.
All of these symbols are also available without the "__vdso_" prefix, but
Documentation/ia64/fsys.txt
Documentation/vDSO/* (includes examples of using the vDSO)
-find arch/ -iname '*vdso*' -o -iname '*gate*'
+find arch/ \-iname \(aq*vdso*\(aq \-o \-iname \(aq*gate*\(aq
.EE
.in