]> git.ipfire.org Git - thirdparty/man-pages.git/log
thirdparty/man-pages.git
3 years agofutex.2: tfix
Jakub Wilk [Fri, 10 Sep 2021 20:04:28 +0000 (22:04 +0200)] 
futex.2: tfix

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agotermios.3: srcfix
Alejandro Colomar [Fri, 10 Sep 2021 22:33:12 +0000 (00:33 +0200)] 
termios.3: srcfix

Replace a list with .nf,.ft,.fi requests and hardcoded tabs,
by commonly used (some not so common, such as TQ, but simple)
macros: .RS,.RE,.TP,.TQ,.B

Reported-by: G. Branden Robinson <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agonscd.conf.5: describe reloading, clarifications
Greg Banks [Wed, 4 Aug 2021 13:17:39 +0000 (06:17 -0700)] 
nscd.conf.5: describe reloading, clarifications

- Added a subsection of NOTES describing nscd's reloading behavior
  and providing advice on how to configure it.
- Clarifications for the threads, reload-count, positive-time-to-live,
  check-files, and shared attributes.

Derived by reading the nscd, libresolv and glibc source and some
painful experience.

Signed-off-by: Greg Banks <gbanks@linkedin.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoveth.4: tfix
Alejandro Colomar [Fri, 10 Sep 2021 20:00:11 +0000 (22:00 +0200)] 
veth.4: tfix

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoveth.4: tfix
Štěpán Němec [Fri, 10 Sep 2021 09:17:25 +0000 (11:17 +0200)] 
veth.4: tfix

Signed-off-by: Štěpán Němec <stepnem@gmail.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoioctl_tty.2: Fix information about header include file
Pali Rohár [Tue, 31 Aug 2021 20:28:09 +0000 (22:28 +0200)] 
ioctl_tty.2: Fix information about header include file

Header file termios.h contains incompatible definitions for linux ioctl
calls. Correct definitions are exported by header file linux/termios.h but
this file conflicts with sys/ioctl.h header file (required for ioctl()
call). Therefore include direct asm header file asm/termbits.h which
contains compatible definitions and structures for ioctl calls.

Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoclone.2: ERRORS: Add EACCESS with CLONE_INTO_CGROUP + clone3
Alejandro Colomar [Fri, 10 Sep 2021 19:33:37 +0000 (21:33 +0200)] 
clone.2: ERRORS: Add EACCESS with CLONE_INTO_CGROUP + clone3

[Andrew]:
I noticed that clone3 can send the EACCES errno after I wrote a
program that used clone3 with the CLONE_INTO_CGROUP flag.
To me, it's important to know what kind of failure occurred if the
clone3() fails, so I was glad that a unique errno is set for
this case, but it wasn't documented on the clone man page.

[Christian]:
In essence, any error that could occur during regular fs-based migration
at write-time can also occur during CLONE_INTO_CGROUP. The clone3()
manpage just has the inverse of that above statement:

"Note that all of the usual restrictions (described in cgroups(7)) on
placing a process into a version 2 cgroup apply."

Reported-by: Andrew Wock <ajwock@gmail.com>
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoprocess_madvise.2: ffix
Alejandro Colomar [Fri, 10 Sep 2021 13:52:17 +0000 (15:52 +0200)] 
process_madvise.2: ffix

And srcfix too

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoprocess_madvise.2: Minor tweaks to Zhangkui's patch
Alejandro Colomar [Fri, 10 Sep 2021 13:50:10 +0000 (15:50 +0200)] 
process_madvise.2: Minor tweaks to Zhangkui's patch

I also fixed surrounding cases to avoid confusion.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoprocess_madvise.2: Add MADV_WILLNEED to process_madvise()
zhangkui [Thu, 5 Aug 2021 04:44:11 +0000 (12:44 +0800)] 
process_madvise.2: Add MADV_WILLNEED to process_madvise()

Add MADV_WILLNEED to process_madvise() for read-ahead swapped
out memory immediately when the app switches to forground.

