Commit Graph

4197 Commits

Author SHA1 Message Date
Michael Kerrisk 77a4c23215 mount_namespaces.7: Update references to Documentation/filesystems/sharedsubtree.rst
Documentation/filesystems/sharedsubtree.txt has changed to
Documentation/filesystems/sharedsubtree.rst.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-31 03:06:52 +02:00
Alejandro Colomar 77251857af operator.7: Reorder symbols as in the standard (C11)
This makes it easier to compare this page to the standard,
to get more details about the rules between operators.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-31 02:30:21 +02:00
Alejandro Colomar 9c9a5acaa2 operator.7: Fix precedence of the 'cast operator'
Unary operators are mentioned in C11::6.5.3, and casts are in
C11::6.5.4 (they are mentioned in order of precedence).

And from note 85 (in section 6.5) in that same C11 standard, major
subsections 6.5.X are sorted by precedence.

As an example (from Jakub), `sizeof(int)+1` is interpreted as
`(sizeof(int))+1`, and not `sizeof((int)+1)`.

I used C11 and not C18 (the latest) because at least in the draft
copy of C18 that I have, there are a few important typos in that
section, while the draft copy of C11 that I have is free of those
typos.  And C11 and C18 are almost identical, with no major
changes to the language.

Reported-by: David Sletten <david.paul.sletten@gmail.com>
Cc: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-31 02:30:21 +02:00
Michael Kerrisk 6e00b7a858 iconv.1, ldd.1, accept.2, access.2, add_key.2, arch_prctl.2, bpf.2, chmod.2, chown.2, close_range.2, copy_file_range.2, execve.2, execveat.2, fanotify_mark.2, futex.2, futimesat.2, getpriority.2, intro.2, ioctl_tty.2, keyctl.2, link.2, membarrier.2, mkdir.2, mknod.2, mlock.2, mount.2, mount_setattr.2, open.2, open_by_handle_at.2, perf_event_open.2, pidfd_open.2, readlink.2, readv.2, rename.2, request_key.2, seccomp.2, sigaction.2, stat.2, statx.2, symlink.2, syscalls.2, umount.2, unlink.2, utimensat.2, wait.2, bsearch.3, fflush.3, getaddrinfo.3, getauxval.3, getopt.3, getsubopt.3, mkfifo.3, pthread_mutex_consistent.3, pthread_setname_np.3, pthread_tryjoin_np.3, scandir.3, sem_wait.3, stailq.3, strlen.3, strstr.3, termios.3, tsearch.3, wcslen.3, wcstok.3, wordexp.3, proc.5, capabilities.7, cgroups.7, fanotify.7, mount_namespaces.7, namespaces.7, path_resolution.7, pipe.7, posixoptions.7, user_namespaces.7, vdso.7, iconvconfig.8, ld.so.8: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-27 02:44:07 +02:00
Michael Kerrisk 9428bb9d8a mount_namespaces.7: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-22 23:47:32 +02:00
Michael Kerrisk 24483c2782 mount_namespaces.7: Minor wording fix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-22 23:45:08 +02:00
Michael Kerrisk ababc346b3 mount_namespaces.7: wfix: use numbered cross-references in list of restrictions in NOTES
Done to make the list easier to navigate.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-21 00:49:05 +02:00
Michael Kerrisk 906ab4945c mount_namespaces.7: Rewrite locked mounts examples to use/etc/shadow
See https://lore.kernel.org/linux-man/20210817140649.7pmz5qcelgjzgxtz@wittgenstein/
    Subject: Re: [PATCHi, man-pages] mount_namespaces.7: More clearly explain "locked mounts"
    Date: Tue, 17 Aug 2021 16:06:49 +0200
    Message-ID: <20210817140649.7pmz5qcelgjzgxtz@wittgenstein>

