man-pages.git
27 hours agocore.5: tfix master
Michael Kerrisk [Thu, 28 May 2020 09:35:46 +0000 (11:35 +0200)]
core.5: tfix

Reported-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
27 hours agocore.5: Mention 'sysctl -w' as a way of changing core_pattern setting
Michael Kerrisk [Thu, 28 May 2020 09:14:36 +0000 (11:14 +0200)]
core.5: Mention 'sysctl -w' as a way of changing core_pattern setting

Reported-by: Jonny Grant <jg@jguk.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
29 hours agocore.5: ffix
Michael Kerrisk [Thu, 28 May 2020 07:52:09 +0000 (09:52 +0200)]
core.5: ffix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
30 hours agoprctl.2: ffix: use literal hyphens when referencing kernel docs
Dave Martin [Wed, 27 May 2020 21:17:33 +0000 (22:17 +0100)]
prctl.2: ffix: use literal hyphens when referencing kernel docs

There is one case of a cross-reference to a kernel documentation
filename that uses unescaped hyphens.

To avoid misrendering, escape these as \- similarly to other
instances.

Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
30 hours agoprctl.2: wfix
Michael Kerrisk [Wed, 13 May 2020 11:22:10 +0000 (13:22 +0200)]
prctl.2: wfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
30 hours agoprctl.2: Add PR_SPEC_DISABLE_NOEXEC for SPECULATION_CTRL prctls
Dave Martin [Tue, 12 May 2020 16:36:56 +0000 (17:36 +0100)]
prctl.2: Add PR_SPEC_DISABLE_NOEXEC for SPECULATION_CTRL prctls

Add the PR_SPEC_DISABLE_NOEXEC mode added in Linux 5.1
for the PR_SPEC_STORE_BYPASS "misfeature" of
PR_SET_SPECULATION_CTRL and PR_GET_SPECULATION_CTRL.

Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Cc: Waiman Long <longman@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
30 hours agoprctl.2: Minor tweaks to "prctl.2: Add PR_SPEC_INDIRECT_BRANCH for SPECULATION_CTRL...
Michael Kerrisk [Wed, 13 May 2020 11:19:50 +0000 (13:19 +0200)]
prctl.2: Minor tweaks to "prctl.2: Add PR_SPEC_INDIRECT_BRANCH for SPECULATION_CTRL prctls" patch

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
30 hours agoprctl.2: Add PR_SPEC_INDIRECT_BRANCH for SPECULATION_CTRL prctls
Dave Martin [Tue, 12 May 2020 16:36:55 +0000 (17:36 +0100)]
prctl.2: Add PR_SPEC_INDIRECT_BRANCH for SPECULATION_CTRL prctls

Add the PR_SPEC_INDIRECT_BRANCH "misfeature" added in Linux 4.20
for PR_SET_SPECULATION_CTRL and PR_GET_SPECULATION_CTRL.

Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Cc: Tim Chen <tim.c.chen@linux.intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
47 hours agocore.5: ffix
Michael Kerrisk [Wed, 27 May 2020 13:26:45 +0000 (15:26 +0200)]
core.5: ffix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 days agoctime.3: wfix
Michael Kerrisk [Tue, 26 May 2020 11:23:19 +0000 (13:23 +0200)]
ctime.3: wfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 days agopipe.2, socketpair.2, dlopen.3, posix_memalign.3, signal-safety.7: Correct bogus...
Michael Kerrisk [Tue, 26 May 2020 11:09:31 +0000 (13:09 +0200)]
pipe.2, socketpair.2, dlopen.3, posix_memalign.3, signal-safety.7: Correct bogus POSIX.1 standards names

POSIX.1-2003 ==> POSIX.1-2001 TC1
POSIX.1-2004 ==> POSIX.1-2001 TC2
POSIX.1-2013 ==> POSIX.1-2008 TC1
POSIX.1-2016 ==> POSIX.1-2008 TC2

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 days agoclose.2: wfix
Michael Kerrisk [Tue, 26 May 2020 11:17:59 +0000 (13:17 +0200)]
close.2: wfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 days agotzset.3: ffix
Michael Kerrisk [Tue, 26 May 2020 11:11:00 +0000 (13:11 +0200)]
tzset.3: ffix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 days agogetnameinfo.3: srcfix
Michael Kerrisk [Tue, 26 May 2020 11:04:53 +0000 (13:04 +0200)]
getnameinfo.3: srcfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 days agodlopen.3: tfix
Michael Kerrisk [Tue, 26 May 2020 10:57:25 +0000 (12:57 +0200)]
dlopen.3: tfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 days agoposix_fadvise.2: tfix
Michael Kerrisk [Tue, 26 May 2020 10:57:13 +0000 (12:57 +0200)]
posix_fadvise.2: tfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 days agoy0.3: errno is now correctly set to ERANGE on underflow
Michael Kerrisk [Tue, 26 May 2020 10:32:14 +0000 (12:32 +0200)]
y0.3: errno is now correctly set to ERANGE on underflow