https://lore.kernel.org/patchwork/patch/1472006/

Signed-off-by: zhangkui <zhangkui@oppo.com>
Reviewed-by: Suren Baghdasaryan <surenb@google.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoioctl_tty.2: Minor tweaks to Pali's patch
Alejandro Colomar [Fri, 10 Sep 2021 13:39:25 +0000 (15:39 +0200)] 
ioctl_tty.2: Minor tweaks to Pali's patch

Cc: Pali Rohár <pali@kernel.org>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoioctl_tty.2: Add example how to get or set baudrate on the serial port
Pali Rohár [Tue, 10 Aug 2021 19:49:28 +0000 (21:49 +0200)] 
ioctl_tty.2: Add example how to get or set baudrate on the serial port

Setting custom baudrate for which is not defined Bnnn constant is possible
via BOTHER flag and then filling speed in c_ospeed and c_ispeed fields.

These two fields are either in struct termios or struct termios2. Former
belongs to TCGETS/TCSETS ioctls, latter to TCGETS2/TCSETS2 ioctls.

BOTHER flag with these two fields and new struct termios2 is not supported
by older versions of include header files.

Some architectures (e.g. amd64) provide both struct termios and struct
termios2, but c_ospeed and c_ispeed are only in struct termios2.

Some other architectures (e.g. alpha) provide both struct termios and struct
termios2 and both have c_ospeed and c_ispeed fields.

And some other architectures (e.g. powerpc) provide only struct termios
(no struct termios2) and it has c_ospeed and c_ispeed fields.

So basically to support all architectures it is needed to use
struct termios2 when TCGETS2/TCSETS2 is supported. Otherwise it is needed
to use struct termios with TCGETS/TCSETS (case for e.g. powerpc).

Setting input baudrate is done via IBSHIFT macro.

Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agomemfd_secret.2: Minor tweaks to Mike's patch
Alejandro Colomar [Fri, 10 Sep 2021 13:10:11 +0000 (15:10 +0200)] 
memfd_secret.2: Minor tweaks to Mike's patch

Cc: Mike Rapoport <rppt@kernel.org>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agomemfd_secret.2: add NOTES section ...
Mike Rapoport [Thu, 2 Sep 2021 07:50:45 +0000 (10:50 +0300)] 
memfd_secret.2: add NOTES section ...

... that explains the rationale for the system call

Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agotermios.3: CIBAUD and IBSHIFT are implemented on Linux, just unsupported by glibc
Pali Rohár [Thu, 2 Sep 2021 23:29:00 +0000 (01:29 +0200)] 
termios.3: CIBAUD and IBSHIFT are implemented on Linux, just unsupported by glibc

Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
3 years agoprctl.2: Rewrite the description of PR_SET_SECCOMP to defer to seccomp(2)
Michael Kerrisk [Wed, 1 Sep 2021 22:07:23 +0000 (00:07 +0200)] 
prctl.2: Rewrite the description of PR_SET_SECCOMP to defer to seccomp(2)

There is a lot of unnecessary duplication of content of the seccomp
material in prctl(2) and seccomp(2).  Trevor Woerner also noted that
there is an error in prctl(2), where it says that the filters
"are run in order until the first non-allow result is seen", which
contradicts the correct statement in seccomp(2) that *all* filters
are executed.

So, rewrite the seccomp material in prctl(2) to strip out most of
the content duplicated in seccomp(2), and replace the removed
text with statements deferring to to seccomp(2).

Reported-by: Trevor Woerner <twoerner@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 years agoprctl.2: Note that seccomp(2) is preferred over prctl(2) for setting seccomp mode
Michael Kerrisk [Wed, 1 Sep 2021 21:57:17 +0000 (23:57 +0200)] 
prctl.2: Note that seccomp(2) is preferred over prctl(2) for setting seccomp mode

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 years agomalloc.3: Clarify that realloc() may move the memory block
Michael Kerrisk [Tue, 31 Aug 2021 01:26:46 +0000 (03:26 +0200)] 
malloc.3: Clarify that realloc() may move the memory block

