Commit Graph

7558 Commits

Author SHA1 Message Date
Michael Kerrisk 46dc0687e4 membarrier.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-12 13:37:28 +02:00
Michael Kerrisk 1afb17b76e membarrier.2: ffix code example
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-12 13:33:51 +02:00
Michael Kerrisk d8b2fd50e1 membarrier.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-12 13:33:51 +02:00
Michael Kerrisk e8edc8917c membarrier.2: Some wording improvements
I'll pass these to Mathieu Desnoyers for checking

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-12 13:32:51 +02:00
Michael Kerrisk 13d4ca14fa membarrier.2: Minor tweaks to Mathieu Desnoyers' patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-12 13:12:18 +02:00
Michael Kerrisk 26fac2d02f membarrier.2: Add kernel version for MEMBARRIER_CMD_QUERY and MEMBARRIER_CMD_SHARED
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-12 13:06:30 +02:00
Michael Kerrisk 7fb5be1530 membarrier.2: Minor tweaks to MEMBARRIER_CMD_SHARED text
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-12 13:06:30 +02:00
Michael Kerrisk 988a9c360d membarrier.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-12 13:06:30 +02:00
Michael Kerrisk 8fb5a3b5b2 membarrier.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-12 13:06:30 +02:00
Michael Kerrisk 8d23228ca6 membarrier.2: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-12 13:06:30 +02:00
Mathieu Desnoyers f5a563c0c4 membarrier.2: Document new membarrier commands introduced in Linux 4.16
Document the following membarrier commands introduced in
Linux 4.16:

    MEMBARRIER_CMD_GLOBAL_EXPEDITED
        (the old enum label MEMBARRIER_CMD_SHARED is now an
        alias to preserve header backward compatibility)
    MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED
    MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE
    MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_SYNC_CORE

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Michael Kerrisk <mtk.manpages@gmail.com>
CC: Ingo Molnar <mingo@redhat.com>
CC: Peter Zijlstra <peterz@infradead.org>
CC: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-12 13:06:24 +02:00
Michael Kerrisk 2f72816f86 io_submit.2: Add kernel version numbers for various 'aio_rw_flags' flags
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-12 11:19:39 +02:00
Michael Kerrisk 21487837da readv.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-12 11:10:41 +02:00
Michael Kerrisk df5507b137 readv.2: Remove redundant sentence
The sentence is out of place, and probably doesn't really add to
the understanding already provided by the rest of the text

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-12 11:09:33 +02:00
Michael Kerrisk a6b64be7b1 readv.2: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-12 11:09:23 +02:00
Michael Kerrisk 9d2d82ffe2 io_submit.2: Place 'aio_rw_flags' in alphabetical order
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-12 11:08:22 +02:00
Michael Kerrisk c00234733f io_submit.2: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-12 11:06:12 +02:00
Jürg Billeter 7ac27e31b0 readv.2, io_submit.2: Document RWF_APPEND added in Linux 4.16
Signed-off-by: Jürg Billeter <j@bitron.ch>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-12 10:59:43 +02:00
Michael Kerrisk 6170a241ea perf_event_open.2: Minor tweak to Song Liu's kprobe/uprobe patch: fix kernel version
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-12 10:24:19 +02:00
Michael Kerrisk c87e72a27c perf_event_open.2: Minor tweaks to Song Liu's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-12 10:24:19 +02:00
Song Liu 7d8449ba19 perf_event_open.2: Add type kprobe and uprobe
Two new types kprobe and uprobe are being added to
perf_event_open(), which allow creating kprobe or
uprobe with perf_event_open. This patch adds
information about these types.

Signed-off-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-12 10:24:19 +02:00
Michael Kerrisk 95b9ecbf9d mmap.2: Explicitly mention MAP_FIXED_NOREPLACE in EEXIST description
Reported-by: Jann Horn <jannh@google.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-12 10:08:17 +02:00
Michael Kerrisk 421508eba8 mmap.2: Minor wording fix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-12 10:03:04 +02:00
Michael Kerrisk a7a21482a1 mmap.2: Add a little historical detail on the obsolete MAP_DENYWRITE
In Linux 2..0, do_mmap() had the following check:

                if (flags & MAP_DENYWRITE) {
                        if (file->f_inode->i_writecount > 0)
                                return -ETXTBSY;
                }

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-12 10:03:04 +02:00
Michael Kerrisk 0113b28739 mmap.2: Minor rewording of MAP_FIXED text
The paragraph break-up of the existing text was
somewhat unnatural.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-12 10:03:04 +02:00
Michael Kerrisk 73cb50e21b mmap.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-12 10:03:04 +02:00
Michael Kerrisk 3a548c59d9 mmap.2: Minor tweaks to Michal Hocko's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-12 10:03:04 +02:00
Michael Kerrisk 509935b7de mmap.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-12 10:03:04 +02:00
Michael Kerrisk 007d7833b0 mmap.2: srcfix: rewrap source lines
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-12 10:03:04 +02:00
Michael Kerrisk 228d889fc7 mmap.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-12 10:03:04 +02:00
Michal Hocko c6a51c0645 mmap.2: Document new MAP_FIXED_NOREPLACE flag
4.17+ kernels offer a new MAP_FIXED_NOREPLACE flag which allows
the caller to atomically probe for a given address range.

