Commit Graph

7926 Commits

Author SHA1 Message Date
Tycho Andersen 7827e1766e unshare.2: Note EINVAL when unsharing pid ns twice
The kernel doesn't allow unsharing a pid NS if it has previously been
unshared, per this check in copy_pid_ns:

        if (task_active_pid_ns(current) != old_ns)
                return ERR_PTR(-EINVAL);

so let's note that.

Signed-off-by: Tycho Andersen <tycho@tycho.ws>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-09-29 00:02:44 +02:00
Michael Kerrisk ad9533eb9e stat.2: ERRORS: ENOENT can occur where a path component is a dangling symlink
See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=909789

Reported-by: Alessandro Vesely <vesely@tana.it>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-09-29 00:02:44 +02:00
Michael Kerrisk 33909153e9 stat.2: Minor fix: split distinct ENOENT cases into separate list entries
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-09-29 00:02:44 +02:00
Michael Kerrisk 115bbafa8b open.2: Minor fix: split distinct ENOENT cases into separate list entries
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-09-28 21:48:59 +02:00
Michael Kerrisk 503e378203 epoll_ctl.2: Minor rewording: split a long paragraph
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-09-16 01:23:15 +02:00
Michael Kerrisk d4dca6b626 fcntl.2: Actual pipe capacity may in practice be less than nominal capacity
The number of bytes that can be written to the pipe may be less
(sometimes substantially less) than the nominal capacity. This
was confirmed with some testing. For example, when writing
4097-byte blocks to a pipe with 65536 byte capacity, only 45066
bytes could be written (i.e., 20470 bytes less than 65536).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-09-12 17:21:30 +02:00
Michael Kerrisk f957eebd2d clone.2: Clarify the discussion of threads and signals
And explicitly introduce the terms "process-directed" and
"thread-directed" signals.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-09-10 11:26:34 +02:00
Michael Kerrisk 475c27532a clone.2: Rework discussion of threads and signals
The discussion is phrased in terms of signals send using kill(2),
but applies equally to a signal sent by the kernel.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-09-10 11:08:31 +02:00
Joseph C. Sible d6d367c7e8 memfd_create.2: _GNU_SOURCE is required
The memfd_create function and its corresponding constants have
required _GNU_SOURCE for as long as they've been in glibc.

Signed-off-by: Joseph C. Sible <josephcsible@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-09-06 23:24:05 +02:00
Jakub Wilk 46183bb06e mount.2: tfix
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-09-06 23:18:06 +02:00
Jakub Wilk 85bb10dfc9 connect.2: tfix
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-09-06 23:17:36 +02:00
Johannes Liebermann 4aa2afed6c reboot.2: Johannes Liebermann <johanan.liebermann@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-09-05 08:52:33 +02:00
Michael Kerrisk 534d8bf8c3 socket.2: Minor tweaks to Tobias Klauser's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-26 13:47:18 +02:00
Tobias Klauser 9eadb32789 socket.2: Document AF_XDP
Document AF_XDP added in Linux 4.18.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-26 13:41:49 +02:00
Michael Kerrisk 55dc41dca7 connect.2: srcfix: rewrap source lines
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-26 13:41:23 +02:00
Benjamin Peterson 1466257758 connect.2: Document error semantics of nonblocking UNIX domain sockets
connect(2) on a nonblocking UNIX domain socket when the receive
queue is full results in EAGAIN [1]. This is unlike other
connection-based socket families that return EINPROGRESS as
already documented.