Make it clearer, early in the discussion, that realloc()
may move the block.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 years agomalloc.3: wfix
Michael Kerrisk [Tue, 31 Aug 2021 01:25:58 +0000 (03:25 +0200)] 
malloc.3: wfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 years agomalloc.3: ffix
Michael Kerrisk [Tue, 31 Aug 2021 01:25:29 +0000 (03:25 +0200)] 
malloc.3: ffix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 years agomalloc.3: Add some structuring to improve readability
Michael Kerrisk [Tue, 31 Aug 2021 01:24:43 +0000 (03:24 +0200)] 
malloc.3: Add some structuring to improve readability

Add some subsection (.SS) headings and paragraph breaks in
DESCRIPTION, to make the page more easily readable.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 years agomalloc_hook.3: Modernize for glibc 2.34
Paul Eggert [Tue, 10 Aug 2021 19:37:08 +0000 (12:37 -0700)] 
malloc_hook.3: Modernize for glibc 2.34

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 years agomalloc.3: Modernize for glibc 2.34
Paul Eggert [Tue, 10 Aug 2021 19:37:07 +0000 (12:37 -0700)] 
malloc.3: Modernize for glibc 2.34

glibc has tightened up its rules for replacing the memory
allocator.  I went through the malloc man page and looked for how
it documented malloc() and related functions, and fixed
discrepancies with glibc malloc() documentation and/or
implementation.  I also reorganized the portability discussion so
that portability issues can be seen more clearly.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 years agomount_namespaces.7: Update references to Documentation/filesystems/sharedsubtree.rst
Michael Kerrisk [Tue, 31 Aug 2021 01:03:00 +0000 (03:03 +0200)] 
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>
3 years agoproc.5: Fixes various references to kernel docs in Documentation/
Michael Kerrisk [Tue, 31 Aug 2021 01:00:55 +0000 (03:00 +0200)] 
proc.5: Fixes various references to kernel docs in Documentation/

Especially the change to .rst format in the kernel Documentation/
tree has rendered many of the references in this manual page
obsolete. Fix them.

Reported-by: Vito Caputo <vcaputo@pengaru.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 years agooperator.7: Reorder symbols as in the standard (C11)
Alejandro Colomar [Sat, 28 Aug 2021 12:11:08 +0000 (14:11 +0200)] 
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>
3 years agooperator.7: Fix precedence of the 'cast operator'
Alejandro Colomar [Sat, 28 Aug 2021 12:11:06 +0000 (14:11 +0200)] 
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>
3 years agotermios.3: Use bold style for B0
Pali Rohár [Mon, 30 Aug 2021 11:27:11 +0000 (13:27 +0200)] 
termios.3: Use bold style for B0

Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 years agotermios.3: wfix
Michael Kerrisk [Tue, 31 Aug 2021 00:24:39 +0000 (02:24 +0200)] 
termios.3: wfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 years agotermios.3: Clarify zero argument for cfsetispeed()
Pali Rohár [Mon, 30 Aug 2021 11:25:52 +0000 (13:25 +0200)] 
termios.3: Clarify zero argument for cfsetispeed()

Zero in this case refers to literal constant 0 and not symbolic
constant B0.

Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 years agoChanges.old: tfix
Michael Kerrisk [Tue, 31 Aug 2021 00:00:46 +0000 (02:00 +0200)] 
Changes.old: tfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 years agoexit_group.2: Remove a confusing reference to _exit(2) in DESCRIPTION
Michael Kerrisk [Mon, 30 Aug 2021 21:42:16 +0000 (23:42 +0200)] 
exit_group.2: Remove a confusing reference to _exit(2) in DESCRIPTION

As noted by Jakub:

    BTW, the exit_group.2 man page could use an update (possibly
    by merging it into exit.2): it says that the "system
    call is is equivalent to _exit(2) except that it terminates
    not only the calling thread, but all threads in the calling
    process's thread group", which isn't helpful these days.

