Commit Graph

20761 Commits

Author SHA1 Message Date
Michael Kerrisk bf9cc31523 cpuid.4: wfix
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-19 21:25:31 +02:00
Michael Kerrisk 1cc2995abf capabilities.7: tfix
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-19 21:20:09 +02:00
Michael Kerrisk 9797c81474 gcvt.3: wfix
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-19 21:17:37 +02:00
Michael Kerrisk 19531dec84 capabilities.7: tfix
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-19 16:42:00 +02:00
Michael Kerrisk 858c85752a socket.7: Minor tweaks to SO_RCVLOWAT description
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-17 15:33:28 +02:00
Kirill Smelkov 90fb5f5225 mmap.2: srcfix: note kernel commit that caused MAP_POPULATE | MAP_NONBLOCK to be noop
Signed-off-by: Kirill Smelkov <kirr@nexedi.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-17 13:24:48 +02:00
Michael Kerrisk 7f9a6a9970 netlink.7: Note that NETLINK_SOCK_DIAG is preferred over NETLINK_INET_DIAG
Reported-by: Fabien Siron <fabien.siron@epita.fr>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-17 13:09:59 +02:00
Michael Kerrisk 157d398b9f posix_spawn.3: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-17 12:29:16 +02:00
Olivier Gayot fa0d6e6433 posix_spawn.3: Document the POSIX_SPAWN_SETSID attribute
Since glibc 2.26, posix_spawn (2) function accepts the
POSIX_SPAWN_SETSID flag. This flag has been accepted by POSIX and
should be added to the next major revision. The current support
can be enabled with _GNU_SOURCE.

Upstream commit in glibc.git:

  daeb1fa2e1 [BZ 21340] add support for POSIX_SPAWN_SETSID

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-17 12:25:43 +02:00
Olivier Gayot 0b78e0f5f2 posix_spawn.3: Clarify by using name of steps rather than syscalls
The implementation of the fork() step in posix_spawn(2) relies on
either fork(2), vfork(2) or clone(2) depending on the version of
the glibc and the arguments passed to posix_spawn(2).

It is sometimes ambiguous whether, when we are mentioning
"fork(2)", we are referring to the fork() step or the actual
fork(2) syscall.

This patch hopefully avoids the ambiguity by replacing confusing
occurrences by "the xxx() step" where appropriate.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-17 12:24:10 +02:00
Olivier Gayot 8b5b47e983 posix_spawn.3: Document POSIX_SPAWN_USEVFORK
Added a few lines about POSIX_SPAWN_USEVFORK so that it appears
clearly that since glibc 2.24, the flag has no effect.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-17 12:21:53 +02:00
Olivier Gayot 0c76bb7293 posix_spawn.3: Document implementation using clone() since glibc 2.24
Since glibc 2.24, the use of posix_spawn (2) makes an
unconditional call to clone(CLONE_VM | CLONE_VFORK ...) rather
than relying on fork (2) or vfork (2).

As a consequence, the statements regarding the use of the flag
POSIX_SPAWN_USEVFORK and how the function decides whether it
should use fork (2) or vfork (2) are obsolete since glibc 2.24.

This patch makes a distinction in the manual page between glibc
2.24 and older versions.

Upstream commit in glibc.git:

  9ff72da471 posix: New Linux posix_spawn{p} implementation

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-17 12:19:23 +02:00
Peter Wu 0e86195223 bpf.2: Update enum bpf_map_type and enum bpf_prog_type
Taken from Linux v5.3-rc2. Add a reference to the header file to
save the future reader some time figuring out whether more entries
exist.

Signed-off-by: Peter Wu <peter@lekensteyn.nl>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-17 12:08:10 +02:00
Michael Kerrisk f7d706ba9b bpf.2: srcfix: Add a note on check for unprivileged BPF_PROG_TYPE_SOCKET_FILTER programs
In Linux 4.4, the allowed BPF helper functions that could
be called was governed by a check in sk_filter_func_proto().
Nowadays (Linux 5.6), it is I think governed by the check in
sk_filter_func_proto().

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-17 11:58:35 +02:00
Michael Kerrisk 35732aa7a0 bpf.2: Minor tweaks to Richard Palethorpe's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-17 11:49:42 +02:00
Richard Palethorpe 821bf91cf6 bpf.2: Change note on unprivileged access
This notes that the kernel now allows calls to bpf() without CAP_SYS_ADMIN
under some circumstances.