Reported-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-20 23:37:47 +02:00
Michael Kerrisk ebc82e00ee mount_namespaces.7: Note that it is possible to stack a mount on top of a locked mount
Reported-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-20 23:37:47 +02:00
Michael Kerrisk f6aaf493f8 mount_namespaces.7: wfix
Reported-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-20 23:37:47 +02:00
Michael Kerrisk 2433a20ce1 mount_namespaces.7: Minor wording clean-ups in discussion of less privileged namespaces
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-20 23:37:47 +02:00
Michael Kerrisk 82357e60d7 mount_namespaces.7: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-20 23:37:47 +02:00
Michael Kerrisk 8c9a827429 mount_namespaces.7: Terminology clean-up: "mount point" ==> "mount"
Many times, this page use the terminology "mount point", where
"mount" would be better. A "mount point" is the location at which
a mount is attached. A "mount" is an association between a
filesystem and a mount point.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-20 23:37:47 +02:00
Michael Kerrisk 5aea19ed35 mount_namespaces.7: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-20 23:37:47 +02:00
Michael Kerrisk aa62e72ded mount_namespaces.7: wfix
The correct terminology is "less privileged mount namespace"
(not "less privileged user namespace").

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-20 23:37:47 +02:00
Michael Kerrisk a66648bbd1 mount_namespaces.7: Relocate the "Restrictions on mount namespaces" subsection
The "Restrictions on mount namespaces" subsection belongs lower in
the page, following the discussion of concepts (e.g., shared
subtrees and propagation) that are discussed elsewhere in the page.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-20 23:37:47 +02:00
Michael Kerrisk 44f2a6b8cd mount_namespaces.7: Repair earlier text after injection of new list item in previous commit
The previous commit injected a large block of text into a list,
separating one example in the previous list item from a
"continuation" in the following list item. repair that.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-20 23:37:47 +02:00
Michael Kerrisk 88ebfb241b mount_namespaces.7: Add further details on locked mounts in a less-privileged user namespace
Reported-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-20 23:37:47 +02:00
Michael Kerrisk ee54e5d5cc mount_namespaces.7: More clearly explain the notion of locked mounts
For a long time, this manual page has had a brief discussion of
"locked" mounts, without clearly saying what this concept is, or
why it exists. Expand the discussion with an explanation of what
locked mounts are, why mounts are locked, and some examples of the
effect of locking.

Thanks to Christian Brauner for a lot of help in understanding
these details.

Reported-by: Christian Brauner <christian.brauner@ubuntu.com>
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-20 23:37:47 +02:00
Michael Kerrisk f9f75be088 user_namespaces.7: Add a definition of "global root"
Reported-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-19 02:29:15 +02:00
Michael Kerrisk 9ae13fffd2 user_namespaces.7: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-18 01:38:14 +02:00
Michael Kerrisk 213e259e97 user_namespaces.7: Document /proc/PID/projid_map
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-18 01:38:14 +02:00
Michael Kerrisk 6486faa956 user_namespaces.7: Minor wording improvement
Mainly in preparation for the following patch on project IDs maps.
Add some words that will make the parallels between the rules for
updating uid_map and projid_map clearer.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-18 01:38:14 +02:00
Michael Kerrisk 525a8b5461 fanotify_mark.2, link.2, mount.2, umount.2, proc.5, cgroups.7, fanotify.7: Terminology clean-up: "mount point" ==> "mount"
Many times, these pages use the terminology "mount point", where
"mount" would be better. A "mount point" is the location at which
a mount is attached. A "mount" is an association between a
filesystem and a mount point.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-18 01:38:14 +02:00
Michael Kerrisk 4d7a648597 mount_namespaces.7: SEE ALSO: add mount_setattr(2)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-13 01:21:53 +02:00
Michael Kerrisk faf2534942 mount_namespaces.7: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-12 07:33:53 +02:00
Michael Kerrisk a1508e361f capabilities.7: Add a reference to user_namespaces(7) for CAP_SETFCAP
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-11 12:10:10 +02:00
Michael Kerrisk ab4c4b2fbb user_namespaces.7: Improve description of the CAP_SETFCAP requirement when mapping UID 0
Kir Kolyshkin made a start, but I think much more needs to
be said...