Reported-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 years agoexit_group.2: SEE ALSO: s/exit(2)/_exit(2)/
Michael Kerrisk [Mon, 30 Aug 2021 21:38:44 +0000 (23:38 +0200)] 
exit_group.2: SEE ALSO: s/exit(2)/_exit(2)/

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 years ago_exit.2: Clarify the distinction between the raw syscall and the wrapper function
Michael Kerrisk [Mon, 30 Aug 2021 21:36:42 +0000 (23:36 +0200)] 
_exit.2: Clarify the distinction between the raw syscall and the wrapper function

Further clarify the difference between the raw _exit() system call
and the C library wrapper.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 years agoioctl_tty.2: TIOCGSID is equivalent to tcgetsid()
Pali Rohár [Mon, 30 Aug 2021 16:08:57 +0000 (18:08 +0200)] 
ioctl_tty.2: TIOCGSID is equivalent to tcgetsid()

Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoChanges.old: tfix
Michael Kerrisk [Fri, 27 Aug 2021 21:13:58 +0000 (23:13 +0200)] 
Changes.old: tfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agosyscalls.2: Add Linux 5.14 system calls
Michael Kerrisk [Fri, 27 Aug 2021 20:41:43 +0000 (22:41 +0200)] 
syscalls.2: Add Linux 5.14 system calls

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agomemfd_secret.2: SEE ALSO: add memfd_create(2)
Michael Kerrisk [Mon, 16 Aug 2021 06:47:23 +0000 (08:47 +0200)] 
memfd_secret.2: SEE ALSO: add memfd_create(2)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agomemfd_create.2: SEE ALSO: add memfd_secret(2)
Michael Kerrisk [Mon, 16 Aug 2021 06:46:56 +0000 (08:46 +0200)] 
memfd_create.2: SEE ALSO: add memfd_secret(2)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agomemfd_secret.2: Minor edits to Mike Rapoport's patch
Michael Kerrisk [Mon, 16 Aug 2021 06:35:59 +0000 (08:35 +0200)] 
memfd_secret.2: Minor edits to Mike Rapoport's patch

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agomemfd_secret.2: wfix
Michael Kerrisk [Mon, 16 Aug 2021 06:33:52 +0000 (08:33 +0200)] 
memfd_secret.2: wfix

Added "RAM-based" after consultation with Mike Rapoport

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agomemfd_secret.2: New page describing memfd_secret() system call
Mike Rapoport [Sun, 15 Aug 2021 06:46:48 +0000 (09:46 +0300)] 
memfd_secret.2: New page describing memfd_secret() system call

Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoChanges.old: tfix in 5.13 changelog
Michael Kerrisk [Fri, 27 Aug 2021 20:32:40 +0000 (22:32 +0200)] 
Changes.old: tfix in 5.13 changelog

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoChanges.old: tfix
Michael Kerrisk [Fri, 27 Aug 2021 20:24:57 +0000 (22:24 +0200)] 
Changes.old: tfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoChanges.old: Add missing entry in 5.13 changelog
Michael Kerrisk [Fri, 27 Aug 2021 20:15:28 +0000 (22:15 +0200)] 
Changes.old: Add missing entry in 5.13 changelog

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoStart of man-pages-5.14: updating Changes and Changes.old
Michael Kerrisk [Fri, 27 Aug 2021 20:13:35 +0000 (22:13 +0200)] 
Start of man-pages-5.14: updating Changes and Changes.old

4 years agoStart of man-pages-5.14: updating .Announce and .lsm files
Michael Kerrisk [Fri, 27 Aug 2021 20:13:35 +0000 (22:13 +0200)] 
Start of man-pages-5.14: updating .Announce and .lsm files

4 years agoStart of man-pages-5.14: renaming .Announce and .lsm files
Michael Kerrisk [Fri, 27 Aug 2021 20:13:35 +0000 (22:13 +0200)] 
Start of man-pages-5.14: renaming .Announce and .lsm files