Signed-off-by: Richard Palethorpe <rpalethorpe@suse.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-17 09:27:32 +02:00
Michael Kerrisk 2a2b2a5dd7 clone.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-17 09:06:20 +02:00
Marcus Gelderie 8f0b7d765d cgroups.7: Mention cgroup.sane_behavior file
The cgroup.sane_behavior file returns the hard-coded value "0" and
is kept for legacy purposes. Mention this in the man-page.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-16 13:57:53 +02:00
Michael Kerrisk 4e2b112c91 bpf-helpers.7: Sync against Linux 5.7-rc1
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-16 13:45:41 +02:00
Michael Kerrisk d407f83e5f move_pages.2: Minor tweaks to Yang Shi's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-16 13:34:39 +02:00
Yang Shi e7b72190bb move_pages.2: Returning positive value is a new error case
Since commit a49bd4d71637 ("mm, numa: rework do_pages_move"), the
semantic of move_pages() has changed to return the number of
non-migrated pages if they were result of a non-fatal reasons
(usually a busy page).  This was an unintentional change that
hasn't been noticed except for LTP tests which checked for the
documented behavior.

There are two ways to go around this change.  We can even get back
to the original behavior and return -EAGAIN whenever migrate_pages
is not able to migrate pages due to non-fatal reasons.  Another
option would be to simply continue with the changed semantic and
extend move_pages documentation to clarify that -errno is returned
on an invalid input or when migration simply cannot succeed (e.g.
-ENOMEM, -EBUSY) or the number of pages that couldn't have been
migrated due to ephemeral reasons (e.g. page is pinned or locked
for other reasons).

We decided to keep the second option in kernel because this
behavior is in place for some time without anybody complaining and
possibly new users depending on it.  Also it allows to have a
slightly easier error handling as the caller knows that it is
worth to retry when err > 0.

Update man pages to reflect the new semantic.

Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Signed-off-by: Yang Shi <yang.shi@linux.alibaba.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-16 13:30:02 +02:00
Michael Kerrisk c8bbab9a6a namespaces.7: Document /proc/sys/user/max_time_namespaces
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-16 13:25:02 +02:00
Michael Kerrisk c96bc2056c namespaces.7: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-16 13:23:44 +02:00
Michael Kerrisk 40ce741410 getauxval.3: Minor tweaks to YunQiang Su's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-16 13:13:12 +02:00
YunQiang Su 685385df91 getauxval.3: MIPS, AT_BASE_PLATFORM passes ISA level
Since Linux 5.7, on MIPS, we use AT_BASE_PLATFORM to pass ISA level.
The values may be:
  mips2, mips3, mips4, mips5,
  mips32, mips32r2, mips32r6,
  mips64, mips64r2, mips64r6.

This behavior is different with PowerPC.

https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=e585b768da111f2c2d413de6214e83bbdfee8f22
Signed-off-by: YunQiang Su <syq@debian.org>

----
v1 -> v2: fix typo

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-16 13:12:02 +02:00
Michael Kerrisk 34451e6ee4 s390_runtime_instr.2: Various reworking of Heiko Carstens's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-16 12:30:00 +02:00
Michael Kerrisk fee6e6795e s390_runtime_instr.2: srcfix: rewrap long source lines
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-16 12:18:19 +02:00
Heiko Carstens cca27058b7 s390_runtime_instr.2: Document signum argument behavior change
Document that the signum argument is ignored in newer kernels, but
that user space should pass a valid real-time signal number for
backwards compatibility.

Cowritten-by: Eugene Syromyatnikov <evgsyr@gmail.com>
Signed-off-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>
2020-04-16 12:10:07 +02:00
Michael Kerrisk bff15b74e0 msgctl.2: Correct description of 'msg_ctime' field
Verified by inspecting kernel source.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-16 11:48:08 +02:00
Michael Kerrisk 6cd15a0567 shmctl.2: f
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-16 11:47:16 +02:00
Michael Kerrisk a85bc85d5d shmctl.2: Correct 'shm_ctime' description
Verified from kernel sources.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-16 11:41:47 +02:00
Michael Kerrisk 5fd4345e84 semctl.2: Correct description of sem_ctime field
Verified from inspection of kernel source code.