Reviewed-by: Serge E. Hallyn <serge@hallyn.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-11 12:09:55 +02:00
Michael Kerrisk d96bf5f5bf man-pages.7: wfix: s/null character/null byte/
Reported-by: Stefan Kanthak <stefan.kanthak@nexgo.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-10 08:31:25 +02:00
Michael Kerrisk bb75585de6 unicode.7: tfix
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-10 03:52:08 +02:00
Alejandro Colomar 7fc5fc967d path_resolution.7: tfix + srcfix
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-09 11:44:12 +02:00
Michael Kerrisk 9b6cce9936 path_resolution.7: Improve description of trailin slashes
See https://bugzilla.kernel.org/show_bug.cgi?id=212385

some/path/dir/ is not always the same as some/path/dir/:

$ mkdir u
$ rmdir u/.
rmdir: failed to remove 'u/.': Invalid argument
$ rmdir u
$

The text in POSIX.1-2018 Section 4.13 ("Pathname Resolution")
is helpful in pointing to a better wording.

Reported-by: Askar Safin <safinaskar@mail.ru>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-09 02:32:37 +02:00
Michael Kerrisk 5e833e276d localedef.1, access.2, ioctl_console.2, ioctl_fslabel.2, openat2.2, write.2, dlsym.3, getopt.3, nl_langinfo.3, termios.3, xcrypt.3, hosts.equiv.5, nsswitch.conf.5, cgroups.7, man-pages.7, netlink.7, system_data_types.7: srcfix: semantic newlines
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-09 02:32:37 +02:00
Štěpán Němec dbba2b268b unix.7: tfix
Signed-off-by: Štěpán Němec <stepnem@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-09 02:32:37 +02:00
G. Branden Robinson c99dbb2776 man-pages.7: wfix
Saw this while preparing the "switch to \~" change Alex invited.

Signed-off-by: G. Branden Robinson <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-09 02:32:36 +02:00
Michael Weiß 1b8089e1d1 namespaces.7: ffix
Signed-off-by: Michael Weiß <michael.weiss@aisec.fraunhofer.de>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-09 02:32:36 +02:00
Michael Kerrisk 9b94b63df5 readv.2, pipe.7: Make text on pipe writes more general to avoid a confusion in writev(2)
After a patch proposal from наб triggered by concerns that, when
talking about PIPE_BUF, pipe(7) explicitly mentions write(2) but
not writev(2), I've concluded that the reference in writev(2) to
pipe(7) is not needed (mea culpa; I added that text), and I think
the text in pipe(7) could be written to be closer to the POSIX
spec, which doesn't talk about "write() calls", but simply about
"writes".

Reported-by: наб <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-09 02:32:36 +02:00
Michael Kerrisk bd62f2240b capabilities.7, user_namespaces.7: Minor tweaks (part 2) to Kir Kolyshkin's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-08 05:02:41 +02:00
Alejandro Colomar c83edb030c capabilities.7: Minor tweaks to Kir's patch
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-08 04:56:49 +02:00
Kir Kolyshkin 29c1f3cf96 capabilities.7, user_namespaces.7: Describe CAP_SETFCAP
mtk: The kernel commit message is quite enlihtening:

    commit db2e718a47984b9d71ed890eb2ea36ecf150de18
    Author: Serge E. Hallyn <serge@hallyn.com>
    Date:   Tue Apr 20 08:43:34 2021 -0500

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-08 04:50:12 +02:00
Michael Kerrisk ae5cc0dc57 vdso.7: Minor tweak to Alejandro Colomar's patch
The correct kernel version seems to 5.11, not 5.10:

$ git describe --contains d0e3fc69d00d
v5.11-rc1~76^2~251

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-08 04:22:49 +02:00
Alejandro Colomar 7a398162a8 vdso.7: Add y2038 compliant gettime for ppc/32
Christophe Leroy via Bugzilla:
https://bugzilla.kernel.org/show_bug.cgi?id=213421