4 years agoReady for 5.13 man-pages-5.13
Michael Kerrisk [Fri, 27 Aug 2021 00:50:30 +0000 (02:50 +0200)] 
Ready for 5.13

4 years agoiconv.1, ldd.1, accept.2, access.2, add_key.2, arch_prctl.2, bpf.2, chmod.2, chown...
Michael Kerrisk [Fri, 27 Aug 2021 00:44:07 +0000 (02:44 +0200)] 
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>
4 years agoChanges: Ready for 5.13
Michael Kerrisk [Fri, 27 Aug 2021 00:11:10 +0000 (02:11 +0200)] 
Changes: Ready for 5.13

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agogetaddrinfo.3: Note that 'errno' is set in parallel with EAI_SYSTEM
Alejandro Colomar [Wed, 25 Aug 2021 15:51:56 +0000 (17:51 +0200)] 
getaddrinfo.3: Note that 'errno' is set in parallel with EAI_SYSTEM

The previous wording wasn't very explicit, leaving room for
believing that 'errno' may be 0 after returning EAI_SYSTEM.

Use a wording similar to other pages, for added consistency.

[mtk: edited commit message title; also, POSIX notes that
'errno' is set in this case.]

Reported-by: Cristian Morales Vega <christian.morales.vega@gmail.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoiconv.1, iconvconfig.8: FILES: note that files may be under /usr/lib64 rather than...
Michael Kerrisk [Tue, 24 Aug 2021 21:37:55 +0000 (23:37 +0200)] 
iconv.1, iconvconfig.8: FILES: note that files may be under /usr/lib64 rather than /lib/64

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

Reported-by: Christopher Yeleighton <giecrilj@stegny.2a.pl>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agomount_namespaces.7: tfix
Michael Kerrisk [Sun, 22 Aug 2021 21:47:32 +0000 (23:47 +0200)] 
mount_namespaces.7: tfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agomount_namespaces.7: Minor wording fix
Michael Kerrisk [Sun, 22 Aug 2021 21:45:08 +0000 (23:45 +0200)] 
mount_namespaces.7: Minor wording fix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agomount_namespaces.7: wfix: use numbered cross-references in list of restrictions in...
Michael Kerrisk [Fri, 20 Aug 2021 21:25:35 +0000 (23:25 +0200)] 
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>
4 years agomount_namespaces.7: Rewrite locked mounts examples to use/etc/shadow
Michael Kerrisk [Thu, 19 Aug 2021 00:13:30 +0000 (02:13 +0200)] 
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>
4 years agomount_namespaces.7: Note that it is possible to stack a mount on top of a locked...
Michael Kerrisk [Wed, 18 Aug 2021 23:35:30 +0000 (01:35 +0200)] 
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>
4 years agomount_namespaces.7: wfix
Michael Kerrisk [Wed, 18 Aug 2021 22:42:40 +0000 (00:42 +0200)] 
mount_namespaces.7: wfix