The fix was in glibc 2.17. See
https://www.sourceware.org/bugzilla/show_bug.cgi?id=6808

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 days agoy0.3: srcfix: remove an ancient FIXME that no longer matters much
Michael Kerrisk [Tue, 26 May 2020 10:26:31 +0000 (12:26 +0200)]
y0.3: srcfix: remove an ancient FIXME that no longer matters much

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 days agoy0.3: These functions now correctly diagnose a pole error
Michael Kerrisk [Tue, 26 May 2020 10:23:54 +0000 (12:23 +0200)]
y0.3: These functions now correctly diagnose a pole error

The fix was in glibc 2.19. See
https://sourceware.org/bugzilla/show_bug.cgi?id=6807

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 days agoy0.3: srcfix: Note on "Range error: result underflow" and FE_UNDERFLOW
Michael Kerrisk [Tue, 26 May 2020 10:10:55 +0000 (12:10 +0200)]
y0.3: srcfix: Note on "Range error: result underflow" and FE_UNDERFLOW

The fact that an FE_UNDERFLOW exception is not raised for
"Range error: result underflow" is intended behavior.
See https://www.sourceware.org/bugzilla/show_bug.cgi?id=6806.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 days agoj0.3: srcfix: add notes that failing to raise FE_UNDERFLOW is intended behavior
Michael Kerrisk [Tue, 26 May 2020 09:26:00 +0000 (11:26 +0200)]
j0.3: srcfix: add notes that failing to raise FE_UNDERFLOW is intended behavior

See https://www.sourceware.org/bugzilla/show_bug.cgi?id=6805

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 days agoscalbln.3: These functions now correctly set errno for the ERANGE case
Michael Kerrisk [Tue, 26 May 2020 09:19:03 +0000 (11:19 +0200)]
scalbln.3: These functions now correctly set errno for the ERANGE case

Modify DESCRIPTION appropriately and add BUGS section.
The fix was in glibc 2.20.

See https://www.sourceware.org/bugzilla/show_bug.cgi?id=6803

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 days agohypot.3: srcfix: add some notes about the underflow case
Michael Kerrisk [Tue, 26 May 2020 08:56:28 +0000 (10:56 +0200)]
hypot.3: srcfix: add some notes about the underflow case

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 days agosincos.3: The glibc implementation does now give EDOM for a domain error
Michael Kerrisk [Tue, 26 May 2020 08:36:49 +0000 (10:36 +0200)]
sincos.3: The glibc implementation does now give EDOM for a domain error

The fix was in glibc 2.22
(commit d435569cd626bccb9c27361202a279d0fd7fce88).

See https://www.sourceware.org/bugzilla/show_bug.cgi?id=15467

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 days agorename.2: SEE ALSO: add rename(1)
Michael Kerrisk [Tue, 26 May 2020 08:24:32 +0000 (10:24 +0200)]
rename.2: SEE ALSO: add rename(1)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 days agomount_namespaces.7: SEE ALSO: add mount(8), umount(8)
Michael Kerrisk [Mon, 25 May 2020 19:34:43 +0000 (21:34 +0200)]
mount_namespaces.7: SEE ALSO: add mount(8), umount(8)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 days agoproc.5: Remove "mp" under VmFlags in /proc/[pid]/smaps
Michael Kerrisk [Mon, 25 May 2020 18:48:21 +0000 (20:48 +0200)]
proc.5: Remove "mp" under VmFlags in /proc/[pid]/smaps

Reported-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 days agoprintf.3: Prevent signed integer overflow in example
Tobias Stoeckmann [Thu, 21 May 2020 12:15:06 +0000 (14:15 +0200)]
printf.3: Prevent signed integer overflow in example

The function make_message illustrates how to use vsnprintf to
determine the required amount of memory for a specific format and
its arguments.

If make_message is called with a format which will use exactly
INT_MAX characters (excluding '\0'), then the size++ calculation
will overflow the signed integer "size", which is an undefined
behaviour in C.

Since malloc and vsnprintf rightfully take a size_t argument, I
decided to use a size_t variable for size calculation. Therefore,
this patched code uses variables of the same data types as
expected by function arguments.

Proof of concept (tested on Linux/glibc amd64):

int main() { make_message("%647s%2147483000s", "", ""); }

If the code is compiled with address sanitizer (gcc
-fsanitize=address) you can see the following line, assuming that
a signed integer overflow simply leads to INT_MIN:

==3094==WARNING: AddressSanitizer failed to allocate 0xffffffff80000000 bytes

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 days agoproc.5: Add "sf" to VmFlags in /proc/[pid]/smaps
Michael Kerrisk [Mon, 25 May 2020 13:40:29 +0000 (15:40 +0200)]
proc.5: Add "sf" to VmFlags in /proc/[pid]/smaps

Added in kernel commit b6fb293f2497a9841d94f6b57bd2bb2cd222da43
Text from comment in include/uapi/asm-generic/mman.h.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 days agoproc.5: Add "um" and "uw" to VmFlags in /proc/[pid]/smaps
Michael Kerrisk [Mon, 25 May 2020 13:36:35 +0000 (15:36 +0200)]
proc.5: Add "um" and "uw" to VmFlags in /proc/[pid]/smaps

Added in kernel commit 16ba6f811dfe44bc14f7946a4b257b85476fc16e.
Text taken from comments in include/linux/mm.h.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 days agoproc.5: Add "mp" to VmFlags in /proc/[pid]/smaps
Michael Kerrisk [Mon, 25 May 2020 13:30:30 +0000 (15:30 +0200)]
proc.5: Add "mp" to VmFlags in /proc/[pid]/smaps

Added in kernel commit 4aae7e436fa51faf4bf5d11b175aea82cfe8224a.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 days agoproc.5: Note kernel version for /proc/PID/smaps VmFlags "dd" flag
Michael Kerrisk [Mon, 25 May 2020 11:40:32 +0000 (13:40 +0200)]
proc.5: Note kernel version for /proc/PID/smaps VmFlags "dd" flag

Kernel commit ec8e41aec13005fed0dbee002fb8c99b4e001d50

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 days agoproc.5: Note kernel version that removed /proc/PID/smaps VmFlags "nl" flag
Michael Kerrisk [Mon, 25 May 2020 11:30:28 +0000 (13:30 +0200)]
proc.5: Note kernel version that removed /proc/PID/smaps VmFlags "nl" flag

Kernel commit 1da4b35b001481df99a6dcab12d5d39a876f7056

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 days agoproc.5: Note kernel version for /proc/PID/smaps VmFlags "wf" flag
Michael Kerrisk [Mon, 25 May 2020 11:29:09 +0000 (13:29 +0200)]
proc.5: Note kernel version for /proc/PID/smaps VmFlags "wf" flag

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 days agoproc.5: Add "wf" to VmFlags in /proc/[pid]/smaps
Ian Rogers [Thu, 21 May 2020 22:25:51 +0000 (15:25 -0700)]
proc.5: Add "wf" to VmFlags in /proc/[pid]/smaps

This patch documents a flag added in the following kernel commit:

commit d2cd9ede6e193dd7d88b6d27399e96229a551b19
Author: Rik van Riel <riel@redhat.com>
Date:   Wed Sep 6 16:25:15 2017 -0700

    mm,fork: introduce MADV_WIPEONFORK

This was already documented in man2/madvise.2 in the commit:

commit c0c4f6c29c494c466f3a2a6273c5b55b76a72927
Author: Rik van Riel <riel@redhat.com>
Date:   Tue Sep 19 20:32:00 2017 +0200

    madvise.2: Document MADV_WIPEONFORK and MADV_KEEPONFORK

Signed-off-by: Ian Rogers <irogers@google.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 days agoprctl.2: tfix
Jakub Wilk [Mon, 25 May 2020 13:21:48 +0000 (15:21 +0200)]
prctl.2: tfix

Remove duplicated word.

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 days agogettid.2: Document header file and feature test macro requirements for gettid()
Michael Kerrisk [Mon, 25 May 2020 10:54:14 +0000 (12:54 +0200)]
gettid.2: Document header file and feature test macro requirements for gettid()

The gettid() wrapper was added glibc 2.30, and is declared by
<unistd.h> if _GNU_SOURCE is defined.

Reported-by: Joseph C. Sible <josephcsible@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 days agoscanf.3: Clarify that 'x' specifier allows a 0x/0X prefix in input string
Michael Kerrisk [Mon, 25 May 2020 09:30:30 +0000 (11:30 +0200)]
scanf.3: Clarify that 'x' specifier allows a 0x/0X prefix in input string

Reported-by: Jürgen Sauermann <mail@juergen-sauermann.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 days agopow.3: Minor tweak to BUGS
Michael Kerrisk [Mon, 25 May 2020 13:15:14 +0000 (15:15 +0200)]
pow.3: Minor tweak to BUGS