[wording heavily updated by John Hubbard]

Cowritten-by: John Hubbard <jhubbard@nvidia.com>
Signed-off-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-12 10:02:58 +02:00
Michael Kerrisk 218d4d5b2e wait4.2: Soften the warning against the use of wait3()/wait4()
These functions are nonstandard, but there is no replacement.

See https://bugzilla.kernel.org/show_bug.cgi?id=199215

Reported-by: Martin Mares <mj@ucw.cz>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-01 04:59:48 +02:00
Jann Horn 19d371260e open.2: Document more -ETXTBSY conditions
The first one happens in
do_filp_open -> path_openat -> do_last -> handle_truncate -> do_truncate
-> notify_change -> simple_setattr -> setattr_prepare -> inode_newsize_ok.

Demo:

[...]
[...]
[...]
open("/x", O_WRONLY|O_CREAT|O_TRUNC, 0666) = -1 ETXTBSY (Text file busy)
[...]
[...]
open("/x", O_WRONLY|O_CREAT, 0666)      = 3
dup2(3, 1)                              = 1
close(3)                                = 0
read(0, "\0\0\0\0[...]"..., 512) = 512
write(1, "\0\0\0\0[...]"..., 512) = 512
[...]

The second one is in kernel_read_file -> deny_write_access.

Signed-off-by: Jann Horn <jannh@google.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-03-27 22:19:49 +02:00
Michael Kerrisk 6bd80e8b63 clone.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-03-16 08:50:36 +01:00
Michael Kerrisk 82f9cb98f6 clone.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-03-16 08:50:36 +01:00
Michael Kerrisk ecf0eb2435 getrlimit.2: CAP_SYS_RESOURCE capability is required in *initial user namespace*
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-03-16 08:50:36 +01:00
Michael Kerrisk 30c5868ea4 seccomp.2: Note which architectures support seccomp BPF
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-03-16 08:50:36 +01:00
Michael Kerrisk d0eae5b5e0 seccomp.2: wfix: s/prctl/ptrace/
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-03-16 08:50:36 +01:00
Michael Kerrisk f36293a2df seccomp.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-03-16 08:50:36 +01:00
Michael Kerrisk 84819acab3 mount.2: Remove a couple of obsolete EBUSY errors
As far as I can tell, these EBUSY errors disappeared
with the addition of stackable mounts in Linux 2.4.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-03-16 08:50:35 +01:00
Michael Kerrisk 2b623a23a7 bpf.2: Update list of architectures that support JITed eBPF
And note kernel version numbers where support is added.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-03-16 08:50:35 +01:00
Michael Kerrisk 5a29959a67 bpf.2: Kernel 4.15 added CONFIG_BPF_JIT_ALWAYS_ON
This causes the JIT compiler to be always on and
forces bpf_jit_enable to 1.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-03-16 08:50:25 +01:00
Michael Kerrisk 036b0619f7 seccomp.2: Note that execve() may change syscall numbers during life of process
On a multiarch/multi-ABI platform such as modern x86, each
architecture/ABI (x86-64, x32, i386)has its own syscall numbers,
which means a seccomp() filter may see different syscall numbers
over the life of the process if that process uses execve() to
execute programs that has a different architectures/ABIs.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-03-05 12:55:50 +01:00
Michael Kerrisk a3dcaaa2ba seccomp.2: in EXAMPLE, clearly note that x32 syscalls are >= X32_SYSCALL_BIT
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-03-05 12:55:50 +01:00
Michael Kerrisk 050f349421 mount.2: ERRORS: add EBUSY for the case of trying to stack same mount twice
It is not possible to consecutively stack mounts of the
same source+target inside the same mount namespace.

For example, if procfs was already mounted against /proc in
this mount namespace:

    $ sudo mount -t proc none /proc
    mount: /proc: none already mounted or mount point busy.

See the following code in fs/namespace.c:

        /* Refuse the same filesystem on the same mount point */
        err = -EBUSY;
        if (path->mnt->mnt_sb == newmnt->mnt.mnt_sb &&
            path->mnt->mnt_root == path->dentry)
                goto unlock;

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-03-05 12:55:50 +01:00
Michael Kerrisk 365a54c70b mmap.2: Clarify that when addr==NULL, address chosen by kernel is page-aligned
Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-02-24 19:34:28 +01:00
Michael Kerrisk 9c8ed83514 wait.2: wait() and waitpid() block the calling thread (not process)
Reported-by: Robin Kuzmin <kuzmin.robin@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-02-24 19:02:50 +01:00
Mattias Andrée f3e8dec6c7 recvmmsg.2: tfix
recvmmsq -> recvmmsg

Signed-off-by: Mattias Andrée <maandree@kth.se>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-02-24 18:59:42 +01:00
Adam Borowski 89c2d890df syscall.2: Add riscv
Signed-off-by: Adam Borowski <kilobyte@angband.pl>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-02-24 18:54:02 +01:00
Michael Kerrisk 511e0bd08b fallocate.2: Since Linux 4.16, Btrfs supports FALLOC_FL_ZERO_RANGE
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-02-19 18:51:07 +01:00