Reported-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agomount_namespaces.7: Minor wording clean-ups in discussion of less privileged namespaces
Michael Kerrisk [Wed, 18 Aug 2021 22:34:31 +0000 (00:34 +0200)] 
mount_namespaces.7: Minor wording clean-ups in discussion of less privileged namespaces

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agomount_namespaces.7: wfix
Michael Kerrisk [Tue, 17 Aug 2021 23:39:27 +0000 (01:39 +0200)] 
mount_namespaces.7: wfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agomount_namespaces.7: Terminology clean-up: "mount point" ==> "mount"
Michael Kerrisk [Tue, 17 Aug 2021 23:34:54 +0000 (01:34 +0200)] 
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>
4 years agomount_namespaces.7: wfix
Michael Kerrisk [Tue, 17 Aug 2021 11:04:47 +0000 (13:04 +0200)] 
mount_namespaces.7: wfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agomount_namespaces.7: wfix
Michael Kerrisk [Tue, 17 Aug 2021 10:55:52 +0000 (12:55 +0200)] 
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>
4 years agomount_namespaces.7: Relocate the "Restrictions on mount namespaces" subsection
Michael Kerrisk [Tue, 17 Aug 2021 03:04:11 +0000 (05:04 +0200)] 
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>
4 years agomount_namespaces.7: Repair earlier text after injection of new list item in previous...
Michael Kerrisk [Tue, 17 Aug 2021 02:19:48 +0000 (04:19 +0200)] 
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>
4 years agomount_namespaces.7: Add further details on locked mounts in a less-privileged user...
Michael Kerrisk [Tue, 17 Aug 2021 02:19:22 +0000 (04:19 +0200)] 
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>
4 years agomount_namespaces.7: More clearly explain the notion of locked mounts
Michael Kerrisk [Fri, 13 Aug 2021 21:40:50 +0000 (23:40 +0200)] 
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>
4 years agomount.2: ERRORS: add EPERM error for case where a mount is locked
Michael Kerrisk [Fri, 13 Aug 2021 20:56:30 +0000 (22:56 +0200)] 
mount.2: ERRORS: add EPERM error for case where a mount is locked

Refer the reader to mount_namespaces(7) for details.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoumount.2: ERRORS: add EINVAL for case where mount is locked
Michael Kerrisk [Fri, 13 Aug 2021 20:48:41 +0000 (22:48 +0200)] 
umount.2: ERRORS: add EINVAL for case where mount is locked

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agogetumask.3: Remove page
Michael Kerrisk [Thu, 19 Aug 2021 19:30:49 +0000 (21:30 +0200)] 
getumask.3: Remove page

This function was never implemented on Linux. It seems pointless to
retain such a page 20 years after it was written.

4 years agouser_namespaces.7: Add a definition of "global root"
Michael Kerrisk [Wed, 18 Aug 2021 22:21:32 +0000 (00:21 +0200)] 
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>
4 years agoadd_key.2, keyctl.2, request_key.2: Note that the "libkeyutils" package provides...
Michael Kerrisk [Wed, 18 Aug 2021 09:45:20 +0000 (11:45 +0200)] 
add_key.2, keyctl.2, request_key.2: Note that the "libkeyutils" package provides <keyutils.h>

See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=992377

Reported-by: Dominique Brazziel <dbrazziel@snet.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agofanotify_mark.2: Revert cruft added in commit 717c3a7dcf3dcf178af
Michael Kerrisk [Wed, 18 Aug 2021 08:10:52 +0000 (10:10 +0200)] 
fanotify_mark.2: Revert cruft added in commit 717c3a7dcf3dcf178af

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agostrsignal.3: wfix
Michael Kerrisk [Wed, 18 Aug 2021 07:57:04 +0000 (09:57 +0200)] 
strsignal.3: wfix

In NAME line, one of the instances of "sigdescr_np" should be
"sigabbrev_np".

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agostrsignal.3: tfix
Michael Kerrisk [Wed, 18 Aug 2021 06:02:35 +0000 (08:02 +0200)] 
strsignal.3: tfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agotsearch.3: NAME: add twalk_r
Michael Kerrisk [Wed, 18 Aug 2021 06:00:43 +0000 (08:00 +0200)] 
tsearch.3: NAME: add twalk_r