Remove the text ("rare)" after a note from Vincent Lefèvre:

Subject: [Bug math/13932] dbl-64 pow unexpectedly slow for some inputs
Date: Sat, 23 May 2020 21:31:52 +0000
From: vincent-srcware at vinc17 dot net <sourceware-bugzilla@sourceware.org>
To: mtk.manpages@gmail.com

https://sourceware.org/bugzilla/show_bug.cgi?id=13932

--- Comment #26 from Vincent Lefèvre <vincent-srcware at vinc17 dot net> ---
(In reply to Michael Kerrisk from comment #25)
> Fix documented for man-pages-5.07.
[...]
> -On 64-bits,
> +Before glibc 2.28,
>  .\"
>  .\" https://sourceware.org/bugzilla/show_bug.cgi?id=13932
> +on some architectures (e.g., x86-64)
>  .BR pow ()
>  may be more than 10,000 times slower for some (rare) inputs
>  than for other nearby inputs.
[...]

The problematic values are uncommon, but not so rare, in the sense
that they are close to simple values, i.e. are likely to occur in
practice. An example given above: pow(0.999999999999999889, 1.5)

1 and 1.5 are very simple values, which are more likely to occur
in practice than some fixed random value. Then it suffices to have
a small rounding error on 1...

For instance, this is very different from hard-to-round cases of
exp, which are also very slow IMHO, but unless one writes a
specific program for them, no-one should notice the slowness
because such a case would typically occur only once among billions
(I don't remember the accuracy before the slowest path in this
library).

Reported-by: Vincent Lefèvre <vincent-srcware@vinc17.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 days agopow.3: srcfix: remove an ancient FIXME that is pretty irrelevant these days
Michael Kerrisk [Sat, 23 May 2020 20:18:48 +0000 (22:18 +0200)]
pow.3: srcfix: remove an ancient FIXME that is pretty irrelevant these days

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 days agopow.3: Add a subheading to mark off historical bugs that are now fixed
Michael Kerrisk [Sat, 23 May 2020 20:10:44 +0000 (22:10 +0200)]
pow.3: Add a subheading to mark off historical bugs that are now fixed

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 days agopow.3: Several bugs in glibc's pow() implementation were fixed in glibc 2.16
Michael Kerrisk [Sat, 23 May 2020 20:04:46 +0000 (22:04 +0200)]
pow.3: Several bugs in glibc's pow() implementation were fixed in glibc 2.16

See https://www.sourceware.org/bugzilla/show_bug.cgi?id=3866.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 days agopow.3: BUGS: pow() performance problem for some (rare) inputs has been fixed
Michael Kerrisk [Sat, 23 May 2020 19:29:34 +0000 (21:29 +0200)]
pow.3: BUGS: pow() performance problem for some (rare) inputs has been fixed

See https://sourceware.org/bugzilla/show_bug.cgi?id=13932
Fixed in glibc 2.28.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 days agohypot.3: srcfix: Clear an obsolete FIXME
Michael Kerrisk [Sat, 23 May 2020 11:35:50 +0000 (13:35 +0200)]
hypot.3: srcfix: Clear an obsolete FIXME

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 days agoerf.3, erfc.3: srcfix: Clear an obsolete FIXME
Michael Kerrisk [Sat, 23 May 2020 11:28:15 +0000 (13:28 +0200)]
erf.3, erfc.3: srcfix: Clear an obsolete FIXME

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 days agoscalb.3: These functions now correctly set errno for the EDOM and ERANGE cases
Michael Kerrisk [Sat, 23 May 2020 10:20:59 +0000 (12:20 +0200)]
scalb.3: These functions now correctly set errno for the EDOM and ERANGE cases

Modify DESCRIPTION appropriately and add BUGS section.
The fix was in glibc 2.20.

See https://www.sourceware.org/bugzilla/show_bug.cgi?id=6803
and https://www.sourceware.org/bugzilla/show_bug.cgi?id=6804

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 days agonextafter.3: Since glibc 2.23, these functions do set errno
Michael Kerrisk [Sat, 23 May 2020 10:09:45 +0000 (12:09 +0200)]
nextafter.3: Since glibc 2.23, these functions do set errno

Modify DESCRIPTION appropriately and add BUGS section.

See https://www.sourceware.org/bugzilla/show_bug.cgi?id=6799.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 days agofdim.3: BUGS: these functions did not set errno on some architectures
Michael Kerrisk [Sat, 23 May 2020 10:01:15 +0000 (12:01 +0200)]
fdim.3: BUGS: these functions did not set errno on some architectures

The bug was fixed in glibc 2.24.
https://www.sourceware.org/bugzilla/show_bug.cgi?id=6796

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 days agoexpm1.3: The bogus invalid floating-point exception bug has been fixed
Michael Kerrisk [Sat, 23 May 2020 09:56:12 +0000 (11:56 +0200)]
expm1.3: The bogus invalid floating-point exception bug has been fixed

Sometime around 2009 (approximately 2.11) according to
https://www.sourceware.org/bugzilla/show_bug.cgi?id=6814.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 days agoexpm1.3: The expm1() bogus underflow floating-point exception has been fixed
Michael Kerrisk [Sat, 23 May 2020 09:45:36 +0000 (11:45 +0200)]
expm1.3: The expm1() bogus underflow floating-point exception has been fixed

Fixed in glibc 2.17.

See https://www.sourceware.org/bugzilla/show_bug.cgi?id=6778

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 days agomount_namespaces.7: ffix
Michael Kerrisk [Thu, 21 May 2020 19:56:19 +0000 (21:56 +0200)]
mount_namespaces.7: ffix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 days agoldconfig.8: Mention new default for --format in glibc 2.32
Florian Weimer [Wed, 20 May 2020 16:48:02 +0000 (18:48 +0200)]
ldconfig.8: Mention new default for --format in glibc 2.32

This reflects glibc commit cad64f778aced84efdaa04ae64f8737b86f063ab
("ldconfig: Default to the new format for ld.so.cache").

Signed-off-by: Florian Weimer <fweimer@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 days agostdarg.3: SEE ALSO: add vprintf(3), vscanf(3), vsyslog(3)
Michael Kerrisk [Thu, 21 May 2020 08:30:01 +0000 (10:30 +0200)]
stdarg.3: SEE ALSO: add vprintf(3), vscanf(3), vsyslog(3)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 days agosysfs.2: SEE ALSO: add proc(5) and sysfs(5)
Michael Kerrisk [Thu, 21 May 2020 08:25:36 +0000 (10:25 +0200)]
sysfs.2: SEE ALSO: add proc(5) and sysfs(5)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 days agonfsservctl.2: SEE ALSO: add nfsd(7)
Michael Kerrisk [Thu, 21 May 2020 08:24:12 +0000 (10:24 +0200)]
nfsservctl.2: SEE ALSO: add nfsd(7)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 days agocexp2.3: Still not present in glibc 2.31
Michael Kerrisk [Thu, 21 May 2020 08:19:35 +0000 (10:19 +0200)]
cexp2.3: Still not present in glibc 2.31

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
7 days agosysfs.2: wfix
Michael Kerrisk [Thu, 21 May 2020 08:10:08 +0000 (10:10 +0200)]
sysfs.2: wfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
8 days agostandards.7: Remove mention of bogus "POSIX" names
Michael Kerrisk [Wed, 20 May 2020 12:45:23 +0000 (14:45 +0200)]
standards.7: Remove mention of bogus "POSIX" names

The terms POSIX.1-{2003,2004,2013,2016} were inventions of
my imagination, as confirmed by consulting Geoff Clare of
The Open Group. Remove these names.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
8 days agostandards.7: Add some more standards
Michael Kerrisk [Wed, 20 May 2020 10:10:44 +0000 (12:10 +0200)]
standards.7: Add some more standards

Add: SUSv4 2016 edition, POSIX.1-2017, and SUSv4 2018 edition

Reported-by: Geoff Clare <gwc@opengroup.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
9 days agodlsym.3: Extend discussion of NULL symbol values
Alexander Monakov [Sat, 16 May 2020 10:02:50 +0000 (13:02 +0300)]
dlsym.3: Extend discussion of NULL symbol values

Avoid implying that use of IFUNC is the only way to produce a
symbol with NULL value. Give more scenarios how a symbol may get
NULL value, but explain that in those scenarios dlsym() will fail
with Glibc's ld.so due to an implementation inconsistency.

Signed-off-by: Alexander Monakov <amonakov@ispras.ru>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
9 days agoveth.4: Add a more direct example
Devin J. Pohly [Mon, 18 May 2020 20:58:28 +0000 (15:58 -0500)]
veth.4: Add a more direct example

iproute2 allows you to specify the netns for either side of a veth
interface at creation time.  Add an example of this to veth(4) so
it doesn't sound like you have to move the interfaces in a
separate step.

Verified with commands:
    # ip netns add alpha
    # ip netns add bravo
    # ip link add foo netns alpha type veth peer bar netns bravo
    # ip -n alpha link show
    # ip -n bravo link show

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
9 days agohier.7: Updating from FHS 2.3 to 3.0
Thomas Piekarski [Tue, 19 May 2020 15:34:33 +0000 (17:34 +0200)]
hier.7: Updating from FHS 2.3 to 3.0

Adding description of new directories (/run, /usr/libexec,
/usr/share/color,/usr/share/ppd, /var/lib/color), stating
/usr/X11R6 as removed and updating URL to and version of FHS.

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

Reported-by: Gary Perkins <glperkins@lit.edu>
Signed-off-by: Thomas Piekarski <t.piekarski@deloquencia.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
9 days agoclone.2: Note a performance benefit of CLONE_INTO_CGROUP
Michael Kerrisk [Tue, 19 May 2020 19:41:08 +0000 (21:41 +0200)]
clone.2: Note a performance benefit of CLONE_INTO_CGROUP

As noted in email by Christian Brauner:

    I forgot to mention that spawning directly into a target
    cgroup is also more efficient than moving it after creation.
    The specific reason is mentioned in the commit message
    [ef2c41cf38a], the write lock of the semaphore need not be
    taken in contrast to when it is moved afterwards. That
    implementation details is not that interesting but it might
    be interesting to know that it provides performance benefits
    in general.

Reported-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
9 days agocgroups.7: Note the existence of the clone3() CLONE_INTO_CGROUP flag
Michael Kerrisk [Tue, 19 May 2020 19:32:10 +0000 (21:32 +0200)]
cgroups.7: Note the existence of the clone3() CLONE_INTO_CGROUP flag

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
9 days agoclone.2: Restructure text on CLONE_INTO_CGROUP use cases
Michael Kerrisk [Tue, 19 May 2020 19:24:55 +0000 (21:24 +0200)]
clone.2: Restructure text on CLONE_INTO_CGROUP use cases

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
9 days agoclone.2: wfix
Michael Kerrisk [Tue, 19 May 2020 19:16:53 +0000 (21:16 +0200)]
clone.2: wfix

Reported-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
9 days agoclone.2: Combine separate NOTES sections
Michael Kerrisk [Tue, 19 May 2020 13:42:45 +0000 (15:42 +0200)]
clone.2: Combine separate NOTES sections

Somewhere along the way, this page ended up with two NOTES
sections. Combine them.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
9 days agoclone.2: Place CLONE_INTO_CGROUP text in correct alphabetical position
Michael Kerrisk [Tue, 19 May 2020 13:38:58 +0000 (15:38 +0200)]
clone.2: Place CLONE_INTO_CGROUP text in correct alphabetical position

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
9 days agoclone.2: ERRORS: add error cases for CLONE_INTO_CGROUP
Michael Kerrisk [Tue, 19 May 2020 13:27:57 +0000 (15:27 +0200)]
clone.2: ERRORS: add error cases for CLONE_INTO_CGROUP

These errors verified by experiment.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
9 days agoclone.2: Substantial reworking of Christian Brauner's CLONE_INTO_CGROUP text
Michael Kerrisk [Tue, 19 May 2020 11:11:30 +0000 (13:11 +0200)]
clone.2: Substantial reworking of Christian Brauner's CLONE_INTO_CGROUP text

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
9 days agoclone.2: Add kernel version numbers for clone_args fields
Michael Kerrisk [Tue, 19 May 2020 10:43:32 +0000 (12:43 +0200)]
clone.2: Add kernel version numbers for clone_args fields

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
9 days agoclone.2: Some rewording of Christian Brauner's CLONE_INTO_CGROUP patch
Michael Kerrisk [Tue, 19 May 2020 10:35:30 +0000 (12:35 +0200)]
clone.2: Some rewording of Christian Brauner's CLONE_INTO_CGROUP patch

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
9 days agoclone.2: srcfix: semantic newlines
Michael Kerrisk [Tue, 19 May 2020 10:21:35 +0000 (12:21 +0200)]
clone.2: srcfix: semantic newlines

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
9 days agoclone.2: Document the clone3() CLONE_INTO_CGROUP flag
Christian Brauner [Mon, 18 May 2020 17:55:49 +0000 (19:55 +0200)]
clone.2: Document the clone3() CLONE_INTO_CGROUP flag

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
9 days agopipe.2, sigaltstack.2, abort.3, signal.7: Place SH sections in standard order
Michael Kerrisk [Tue, 19 May 2020 07:59:28 +0000 (09:59 +0200)]
pipe.2, sigaltstack.2, abort.3, signal.7: Place SH sections in standard order

Fix various pages that deviated from the norm described in
man-pages(7).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
10 days agodes_crypt.3: Minor wording fix in VERSIONS
Michael Kerrisk [Tue, 19 May 2020 07:39:01 +0000 (09:39 +0200)]
des_crypt.3: Minor wording fix in VERSIONS

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
10 days agomalloc.3: Add VERSIONS section noting when reallocarray() was added to glibc
Michael Kerrisk [Tue, 19 May 2020 06:00:43 +0000 (08:00 +0200)]
malloc.3: Add VERSIONS section noting when reallocarray() was added to glibc

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
10 days agomalloc.3: Add 'reallocarray' in NAME
Michael Kerrisk [Tue, 19 May 2020 05:59:23 +0000 (07:59 +0200)]
malloc.3: Add 'reallocarray' in NAME

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
10 days agoadjtimex.2, prctl.2, semget.2, signalfd.2, umount.2, syscall.2, dlopen.3, getgrent_r...
Michael Kerrisk [Tue, 19 May 2020 05:43:21 +0000 (07:43 +0200)]
adjtimex.2, prctl.2, semget.2, signalfd.2, umount.2, syscall.2, dlopen.3, getgrent_r.3, killpg.3: Add section number in page cross-reference (adjtime(3))

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
10 days agosched_setattr.2: tfix
Michael Kerrisk [Tue, 19 May 2020 05:47:19 +0000 (07:47 +0200)]
sched_setattr.2: tfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
10 days agoadjtimex.2: tfix
Michael Kerrisk [Tue, 19 May 2020 05:40:56 +0000 (07:40 +0200)]
adjtimex.2: tfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
10 days agoadjtimex.2: Add 'clock_adjtime' to NAME
Michael Kerrisk [Tue, 19 May 2020 05:37:13 +0000 (07:37 +0200)]
adjtimex.2: Add 'clock_adjtime' to NAME

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
10 days agoclose.2, poll.2, pthread_spin_init.3: Remove section number in page self-references
Michael Kerrisk [Tue, 19 May 2020 05:34:38 +0000 (07:34 +0200)]
close.2, poll.2, pthread_spin_init.3: Remove section number in page self-references

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
10 days agoutimensat.2: ffix
Michael Kerrisk [Tue, 19 May 2020 05:27:03 +0000 (07:27 +0200)]
utimensat.2: ffix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
10 days agogettid.2, open.2, seccomp.2, pthread_mutex_consistent.3, signal.7, xattr.7: Put SEE...
Michael Kerrisk [Tue, 19 May 2020 05:23:34 +0000 (07:23 +0200)]
gettid.2, open.2, seccomp.2, pthread_mutex_consistent.3, signal.7, xattr.7: Put SEE ALSO entries in alphabetical order

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
10 days agoVarious pages: Add missing commas in SEE ALSO part II
Kir Kolyshkin [Sat, 16 May 2020 23:34:25 +0000 (16:34 -0700)]
Various pages: Add missing commas in SEE ALSO part II

This is a sequel to commit baf17bc4f2a3f3b02d, addressing the
issues with missing commas in the middle of SEE ALSO lists that
emerged since.

The awk script from the original commit was not working and had to
be slightly modified (s/["]SEE ALSO["]/"?SEE ALSO/), otherwise it
works like a charm. Here's the fixed script and its output just
before this commit:

for f in man*/*; do
awk '
    /^.SH "?SEE ALSO/ {
sa=1; print "== " FILENAME " =="; print; next
    }
    /^\.(PP|SH)/ {
sa=0; no=0; next
    }
    /^\.BR/ {
if (sa==1) {
    print;
    if (no == 1)
print "Missing comma in " FILENAME " +" FNR-1; no=0
}
    }
    /^\.BR .*)$/ {
if (sa==1)
    no=1;
next
    }
    /\.\\"/ {next}
    /.*/ {
if (sa==1) {
    print; next
}
    }
' $f; done | grep Missing
Missing comma in man1/memusage.1 +272
Missing comma in man2/adjtimex.2 +597
Missing comma in man2/adjtimex.2 +598
Missing comma in man2/mkdir.2 +252
Missing comma in man2/sigaction.2 +1045
Missing comma in man2/sigaction.2 +1047
Missing comma in man3/mbsnrtowcs.3 +198
Missing comma in man3/ntp_gettime.3 +142
Missing comma in man3/strcmp.3 +219
Missing comma in man3/strtol.3 +302
Missing comma in man3/wcstombs.3 +120
Missing comma in man7/user_namespaces.7 +1378
Missing comma in man7/xattr.7 +198

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2 weeks agofilesystems.5: SEE ALSO: add sysfs(5) and xfs(5)
Michael Kerrisk [Wed, 13 May 2020 19:08:36 +0000 (21:08 +0200)]
filesystems.5: SEE ALSO: add sysfs(5) and xfs(5)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2 weeks agoip.7: tfix
Ondrej Slamecka [Thu, 14 May 2020 18:23:48 +0000 (19:23 +0100)]
ip.7: tfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2 weeks agoprctl.2: ffix
Michael Kerrisk [Wed, 13 May 2020 11:44:06 +0000 (13:44 +0200)]
prctl.2: ffix

Reported-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2 weeks agoprctl.2: Soften Dave Martin's warning about the use of prctl()
Michael Kerrisk [Wed, 13 May 2020 11:37:45 +0000 (13:37 +0200)]
prctl.2: Soften Dave Martin's warning about the use of prctl()

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2 weeks agoprctl.2: Clarify the unsupported hardware case of EINVAL
Dave Martin [Tue, 12 May 2020 16:36:57 +0000 (17:36 +0100)]
prctl.2: Clarify the unsupported hardware case of EINVAL

prctls that are architecture-specific won't work on other
architectures, and arch-specific prctls that manipulate optional
hardware features likewise won't work if that hardware feature is
not present.

The established pattern seems to be to treat such prctls as if they
are unimplemented, when attempted on the wrong hardware.

Cover these cases with some generic weasel words in the closet
existing EINVAL clause.

Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2 weeks agoprctl.2: ffix to "Work around bogus constant "maxsig" in PR_SET_PDEATHSIG" patch
Michael Kerrisk [Wed, 13 May 2020 10:44:23 +0000 (12:44 +0200)]
prctl.2: ffix to "Work around bogus constant "maxsig" in PR_SET_PDEATHSIG" patch

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2 weeks agoprctl.2: wfix to "prctl.2: Document removal of Intel MPX prctls" patch
Michael Kerrisk [Wed, 13 May 2020 10:41:31 +0000 (12:41 +0200)]
prctl.2: wfix to "prctl.2: Document removal of Intel MPX prctls" patch

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2 weeks agoprctl.2: tfix to "prctl.2: Add health warning" patch
Michael Kerrisk [Wed, 13 May 2020 10:37:58 +0000 (12:37 +0200)]
prctl.2: tfix to "prctl.2: Add health warning" patch

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2 weeks agoprctl.2: tfix: minor punctuation in SPECULATION_CTRL prctls
Dave Martin [Tue, 12 May 2020 16:36:54 +0000 (17:36 +0100)]
prctl.2: tfix: minor punctuation in SPECULATION_CTRL prctls

Fix a few very minor bits of punctuation in
PR_SET_SPECULATION_CTRL and PR_GET_SPECULATION_CTRL.

Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2 weeks agoprctl.2: Work around bogus constant "maxsig" in PR_SET_PDEATHSIG
Dave Martin [Tue, 12 May 2020 16:36:53 +0000 (17:36 +0100)]
prctl.2: Work around bogus constant "maxsig" in PR_SET_PDEATHSIG

The description of PR_SET_PDEATHSIG refers to "maxsig", which
is apparently intended to stand for the maximum defined signal
number.

maxsig seems not to be a thing, even in the kernel.

Reword to use the standard constant NSIG.  (Discussion of SIGRTMIN
and SIGRTMAX seems out of scope here, and anyway is not relevant
to the kernel.)

Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2 weeks agoprctl.2: Document removal of Intel MPX prctls
Dave Martin [Tue, 12 May 2020 16:36:52 +0000 (17:36 +0100)]
prctl.2: Document removal of Intel MPX prctls

The Intel MPX API was removed from Linux 5.4.  See Linux
commit f240652b6032 ("x86/mpx: Remove MPX APIs")

Acked-by: Dave Hansen <dave.hansen@linux.intel.com>
Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2 weeks agoprctl.2: Sort prctls into alphabetical order
Dave Martin [Tue, 12 May 2020 16:36:50 +0000 (17:36 +0100)]
prctl.2: Sort prctls into alphabetical order

The prctl list has historically been sorted by prctl name (ignoring
any SET_ or GET_ prefix) to make individual prctls easier to find.
Some noise seems to have crept in since.

Sort the list back into order.  Similarly, reorder the list of
prctls specified to return non-zero values on success.

Content movement only.  No semantic change.

Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2 weeks agoprctl.2: srcfix: add comments for navigation
Dave Martin [Tue, 12 May 2020 16:36:49 +0000 (17:36 +0100)]
prctl.2: srcfix: add comments for navigation

The prctl.2 source is unnecessarily hard to navigate, not least
because prctl option flags are traditionally named PR_* and so look
just like prctl names.

For each actual prctl, add a comment of the form

.\" prctl PR_FOO

to make it move obvious where each top-level prctl starts.

Of course, we could add some clever macros, but let's not confuse
dumb parsers.

Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2 weeks agoprctl.2: Add health warning
Dave Martin [Tue, 12 May 2020 16:36:47 +0000 (17:36 +0100)]
prctl.2: Add health warning

In reality, almost every prctl interferes with assumptions that the
compiler and C library / runtime rely on.  prctl() can therefore
make userspace explode in a variety ways that are likely to be hard
to debug.

This is not obvious to the uninitiated, so add a warning.

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