Reported-by: Manfred Spraul <manfred@colorfullife.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-16 11:33:17 +02:00
Michael Kerrisk 6fea5f4f1d semctl.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-16 11:27:19 +02:00
Michael Kerrisk 191dd3b238 mremap.2: Remove mention of "Segmentation fault" in EFAULT text
"Segmentation fault" (SIGSEGV) is not exactly the same thing as
EFAULT.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-16 08:23:09 +02:00
Michael Kerrisk 4737f0d145 mremap.2: Move a paragraph on MREMAP_DONTUNMAP from NOTES to DESCRIPTION
I think things read slightly easier, if all of the info on
MREMAP_DONTUNMAP is in one place.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-16 08:21:30 +02:00
Michael Kerrisk f15e32e3b9 mremap.2: Move a paragraph from DESCRIPTION to NOTES
The paragraph on Linux VM is rather generic, and does not belong
in DESCRIPTION. In fact, I'm not sure it even belongs in this
page.  At the least, let's move it to NOTES.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-16 08:20:12 +02:00
Michael Kerrisk 8c97c565ee mremap.2: Move a paragraph from DESCRIPTION to NOTES
And while we are at it, remove a sentence that makes an obvious
point (that mremap() uses the Linux page table scheme).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-16 08:20:12 +02:00
Michael Kerrisk 2b4fecb9f6 mremap.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-16 08:20:12 +02:00
Michael Kerrisk 6af75e77bb mremap.2: Reorder some paragraphs in NOTES
Details of glibc 2.4, which is by now fairly old, would be
better at the end of NOTES than at the start.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-16 08:20:12 +02:00
Michael Kerrisk 0f0993c9b5 mremap.2: Some more improvements to Brian Geffon's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-16 08:20:01 +02:00
Michael Kerrisk 452bdc2f02 mremap.2: Minor tweaks to Brian Geffon's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-16 07:30:00 +02:00
Brian Geffon 8debc4f595 mremap.2: Document MREMAP_DONTUNMAP
Signed-off-by: Brian Geffon <bgeffon@google.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-16 07:30:00 +02:00
Michael Kerrisk cb76d6e5fe mremap.2: ffix (Add a paragraph break)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-16 07:30:00 +02:00
Michael Kerrisk 2932c4aa7e openat2.2: A few more fixes after feedback from Aleksa Sarai
Reported-by: Aleksa Sarai <cyphar@cyphar.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-14 22:07:39 +02:00
Michael Kerrisk 9154da7f05 mmap.2: Don't mark MAP_ANON as deprecated
From a mailing list conversation:

On 5/24/18 9:03 PM, Heinrich Schuchardt wrote:
> Hello Michael,
>
> in the mmap(2) man page MAP_ANON is described as deprecated.
>
> When I look at the NetBSD manpage
> http://netbsd.gw.com/cgi-bin/man-cgi?mmap+2+NetBSD-current
> I found that MAP_ANONYMOUS is not defined.
>
> https://www.dragonflybsd.org/cgi/web-man?command=mmap&section=2
> indicates MAP_ANONYMOUS is an alias for MAP_ANON and is provided for
> compatibility.
>
> https://man.openbsd.org/mmap.2 also knows MAP_ANONYMOUS as a synonym.
>
> https://www.unix.com/man-page/osx/2/mmap/ does not know MAP_ANONYMOUS.
>
> So shouldn't the man page indicate that MAP_ANON is to be favored to
> write portable code? And correspondingly mark MAP_ANONYMOUS as synonym
> only kept for compatibility.
>
> The Open Group Base Specifications Issue 7, 2018 Edition does not
> reference either of both. So both values are not POSIX but it is not
> correct to describe them as Linux only.

The text saying that MAP_ANON is deprecated is ancient (at least
20 years old). I don't know why that text was added.

Things are not simple though: it looks like there's at least
one historical implementation (HP-US) that defines MAP_ANONYMOUS
but not MAP_ANON.

I've applied the patch below.

Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-14 21:14:12 +02:00
Michael Kerrisk ebf3a7d52a ioctl_list.2: Remove hex values from constants
As noted by Heinrich Schuchardt:

he list contains hex values of different constants. I just wonder for
which architecture (alpha, i386, mips, or sparc at that time). No
information is supplied.

Current values depend on the architecture, e.g.

On amd64
0x82307201      VFAT_IOCTL_READDIR_BOTH
0x82307202      VFAT_IOCTL_READDIR_SHORT
0x80047210      FAT_IOCTL_GET_ATTRIBUTES
0x40047211      FAT_IOCTL_SET_ATTRIBUTES
0x80047213      FAT_IOCTL_GET_VOLUME_ID

On mips
0x42187201      VFAT_IOCTL_READDIR_BOTH
0x42187202      VFAT_IOCTL_READDIR_SHORT
0x40047210      FAT_IOCTL_GET_ATTRIBUTES
0x80047211      FAT_IOCTL_SET_ATTRIBUTES
0x40047213      FAT_IOCTL_GET_VOLUME_ID

Hence hex values should be removed.

Reported-by:
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-14 13:06:24 +02:00
Michael Kerrisk 5757667555 ld.so.8: ffix
Reported-by: Branden Robinson <g.branden.robinson@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-14 11:59:14 +02:00
Michael Kerrisk dfa3ae9b3f getdents.2: Tweaks to Petr Vorel's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-14 11:42:21 +02:00
Petr Vorel f5f6969dee getdents.2: Mention glibc support for getdents64()
Support was added in glibc 2.30.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-14 11:38:39 +02:00
Chris Lamb 15a8a16b8e getdents.2: Correct linux_dirent definition in example code
It is "unsigned long" earlier up in the file

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-14 11:36:51 +02:00