This function is described in the page.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agosigqueue.3: tfix
Michael Kerrisk [Wed, 18 Aug 2021 05:59:32 +0000 (07:59 +0200)] 
sigqueue.3: tfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoprctl.2: tfix
Michael Kerrisk [Wed, 18 Aug 2021 05:46:16 +0000 (07:46 +0200)] 
prctl.2: tfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoreadv.2, pthread_tryjoin_np.3, stailq.3, strlen.3, wcslen.3: Arrange .SH sections...
Michael Kerrisk [Wed, 18 Aug 2021 05:38:15 +0000 (07:38 +0200)] 
readv.2, pthread_tryjoin_np.3, stailq.3, strlen.3, wcslen.3: Arrange .SH sections in correct order

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agointro.2, mount_setattr.2, seccomp_unotify.2, fflush.3, pthread_mutex_consistent.3...
Michael Kerrisk [Wed, 18 Aug 2021 05:30:52 +0000 (07:30 +0200)] 
intro.2, mount_setattr.2, seccomp_unotify.2, fflush.3, pthread_mutex_consistent.3: Place SEE ALSO entries in correct order

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agochmod.2, chown.2, open.2, mkdir.2, mknod.2, readlink.2, stat.2, symlink.2, mkfifo...
Michael Kerrisk [Wed, 18 Aug 2021 01:02:55 +0000 (03:02 +0200)] 
chmod.2, chown.2, open.2, mkdir.2, mknod.2, readlink.2, stat.2, symlink.2, mkfifo.3, scandir.3, sem_wait.3: ERRORS: combine errors into a single alphabetic list

These pages split out extra errors for some APIs into a separate
list.  Probably, the pages are easier to ready if all errors are
combined into a single list.

Note that there still remain a few pages where the errors are
listed separately for different APIs. For the moment, it seems
best to leave those pages as is, since the error lists are
largely distinct in those pages.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoarch_prctl.2, perf_event_open.2, pthread_tryjoin_np.3: ERRORS: correct alphabetic...
Michael Kerrisk [Wed, 18 Aug 2021 00:04:15 +0000 (02:04 +0200)] 
arch_prctl.2, perf_event_open.2, pthread_tryjoin_np.3: ERRORS: correct alphabetic order

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoaccept.2, access.2, getpriority.2, mlock.2: ERRORS: combine errors into a single...
Michael Kerrisk [Tue, 17 Aug 2021 22:35:06 +0000 (00:35 +0200)] 
accept.2, access.2, getpriority.2, mlock.2: ERRORS: combine errors into a single list

These split out errors into separate lists (perhaps per API,
perhaps "may" vs "shall", perhaps "Linux-specific" vs
standard(??)), but there's no good reason to do this.  It makes
the error list harder to read, and is inconsistent with other
pages. So, combine the errors into a single list.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agogetpass.3: wfix
Michael Kerrisk [Tue, 17 Aug 2021 22:46:10 +0000 (00:46 +0200)] 
getpass.3: wfix

Remove redundant phrase.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoshmop.2: wfix
Michael Kerrisk [Tue, 17 Aug 2021 21:53:52 +0000 (23:53 +0200)] 
shmop.2: wfix

Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoproc.5: Remove duplicated /proc/[pid]/gid_map entry
Michael Kerrisk [Mon, 16 Aug 2021 00:05:35 +0000 (02:05 +0200)] 
proc.5: Remove duplicated /proc/[pid]/gid_map entry

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoproc.5: Add /proc/PID/projid_map, referring reader to user_namespaces(7)
Michael Kerrisk [Mon, 16 Aug 2021 00:04:36 +0000 (02:04 +0200)] 
proc.5: Add /proc/PID/projid_map, referring reader to user_namespaces(7)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agouser_namespaces.7: tfix
Michael Kerrisk [Mon, 16 Aug 2021 04:56:04 +0000 (06:56 +0200)] 
user_namespaces.7: tfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agouser_namespaces.7: Document /proc/PID/projid_map
Michael Kerrisk [Sun, 15 Aug 2021 23:59:42 +0000 (01:59 +0200)] 
user_namespaces.7: Document /proc/PID/projid_map

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agouser_namespaces.7: Minor wording improvement
Michael Kerrisk [Sun, 15 Aug 2021 23:57:52 +0000 (01:57 +0200)] 
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>
4 years agofanotify_mark.2, link.2, mount.2, umount.2, proc.5, cgroups.7, fanotify.7: Terminolog...
Michael Kerrisk [Sat, 14 Aug 2021 21:29:41 +0000 (23:29 +0200)] 
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>
4 years agorename.2: wfix
Michael Kerrisk [Sat, 14 Aug 2021 21:41:18 +0000 (23:41 +0200)] 
rename.2: wfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agomount_namespaces.7: SEE ALSO: add mount_setattr(2)
Michael Kerrisk [Thu, 12 Aug 2021 23:19:59 +0000 (01:19 +0200)] 
mount_namespaces.7: SEE ALSO: add mount_setattr(2)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agostatx.2: srcfix: semantic newlines
Michael Kerrisk [Thu, 12 Aug 2021 23:12:45 +0000 (01:12 +0200)] 
statx.2: srcfix: semantic newlines

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agostatx.2: Document STATX_MNT_ID
NeilBrown [Thu, 12 Aug 2021 22:46:47 +0000 (08:46 +1000)] 
statx.2: Document STATX_MNT_ID