[
In ppc32 functions section, the Y2038 compliant function
__kernel_clock_gettime64() is missing.

It was added by commit d0e3fc69d00d
("powerpc/vdso: Provide __kernel_clock_gettime64() on vdso32")
]

.../linux$ git describe d0e3fc69d00d
v5.10-rc2-76-gd0e3fc69d00d

Reported-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-08 04:20:53 +02:00
Alejandro Colomar 20c2c5ced3 posixoptions.7: Fix legacy functions list (s/getcwd/getwd/)
Alan:

[
The on-line copy of the manual page "posixoptions(7)" dated
2018-04-30 has an entry for "getcwd()" in the section headed
"XSI - _XOPEN_LEGACY - _SC_XOPEN_LEGACY".
I believe that entry should be "getwd()" as that is the API call
which was present in X/Open-6 but withdrawn in X/Open-7.
]

mtk: confirmed by reviewing the table ("Removed Functions and
Symbols in Issue 7") at the end of Section B.1.1 on page
3564 of IEEE Std 1003.1, 2016 Edition.

Reported-by: Alan Peakall <Alan.Peakall@helpsystems.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-08 02:50:05 +02:00
Michael Kerrisk f5dfd9a032 vdso.7: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-08 02:16:30 +02:00
Michael Kerrisk 5fc054ecd9 vdso.7: Update CLOCK_REALTIME_COARSE and CLOCK_MONOTONIC_COARSE info for powerpc
See https://bugzilla.kernel.org/show_bug.cgi?id=213419
ppc/32 and ppc/64 sections both have the following note:

    The CLOCK_REALTIME_COARSE and CLOCK_MONOTONIC_COARSE clocks are
    not supported by the __kernel_clock_getres and
    __kernel_clock_gettime interfaces; the kernel falls back to the
    real system call

This note has been wrong from quite some time now, since commit
654abc69ef2e ("powerpc/vdso32: Add support for
CLOCK_{REALTIME/MONOTONIC}_COARSE") and commit
5c929885f1bb ("powerpc/vdso64: Add support for
CLOCK_{REALTIME/MONOTONIC}_COARSE")

Reported-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-08 02:13:49 +02:00
Štěpán Němec f05d7043fe namespaces.7: Fix confusion caused by text reorganization
Since commit ee81d7e418, the flags list has been (only) above, not
below, these references.

(The flags table was added even before that, in commit 0b497138b9
("namespaces.7: Add table of namespaces to top of page"))

Fixes: ee81d7e418 ("namespaces.7: Include manual page references in the summary table of namespace types")
Signed-off-by: Štěpán Němec <stepnem@gmail.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-08 01:47:59 +02:00
наб 33e2aa41ff ascii.7: ffix: add vertical rule to separate the two columns
I regularly get mildly lost in this table (and, indeed, didn't realise
it had two columns the first few times I used it to look at something
from the left column) ‒ separating the two columns improves clarity,
and makes which soup of numbers belongs to which character
much more obvious

Other encodings don't need this as they don't use double-columnated
tables

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-08 01:02:24 +02:00
Kir Kolyshkin 57fb49f9ae user_namespaces.7: Fix a reference to a kernel document
The file being referred to no longer exists, as it was moved to
*.rst first (commit 20a78ae9ed297f2) and then to under
admin-guide (commit bf6b7a742e3f82b). Both those commits
are from 2019 (Linux 5.3).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-07 23:40:29 +02:00
Kir Kolyshkin 36e6250f14 capabilities.7: tfix
Add a missing comma.

Fixes: 3dcdef9437
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-07 23:39:02 +02:00
Štěpán Němec 2f05137b6a path_resolution.7: tfix
Signed-off-by: Štěpán Němec <stepnem@gmail.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-08-07 23:36:17 +02:00