mtk: confirmed with some light testing. And in
net/unix/af_unix.c::unix_stream_connect(), we have:

        if (unix_recvq_full(other)) {
                err = -EAGAIN;
                if (!timeo)
                        goto out_unlock;

Signed-off-by: Benjamin Peterson <benjamin@python.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-26 13:35:06 +02:00
Michael Kerrisk fa38cc321f mmap.2: Minor rewording
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-26 13:29:58 +02:00
Elliott Hughes 3ee0a7f07e mmap.2: Explicitly state that the fd can be closed
I regularly see excessive fd usage bugs (or even leaks) caused by
people who think they need to keep the fd open as long as the
mapping exists.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-26 13:14:33 +02:00
Joseph Sible dc9b6c9285 pivot_root.2: Document EINVAL if root is rootfs
Per the comment on the pivot_root syscall in fs/namespace.c:

    Also, the current root cannot be on the 'rootfs'
    (initial ramfs) filesystem.  See
    Documentation/filesystems/ramfs-rootfs-initramfs.txt
    for alternatives in this situation.

Signed-off-by: Joseph C. Sible <josephcsible@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-26 12:08:56 +02:00
Michael Kerrisk b8433813dd wait.2: Add some cross references to core(5)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-21 11:51:09 +02:00
Hiroya Ito 6699401be6 sigaltstack.2: tfix
MINSTKSZ is not defined anywhere, MINSIGSTKSZ seems valid instead.

Signed-off-by: Hiroya Ito <hiroyan@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-21 10:38:47 +02:00
Michael Kerrisk 849971a10c mount.2: Add MS_STRICTATIME to list of flags that can be used in remount
Reported-by: Simone Piccardi <piccardi@truelite.it>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-20 17:17:06 +02:00
Michael Kerrisk 38ea2e7662 mount.2: Clarify that per-superblock flags are shared during remount
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-20 17:17:06 +02:00
Michael Kerrisk f66b1d8b2e mount.2: Attempts to change MS_SILENT setting during remount are silently ignored
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-20 17:17:06 +02:00
Michael Kerrisk 63b0b1a341 mount.2: Clearly distinguish per-mount-point vs per-superblock mount flags
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-20 17:17:06 +02:00
Michael Kerrisk 2008f97d6f mount.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-20 17:17:06 +02:00
Michael Kerrisk 182c1e839c mount.2: MS_SILENT is ignored when changing propagation type
MS_SILENT can be specified when changing propagation type,
but is ignored, as far as I can see from reading the code.
(The flags are passed to do_change_type(), which, as well
as the propagation flags, allows MS_REC and MS_SILENT
(in flags_to_propagation_type()), but does noting with
MS_SILENT. (Linux 4.17 source)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-20 17:17:06 +02:00
Michael Kerrisk 158c5bc0f0 mount.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-20 17:17:06 +02:00
Michael Kerrisk fca61050bf mount.2: Minor rewording
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-20 16:04:06 +02:00
Michael Kerrisk 3d17f2f05c mount.2: Remove crufty sentence about MS_BIND + MS_REMOUNT
This sentence is left over from an earlier rewrite of the text,
and the relevant details are covered a few paragraphs later.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-20 16:04:06 +02:00
Michael Kerrisk e0a21e1338 mount.2: srcfix 2018-08-20 16:04:06 +02:00
Michael Kerrisk fa4c100d8d mount.2: srcfix: update FIXME
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-20 16:04:06 +02:00
Michael Kerrisk a6bfc7571b mount.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-20 16:04:06 +02:00
Michael Kerrisk 18132fd6f7 mount.2: SEE ALSO: add ioctl_iflags(2)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-20 16:04:06 +02:00
Michael Kerrisk 495a1a8988 mount.2: srcfix: add FIXME
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-20 16:04:06 +02:00
Michael Kerrisk 41976bc5f3 mount.2: Mandatory locking also now requires CONFIG_MANDATORY_FILE_LOCKING
This is so since Linux 4.5. See the definition of may_mandlock()
in fs/namespace.c.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-20 16:04:06 +02:00
Michael Kerrisk 054ea65ed8 mount.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-20 16:04:06 +02:00
Michael Kerrisk e56ab30d61 mount.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-20 14:45:21 +02:00
Michael Kerrisk 5ea1abf88b mount.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-20 14:45:21 +02:00
Tobias Klauser 2763b5b0d4 rename.2: Add feature test macro for renameat2()
The glibc wrapper for renameat2() was added in glibc 2.28 and
requires _GNU_SOURCE.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-20 14:45:21 +02:00
Michael Kerrisk a126815556 io_submit.2: Minor tweaks to Adam Manzanares' patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-13 17:07:01 +02:00
Michael Kerrisk 8092a5c8b5 io_submit.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-13 17:04:28 +02:00
Adam Manzanares 5402820052 io_submit.2: Document IOCB_FLAG_IOPRIO
The newly added IOCB_FLAG_IOPRIO aio_flag introduces new behaviors
and return values.

The details of this new feature are posted here:
https://lkml.org/lkml/2018/5/22/809

Signed-off-by: Adam Manzanares <adam.manzanares@wdc.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-13 17:01:14 +02:00
Vince Weaver 43cc0d8ab1 perf_event_open.2: Document the PERF_EVENT_IOC_QUERY_BPF ioctl
The PERF_EVENT_IOC_QUERY_BPF ioctl was introduced in Linux 4.16.

Signed-off-by: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-13 16:27:01 +02:00
Michael Kerrisk 92e696b95d perf_event_open.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-13 16:21:43 +02:00
Vince Weaver 8496491d55 perf_event_open.2: Document the PERF_EVENT_IOC_MODIFY_ATTRIBUTES ioctl
The PERF_EVENT_IOC_MODIFY_ATTRIBUTES ioctl was introduced in
Linux 4.17.  It currently only works on breakpoint events.

Signed-off-by: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-13 16:20:39 +02:00
Vince Weaver 06a61b360b perf_event_open.2: Document the PERF_EVENT_IOC_PAUSE_OUTPUT ioctl
The PERF_EVENT_IOC_PAUSE_OUTPUT ioctl was introduced in Linux 4.7.

I've have this patch for a long time, I apologize for the delay
in getting it submitted.  I've made some minor changes to the
original patch proposed by Wang Nan.

Signed-off-by: Wang Nan <wangnan0@huawei.com>
Reviewed-by: Vince Weaver <vincent.weaver@maine.edu>

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-13 16:04:06 +02:00
Vince Weaver 38b581e851 perf_event_open.2: Clarify exclude_idle
It turns out no one is really sure what the perf_event_open.2
exclude_idle field is supposed to do, and a recent thread on the
linux-kernel list:
	[RFC] perf/core: what is exclude_idle supposed to do
did not really clarify things.

I think the following adjustment to the page clarifies things
at least a little.

Signed-off-by: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-13 15:58:14 +02:00
Vince Weaver d134c42971 perf_event_open.2: Fix prctl behavior description
Some discussion on the linux-perf-users list has turned up that
the perf_event_open.2 description of how
PR_TASK_PERF_EVENTS_ENABLE / PR_TASK_PERF_EVENTS_DISABLE prctl()
works is misleading.

The descriptions were based on the tools/perf/design.txt document
which describes behavior that was removed in 082ff5a2767a06 (prior
to 2.6.31, the first release with perf_event_open support).

I have written some tests in my perf_event_tests testsuite that
verifies the behavior of prctl() in this case.

Signed-off-by: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-13 15:50:01 +02:00
Michael Kerrisk 4167f63f52 bpf.2: srcfix: fix typo in kernel version revied for JIT compiler source
Reported-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-09 21:06:52 +02:00
Michael Kerrisk 6d2ac026e8 bpf.2: Minor tweaks to Tobias Klauser's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-09 15:49:18 +02:00
Tobias Klauser c3a428409a bpf.2: Update JIT support list for Linux 4.18
JIT support for x86-32 was during the Linux 4.18 release cycle.
Also correct the entry for MIPS (only MIPS64 is supported).

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-09 15:43:08 +02:00
Michael Kerrisk b94a87a5b8 vmsplice.2: Minor tweaks to Andrei's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-07 14:34:28 +02:00
Andrei Vagin dc7b1aaba0 vmsplice.2: Note that vmsplice can splice pages from pipe to memory
The man page notes that vmsplice() can splice pages from memory
to a pipe, but it can work in the other direction as well.

Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Andrei Vagin <avagin@openvz.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-07 14:30:16 +02:00
Tobias Klauser 80a122fc81 rename.2: renameat2() now has a glibc wrapper; remove mention of syscall(2)
The glibc wrapper was added in glibc 2.28

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-06 21:42:27 +02:00
Tobias Klauser a56f7ab394 statx.2: statx() now has a glibc wrapper; remove mention of syscall(2)
The glibc wrapper was added in glibc 2.28

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-06 21:42:04 +02:00
Lucas De Marchi 6971614d3b memfd_create.2: Fix header for memfd_create()
sys/memfd.h doesn't exist. memfd_create() is declared in
sys/mman.h and some flags are available only in linux/memfd.h.

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-04 12:34:09 +02:00
Mark Schott 956dc82722 sched_yield.2: tfix
Reported-by: Luka Macan <Luka.Macan@fer.hr>
Change "read-time" to "real-time".

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-03 16:07:59 +02:00
Michael Kerrisk 92e7c0c6fa perf_event_open.2: ffix
Reported-by: Sam Varshavchik <mrsam@courier-mta.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-03 15:55:35 +02:00
Michael Kerrisk 30fd4d6865 seccomp.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-03 15:53:03 +02:00
Michael Kerrisk c36ac88feb bpf.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-03 15:53:03 +02:00
Michael Kerrisk 32af2a80e2 perf_event_open.2: tfix
Reported-by: Sam Varshavchik <mrsam@courier-mta.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-08-03 15:40:33 +02:00
Michael Kerrisk 2337d75ee0 seccomp.2: SEE ALSO: add bpfc(1)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-07-31 17:19:35 +02:00
Michael Kerrisk 1f1c28e0a9 unshare.2: Same EINVAL errors as for clone(2) can also occur with unshare(2)
The EINVAL errors that can occur for clone(2) when it is called
with various CLONE_NEW* flags and the kernel was not configured
with support for the corresponding namespace can also occur for
unshare(2).  (As far as I can see, these errors don't occur for
either clone(2) or unshare(2) when it comes to CLONE_NEWNS and
CLONE_NEWCGROUP.)

Reported-by: Shawn Landden <shawn@git.icu>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-07-28 20:54:01 +02:00
Michael Kerrisk 231d0bbe7e clone.2: ERRORS: EINVAL occurs with CLONE_NEWUSER if !CONFIG_USER_NS
Note that EINVAL can occur with CLONE_NEWUSER if the kernel was
not configured with CONFIG_USER_NS.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-07-28 20:38:03 +02:00
Michael Kerrisk 832fe8eab7 clone.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-07-28 20:37:04 +02:00
Michael Kerrisk 3f796b3817 select_tut.2: Diagnose inet_aton() errors with simple fprintf() (not perror())
When it fails, inet_aton() does not set errno, so using
perror() is not appropriate.

Reported-by: Antonio Chirizzi <antonio.chirizzi@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-07-20 22:29:35 +02:00
Michael Kerrisk bdf4703297 chroot.2: Mention /proc/[pid]/root
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-07-18 21:41:03 +02:00
Michael Kerrisk e06763febd statx.2: Library support for statx() was added in glibc 2.28
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-07-17 12:33:21 +02:00
Michael Kerrisk 3678dcc906 rename.2: glibc 2.28 adds library support for renameat2()
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-07-17 12:32:29 +02:00
Michael Kerrisk ba9fc3e1b2 send.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-07-15 08:59:08 +02:00
Michael Kerrisk 418dd92c03 recv.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-07-15 08:58:37 +02:00
Michael Kerrisk 3ef2a133bf mount.2: Mention /proc/PID/mountinfo
Many people are unaware of the /proc/PID/mountinfo file. Provide
a helpful clue here.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-07-13 07:14:33 +02:00
Michael Kerrisk 400388b54b seccomp.2: wfix (to make it clearer at that seccomp affects threads)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-07-11 08:17:30 +02:00
Michael Kerrisk 86ce931e7c recv.2: wfix: s/data were/data was/
Majority usage in English sometime ago decided that "data" is
a singular noun.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-07-10 07:14:50 +02:00
Michael Kerrisk 422c110ccb keyctl.2: srcfix: add FIXME
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-07-02 15:05:12 +02:00
Michael Kerrisk 590ba7e5d0 open_by_handle_at.2, ctermid.3, getcwd.3, proc.5: Wording fix: prefer "pathname" over "path" 2018-06-26 06:47:26 +02:00
Michael Kerrisk f6d844a916 epoll_ctl.2: Minor wording improvements
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-06-22 12:36:53 +02:00
Michael Kerrisk a16ce618a8 epoll_ctl.2: Use the term "interest list" consistently
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-06-22 12:34:53 +02:00
Michael Kerrisk fc9294cb6f epoll_wait.2: Note that epoll_wait() round robins through the set of ready descriptors
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-06-22 12:20:25 +02:00
Michael Kerrisk e3a60d1ce2 epoll_wait.2: Clarify the behavior when epoll_wait()-ing on an empty interest list
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-06-22 12:20:25 +02:00
Mihir Mehta 4f4b395de2 pread.2: wfix
Fix a typographical error

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-06-21 19:27:54 +02:00
Michael Kerrisk be914947a7 select.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-06-12 06:01:32 +02:00
Michael Kerrisk 4c974cbac6 select.2: BUGS: the use of value-result arguments is a design bug
The use of value-result arguments is a design bug that is
not suffered by poll(2).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-06-01 09:08:28 +02:00
Michael Kerrisk 8b5bbcfabc open.2: Minor wording fix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-31 21:34:32 +02:00
Lucas Werkmeister 71b12d0a57 open.2: Document ENXIO for sockets
Linux returns ENXIO when attempting to open() a UNIX domain socket.
Kernel-wise, I believe this happens in fs/inode.c [1], where a constant
`no_open` function returning -ENXIO is registered as the default open()
handler for inodes in inode_init_always(), and is not specialized in
nit_special_inode() as it is for other types.

Seen in the systemd v238 source code [2].

[1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/fs/inode.c?h=v4.16
[2]: https://github.com/systemd/systemd/blob/v238/src/core/execute.c#L412

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-31 21:34:32 +02:00
Michael Kerrisk 6a4c997189 pkey_alloc.2: Switch to glibc prototype in SYNOPSIS
In the kernel, the type of the arguments to pkey_alloc() is
"unsigned long" and that's what the page documented until now.
Now that glibc support is added for pkey_alloc(), switch to the
glibc prototype, which uses "unsigned int".

Reported-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-31 21:34:32 +02:00
Jakub Wilk f9d9ad2163 setns.2: tfix
Remove duplicated word.

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-31 07:58:06 +02:00
Michael Kerrisk dd08fccaae prctl.2: Add kernel version for PR_GET_SPECULATION_CTRL + PR_SET_SPECULATION_CTRL
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-28 13:52:41 +02:00
Michael Kerrisk a01c1cbcc3 prctl.2: Various fixups to Konrad Rzeszutek Wilk's text
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-28 13:50:07 +02:00
Michael Kerrisk 2feab5d3b1 prctl.2: Minor fixups
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-28 12:57:30 +02:00
Michael Kerrisk ac3756bc53 prctl.2: srcfix: rewrap source lines
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-28 12:57:30 +02:00
Michael Kerrisk e36dfb8186 prctl.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-28 12:57:30 +02:00
Konrad Rzeszutek Wilk e23acd79f9 prctl.2: Document PR_SET_SPECULATION_CTRL and PR_GET_SPECULATION_CTRL
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-28 11:59:26 +02:00
Goldwyn Rodrigues ebf120124b write.2: Partial direct I/O writes
Direct writes can perform partial writes because large writes
can be broken into smaller chunks by the block layer. Part of
the I/O submitted can fail and the failure is returned to write
as an error in the return value. However, part of the write can
be successful which means that data at the offset is inconsistent.

Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-28 11:34:34 +02:00
Michael Kerrisk e795580f53 select.2: Note that select() and pselect() are not affected by O_NONBLOCK
Reported-by: Robin Kuzmin <kuzmin.robin@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-18 11:01:16 +02:00
Michael Kerrisk 15e68be637 poll.2: Note that poll() and ppoll() are not affected by O_NONBLOCK
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-18 11:00:04 +02:00
Michael Kerrisk 3897a3f89f open.2: Clarify a special use case of O_NONBLOCK for devices
The wording is a little confusing, suggesting that this is
the primary use of O_NONBLOCK. Fix that.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-18 10:56:16 +02:00
Michael Kerrisk f2a110725b open.2: Clarify that O_NONBLOCK has no effect on poll/epoll/select
Reported-by: Robin Kuzmin <kuzmin.robin@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-18 10:25:53 +02:00
Michael Kerrisk b0972b3b05 open.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-18 10:14:49 +02:00
Michael Kerrisk 2ac1d1e3e7 sigsuspend.2: Clarify that sigsuspend() suspends the calling *thread*
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-18 09:58:07 +02:00
Michael Kerrisk 603a9fa5b6 sched_setparam.2: Clarify that scheduling parameters are per-thread (not per-process)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-18 09:54:31 +02:00
Michael Kerrisk 5fbfa7335f setns.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-18 09:48:40 +02:00
Michael Kerrisk 56d898aaa5 gettid.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-18 09:42:51 +02:00
Michael Kerrisk ac79419503 setns.2: Note capability requirements for changing network, IPC, or UTS namespace
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-16 23:04:02 +02:00
Michael Kerrisk b4e192495b setns.2: Note capability requirements for changing cgroup namespace
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-16 23:01:33 +02:00
Michael Kerrisk a5633e6b2d setns.2: Note capability requirements for changing PID namespace
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-16 23:01:15 +02:00
Michael Kerrisk 98929c3141 setns.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-16 22:55:42 +02:00
Michael Kerrisk c6b1b95b9e setns.2: Minor text reorganization
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-16 22:47:31 +02:00
Michael Kerrisk 0ecd580494 setns.2: Relocate PID-namespace-specific details
No content changes.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-16 22:39:22 +02:00
Michael Kerrisk 2e4a22de93 setns.2: ffix: add some paragraph breaks
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-16 22:35:33 +02:00
Michael Kerrisk 8e23f12b17 setns.2: Some logical text restructuring
Add subsection headings and use hanging list for details
of specific namespace types.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-16 22:34:07 +02:00
Michael Kerrisk 6f91075e49 setns.2: Minor wording fix
A process doesn't have a capability in a mount namespace, but
rather in the user namespace that owns the mount namespace.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-16 21:53:27 +02:00
Michael Kerrisk 4eae8eb731 clock_getres.2: CLOCK_MONOTONIC_RAW does not count while the system is suspended
Reported-by: Jens Thoms Toerring <jt@toerring.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-13 20:19:40 +02:00
Michael Kerrisk f224d2bc9e clock_getres.2: CLOCK_MONOTONIC does not count while the system is suspended
Reported-by: Jens Thoms Toerring <jt@toerring.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-13 20:15:32 +02:00
Michael Kerrisk 7d882a4a2a clock_getres.2: On Linux CLOCK_MONOTONIC counts time that the system has run since boot
Reported-by: Jens Thoms Toerring <jt@toerring.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-13 20:12:59 +02:00
Michael Kerrisk bccacb94dd gettimeofday.2, clock_getres.2: ERRORS: EINVAL can occur if new real time is less than monotonic clock
Attempts (settimeofday(), clcok_settime(CLOCK_REALTIME)) to set
the real time clock to a value less than the current value of the
CLOCK_MONOTONIC clock result in EINVAL.

In the kernel source file kernel/time/timekeeping.c::do_settimeofday64(),
there is this check:

        if (timespec64_compare(&tk->wall_to_monotonic, &ts_delta) > 0) {
                ret = -EINVAL;
                goto out;
        }

It appears that the check was added in Linux 4.3:

    commit e1d7ba8735551ed79c7a0463a042353574b96da3
    Author: Wang YanQing <udknight@gmail.com>
    Date:   Tue Jun 23 18:38:54 2015 +0800

        time: Always make sure wall_to_monotonic isn't positive

Reported-by: Jens Thoms Toerring <jt@toerring.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-13 16:21:03 +02:00
Michael Kerrisk 018c296c7e gettimeofday.2: ERRORS: add EINVAL for noncanonical 'tv' argument to settimeofday()
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-13 16:21:00 +02:00
Michael Kerrisk 9a82d4d95e gettimeofday.2: Minor rewording of settimeofday() EINVAL error for timezone
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-13 16:20:56 +02:00
Michael Kerrisk 9f23d9477c clock_getres.2: ERRORS: add EINVAL error for noncanonical clock_settime() value
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-13 16:20:42 +02:00
Paul Millar 12507e51a4 inotify_add_watch.2: Add IN_ONLYDIR based error
I noticed that it was undocumented how inotify_add_watch(2)
behaves if IN_ONLYDIR is specified and the target is not a
directory.

I've included a patch that adds ENOTDIR as an additional error in
the inotify_add_watch(2) man page.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-06 10:09:56 +02:00
Andrew Price abd34f349d open.2: Remove O_DIRECT-related quotation
Remove a section that adds no benefit to the discussion of O_DIRECT.

Signed-off-by: Andrew Price <andy@andrewprice.me.uk>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-06 09:29:46 +02:00
Michael Kerrisk 5424697152 s390_guarded_storage.2: Add license
Eugene is amenable to use of the Verbatim license, so
let's use that.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-02 15:13:28 +02:00
Michael Kerrisk 9c30debb40 s390_guarded_storage.2: srcfix: rewrap long source lines
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-02 14:55:59 +02:00
Michael Kerrisk a7091d1326 s390_guarded_storage.2: Minor fixes
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-02 14:55:59 +02:00
Michael Kerrisk 6e5ba56745 s390_guarded_storage.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-02 14:55:59 +02:00
Eugene Syromyatnikov e21ddd0138 s390_guarded_storage.2: New page documenting s390_guarded_storage(2) s390-specific system call
* man2/s390_guarded_storage.2: New file.

Signed-off-by: Eugene Syromyatnikov <evgsyr@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-02 14:55:29 +02:00
Michael Kerrisk 605e9d077b syscalls.2: Add s390_guarded_storage(2)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-02 14:54:07 +02:00
Michael Kerrisk 3475e312ad s390_sthyi.2: Minor wording fix to Eugene's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-02 14:54:07 +02:00
Eugene Syromyatnikov b2c7f822c6 s390_sthyi.2: Some minor additions
* man2/s390_sthyi.2
  (.SH DESCRIPTION): Document the size of the resp_buffer when
    function_code is 0.
  (.SH NOTES): Document various aspects of the current
    implementation (the lifted requirement for the response buffer
    alignment, the presence of in-kernel cache), add description
    for the documentation URL.

Coauthored-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Eugene Syromyatnikov <evgsyr@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-02 14:54:07 +02:00
Michael Kerrisk 03b3fa4a74 s390_runtime_instr.2: Minor tweaks to Eugene's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-02 14:54:07 +02:00
Eugene Syromyatnikov 447d895328 s390_runtime_instr.2: Add a note about runtime_instr.h availability
* man2/s390_runtime_instr.2 (.SH NOTES): Note the version of
  the Linux kernel since which asm/runtime_inster.h header
  is available.

Signed-off-by: Eugene Syromyatnikov <evgsyr@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-02 14:54:07 +02:00
Michael Kerrisk c9a1d47758 set_thread_area.2: Minor tweaks to Eugene's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-02 14:54:07 +02:00
Eugene Syromyatnikov 01fc1d8447 set_thread_area.2: Mention related prctl() requests in SEE ALSO
* man2/set_thread_area.2 (.SH SEE ALSO): Mention
  PTRACE_GET_THREAD_AREA and PTRACE_SET_THREAD_AREA prctl requests.

Signed-off-by: Eugene Syromyatnikov <evgsyr@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-02 14:54:07 +02:00
Eugene Syromyatnikov 49ea23a1ed set_thread_area.2: Mention that get_thread_area() is also Linux-specific
* man2/set_thread_area.2 (.SH CONFORMING): Add get_thread_area.

Signed-off-by: Eugene Syromyatnikov <evgsyr@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-02 14:54:07 +02:00
Michael Kerrisk e7871dadf9 set_thread_area.2: Minor tweaks to Eugene's changes
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-02 14:54:07 +02:00
Eugene Syromyatnikov f7c3bc5ce6 set_thread_area.2: Describe set_thread_area()/get_thread_area() on m68k/MIPS
There are system calls of the same name present on the m86k and
MIPS  architectures, but they simply allow setting some arbitrary
value which can be interpreted as a thread pointer by a threading
library.

* man2/set_thread_area.2 (.SH NAME): Rephrase in order to not
  mention GDT.
(.SH SYNOPSIS): Add declarations for MIPS and m68k.
(.SH DESCRIPTION, .SH RETURN VALUE): Add description for MIPS
  and m68k.
(.SH NOTES): Mention a way to get thread pointer on MIPS.

Signed-off-by: Eugene Syromyatnikov <evgsyr@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-02 14:53:30 +02:00
Eugene Syromyatnikov c0b34c18d6 perf_event_open.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-02 12:32:25 +02:00
Michael Kerrisk 205b1bce43 timerfd_create.2: wfix
Reported-by: Daniel Kamil Kozar <dkk089@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-02 12:14:43 +02:00
Michael Kerrisk 09b8afdc04 execve.2, fallocate.2, getrlimit.2, io_submit.2, membarrier.2, mmap.2, msgget.2, open.2, ptrace.2, readv.2, semget.2, shmget.2, shutdown.2, syscall.2, wait.2, wait4.2, crypt.3, encrypt.3, fseek.3, getcwd.3, makedev.3, pthread_create.3, puts.3, tsearch.3, elf.5, filesystems.5, group.5, passwd.5, sysfs.5, mount_namespaces.7, posixoptions.7, time.7, unix.7, vdso.7, xattr.7, ld.so.8: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-30 17:41:31 +02:00
Michael Kerrisk f2bfabe65b syscall.2: spfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-27 14:48:34 +02:00
Michael Kerrisk ebd10b39cb keyctl.2, sincos.3: spfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-27 14:48:33 +02:00
Michael Kerrisk 29c0586f51 bpf.2, sched_setattr.2, crypt.3, elf.5, proc.5, fanotify.7, feature_test_macros.7, sched.7: spfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-27 14:48:33 +02:00
Michael Kerrisk 843006f1ba keyctl.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-27 14:48:33 +02:00
Michael Kerrisk d2cb1ef1ac fallocate.2, keyctl.2, bzero.3: spfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-27 14:48:33 +02:00
Michael Kerrisk fbc8ab9aa5 copy_file_range.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-27 14:48:33 +02:00
Jakub Wilk 8e13d56651 open.2: Add missing argument for snprintf() in example code
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-27 14:02:47 +02:00
Michael Kerrisk 59153d52da seteuid.2: grfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-20 13:20:33 +02:00
Michael Kerrisk a1dbd698ee setgid.2: wfix: Make wording consistent with setuid(2)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-19 20:07:23 +02:00
Michael Kerrisk f8ac3de383 msgget.2, semget.2, shmget.2: The purpose of "flags" == 0 is to obtain ID of an existing IPC object
This was implied in these pages, but the meaning of "flags" == 0
could be more explicit, as indicated by questions such as
https://stackoverflow.com/questions/49833569/flag-value-of-semget-function

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-14 22:35:53 +02:00
Michael Kerrisk d934a28ce9 msgget.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-14 22:21:22 +02:00
Michael Kerrisk 8c2e5f837a shmget.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-14 22:20:40 +02:00
Michael Kerrisk 56f85b84df mmap.2: Minor wording improvements to text on MAP_FIXED hazard
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-13 09:39:10 +02:00
Michael Kerrisk 0949fa5efd mmap.2: Further tweaks to mention of MAP_FIXED_NOREPLACE in MAP_FIXED notes
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-13 09:39:10 +02:00
Michael Kerrisk 49a8d3a176 mmap.2: Move the text on MAP_FIXED to NOTES
This text has become rather long, making it it somewhat
unwieldy in the discussion of the mmap() flags. Therefore,
move it to NOTES, with a pointer in DESCRIPTION referring
the reader to NOTES.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-13 09:39:10 +02:00
Michael Kerrisk 71c2db6a65 mmap.2: Further wording tweaks to the discussion of MAP_FIXED hazards
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-13 09:39:03 +02:00
Michael Kerrisk 2256fc0887 mmap.2: Minor wording fix
Change "extremely hazardous" to "hazardous". The former phrasing
is a little overwrought; on its own "hazardous" is enough to
convey the sense of danger.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-13 08:53:06 +02:00
Michael Kerrisk 56a033affa mmap.2: Minor wording fixes to to text describing MAP_FIXED hazards
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-13 08:50:38 +02:00
Michael Kerrisk fd859eb599 mmap.2: Simplify mention of MAP_FIXED_NOREPLACE in the discussion of MAP_FIXED
After discussions with Jann Horn and John Hubbard.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-13 08:44:24 +02:00
Michael Kerrisk 528cc762d9 mmap.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-13 08:38:50 +02:00
Michael Kerrisk a8fd340325 mmap.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-13 08:23:14 +02:00
Michael Kerrisk a6bf8e7e94 mmap.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-13 08:21:41 +02:00
Michael Kerrisk 08a239f387 mmap.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-13 08:21:41 +02:00
Jann Horn da6ad3cd89 mmap.2: MAP_FIXED is okay if the address range has been reserved
Clarify that MAP_FIXED is appropriate if the specified address
range has been reserved using an existing mapping, but shouldn't
be used otherwise.

Signed-off-by: Jann Horn <jannh@google.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-12 20:25:58 +02:00
Michael Kerrisk 5bc2d858e1 mmap.2: Clarify rationale of MAP_SYNC somewhat
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-12 20:18:58 +02:00
Michael Kerrisk 79da08c844 mmap.2: Minor tweaks to Jan Kara's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-12 14:55:43 +02:00
Michael Kerrisk b138773b1e mmap.2: srcfix: rewrap source lines
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-12 14:50:28 +02:00
Jan Kara d8aeb42ded mmap.2: Add description of MAP_SHARED_VALIDATE and MAP_SYNC
Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-04-12 14:37:00 +02:00
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
Michael Kerrisk b59de1c652 execve.2: More explicitly describe effect of execve() in the opening paragraph
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-02-16 12:29:38 +01:00
Michael Kerrisk aba7005cdc execve.2: Note that describing execve as "executing a new process" is misleading
This misdescription is so common that it's worth calling it out
explicitly.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-02-16 12:21:09 +01:00
Elvira Khabirova 20e64af8d6 ptrace.2: ffix
Signed-off-by: Elvira Khabirova <lineprinter@altlinux.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-02-09 07:02:14 +01:00
Jann Horn e7a758e3e3 ptrace.2: Copy retval info for SECCOMP_GET_FILTER to right section
The "RETURN VALUE" section made a claim that was incorrect for
PTRACE_SECCOMP_GET_FILTER. Explicitly describe the behavior of
PTRACE_SECCOMP_GET_FILTER in the "RETURN VALUE" section (as
usual), but leave the now duplicate description in the section
describing PTRACE_SECCOMP_GET_FILTER, since the
PTRACE_SECCOMP_GET_FILTER section would otherwise probably become
harder to understand.

Signed-off-by: Jann Horn <jannh@google.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-02-09 06:58:20 +01:00
Carsten Grohmann df818717ca shutdown.2: SEE ALSO: add close(2)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-02-04 07:32:04 +01:00
Michael Kerrisk 2cd9bbfa48 Removed trailing white space at end of lines 2018-02-02 07:48:33 +01:00
Michael Kerrisk 8538a62b4c iconv.1, bpf.2, copy_file_range.2, fcntl.2, memfd_create.2, mlock.2, mount.2, mprotect.2, perf_event_open.2, pkey_alloc.2, prctl.2, read.2, recvmmsg.2, s390_sthyi.2, seccomp.2, sendmmsg.2, syscalls.2, unshare.2, write.2, errno.3, fgetpwent.3, fts.3, pthread_rwlockattr_setkind_np.3, fuse.4, veth.4, capabilities.7, cgroups.7, ip.7, man-pages.7, namespaces.7, network_namespaces.7, sched.7, socket.7, user_namespaces.7, iconvconfig.8: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-02-02 07:38:54 +01:00
Michael Kerrisk 676964cd22 unshare.2: Minor fix in example (remove redundant text)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-01-10 00:23:42 +01:00
Michael Kerrisk 022b038e5a perf_event_open.2: SEE ALSO: add perf(1)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-01-09 22:30:04 +01:00
Michael Kerrisk a092713002 sendmmsg.2: Minot tweaks
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-01-09 19:44:26 +01:00
Nikola Forró 1851a42f1c recvmmsg.2, sendmmsg.2: Point out that error handling is unreliable
If an error occurs after at least one message has been received,
recvmmsg() call succeeds, and returns the number of messages
received.  The error code is expected to be returned on a
subsequent call.  In the current implementation, however, the
error code can be overwritten in the meantime by an unrelated
network event on a socket, for example an incoming ICMP packet.

If an error occurs after at least one message has been sent,
sendmmsg() call succeeds, and returns the number of messages sent.
The error code is lost. The caller can retry the transmission,
starting at first failed message, but there is no guarantee that,
if an error is returned, it will be the same as the one that was
lost on the previous call.

Reference:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/tree/net/socket.c

Signed-off-by: Nikola Forró <nforro@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-01-09 19:41:59 +01:00
Shawn Landden 78ab0c7ba9 copy_file_range: glibc provides a user-space emulation where the system call is absent
Signed-off-by: Shawn Landden <slandden@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-01-09 00:56:53 +01:00
Michael Kerrisk 36f69b24e2 copy_file_range.2: ERRORS: add EISDIR
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-01-09 00:55:07 +01:00
Michael Kerrisk 43d8d5ed3f copy_file_range.2: Order ERRORS alphabetically
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-01-09 00:53:13 +01:00
Florian Weimer 8253adf02f copy_file_range.2: EFBIG errors are possible, similar to write(2)
Signed-off-by: Florian Weimer <fweimer@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-01-09 00:41:46 +01:00
Michael Kerrisk d6c8cd7819 listxattr.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-01-06 23:09:42 +01:00
Michael Kerrisk 91aa7b79e1 getrlimit.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-01-06 23:07:18 +01:00
Michael Kerrisk 09bf2ec88c alloc_hugepages.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-01-06 22:44:34 +01:00
Michael Kerrisk 0e124f35c5 copy_file_range.2: Add comment to code example explaining use of syscall(2)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-12-27 06:32:48 +01:00
Michael Kerrisk c799d40f9e copy_file_range.2: Library support was added in glibc 2.27
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-12-27 06:32:48 +01:00
Nikolay Borisov 1b7adc7c97 bpf.2: Sync list of supported map types with 4.14 kernel
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-12-27 06:22:00 +01:00
Michael Kerrisk 4b204edb3b memfd_create.2: memfd_create() now has a glibc wrapper; remove mention of syscall(2)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-12-21 12:52:22 +01:00
Michael Kerrisk 3e6695e03a pkey_alloc.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-12-21 12:43:09 +01:00
Michael Kerrisk 8859798438 pkey_alloc.2: Clarify description of pkey_alloc() 'flags' argument
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-12-21 12:39:15 +01:00
Michael Kerrisk 251c33e360 mlock.2: Make details for MLOCK_ONFAULT a little more explicit
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-12-21 12:34:31 +01:00
Michael Kerrisk 90f81837e7 mlock.2: mlock2() now has library support, so remove mention of syscall(2)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-12-21 12:32:10 +01:00
Michael Kerrisk fe110bff32 mprotect.2, pkey_alloc.2: Glibc support for memory protection keys was added in version 2.27
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-12-21 12:28:03 +01:00
Michael Kerrisk f54c67bf71 mount.2: Clarify term "unprivileged mount namespace" in Keno's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-12-19 14:58:42 +01:00
Michael Kerrisk 3484e69fca mount.2: Minor fixes
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-12-19 14:58:42 +01:00
Keno Fischer 360d745544 mount.2: Add EINVAL error condition when MS_BINDing MNT_LOCKED submounts
When the user creates an unprivileged mount namespace, the Linux
kernel sets the MNT_LOCKED flag [1] on any submounts to prevent
such mounts from being unmounted inside the mount namespace. Such
an unmount would reveal the filesystem tree behind the mount,
which is not otherwise possible from an unprivileged vantage
point.

Attempting to unmount such a mount will fail with EINVAL. However,
less obvious implication is that attempting a bind mount without
MS_REC, where the tree being bound contains locked sub-mounts,
will also fail with EINVAL, because, without MS_REC, such
submounts are effectively being unmounted.

Cursory googling shows several instances of people running into
this problem, so I felt it advantageous to have it documented in
the man page.

[1] 4fbd8d194f/fs/namespace.c (L1110-L1113)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-12-19 14:54:22 +01:00
Michael Kerrisk 23e0e9f859 fcntl.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-12-19 06:52:59 +01:00
Michael Kerrisk 03594d618b fcntl.2: wfix: clarify meaning of "network parition"
Reported-by: NeilBrown <neilb@suse.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-12-19 06:44:18 +01:00