Linux 5.8 adds STATX_MNT_ID and stx_mnt_id.
Add description to statx.2

Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agomount_setattr.2: srcfix: add note explaining Christian's use of -ve dirfd values
Michael Kerrisk [Thu, 12 Aug 2021 22:26:37 +0000 (00:26 +0200)] 
mount_setattr.2: srcfix: add note explaining Christian's use of -ve dirfd values

From email with Christian Brauner:

>>>>>>           int fd_tree = open_tree(-EBADF, source,
>>>>>>                        OPEN_TREE_CLONE | OPEN_TREE_CLOEXEC |
>>>>>>                        AT_EMPTY_PATH | (recursive ? AT_RECURSIVE : 0));
>>>>>
>>>>> ???
>>>>> What is the significance of -EBADF here? As far as I can tell, it
>>>>> is not meaningful to open_tree()?
>>>>
>>>> I always pass -EBADF for similar reasons to [2]. Feel free to just use -1.
>>>
>>> ????
>>> But here, both -EBADF and -1 seem to be wrong. This argument
>>> is a dirfd, and so should either be a file descriptor or the
>>> value AT_FDCWD, right?
>>
>> [1]: In this code "source" is expected to be absolute. If it's not
>>      absolute we should fail. This can be achieved by passing -1/-EBADF,
>>      afaict.
>
> D'oh! Okay. I hadn't considered that use case for an invalid dirfd.
> (And now I've done some adjustments to openat(2),which contains a
> rationale for the *at() functions.)
>
> So, now I understand your purpose, but still the code is obscure,
> since
>
> * You use a magic value (-EBADF) rather than (say) -1.
> * There's no explanation (comment about) of the fact that you want
>   to prevent relative pathnames.
>
> So, I've changed the code to use -1, not -EBADF, and I've added some
> comments to explain that the intent is to prevent relative pathnames.
> Okay?

Sounds good.

>
> But, there is still the meta question: what's the problem with using
> a relative pathname?

Nothing per se. Ok, you asked so it's your fault:
When writing programs I like to never use relative paths with AT_FDCWD
because. Because making assumptions about the current working directory
of the calling process is just too easy to get wrong; especially when
pivot_root() or chroot() are in play.
My absolut preference (joke intended) is to open a well-known starting
point with an absolute path to get a dirfd and then scope all future
operations beneath that dirfd. This already works with old-style
openat() and _very_ cautious programming but openat2() and its
resolve-flag space have made this **chef's kiss**.
If I can't operate based on a well-known dirfd I use absolute paths with
a -EBADF dirfd passed to *at() functions.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agofanotify_mark.2: tfix
Michael Kerrisk [Thu, 12 Aug 2021 22:18:51 +0000 (00:18 +0200)] 
fanotify_mark.2: tfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoopen.2: Add mount_setattr(2) to list of 'dirfd' APIs
Michael Kerrisk [Thu, 12 Aug 2021 22:12:29 +0000 (00:12 +0200)] 
open.2: Add mount_setattr(2) to list of 'dirfd' APIs

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agomount_setattr.2: ffix
Michael Kerrisk [Thu, 12 Aug 2021 22:10:20 +0000 (00:10 +0200)] 
mount_setattr.2: ffix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>