]> git.ipfire.org Git - thirdparty/man-pages.git/log
thirdparty/man-pages.git
3 years 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>
3 years 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>
3 years 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>
3 years 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>
3 years 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>
3 years 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>
3 years 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>
3 years 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>
3 years 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>
3 years 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>
3 years 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>
3 years 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>
3 years 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>
3 years 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>
3 years 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>
3 years 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>
3 years 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>
3 years 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>
3 years 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>
3 years 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>
3 years 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>
3 years 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>
3 years 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>
3 years 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>
3 years 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>
3 years 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>
3 years 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>
3 years 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>
3 years 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>
3 years 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>
3 years 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>
3 years 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>
3 years 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>
3 years 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>
3 years 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>
3 years 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>
3 years 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>
3 years 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>
3 years 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>
3 years 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>
3 years 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>
3 years 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>
3 years 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>
3 years 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>
3 years 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>
3 years 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>
3 years agoprctl.2: Fix mis-description of thread ID values in procfs
Dave Martin [Tue, 12 May 2020 16:36:48 +0000 (17:36 +0100)] 
prctl.2: Fix mis-description of thread ID values in procfs

Under PR_SET_NAME, the [tid] value seen in procfs as
/proc/self/task/[tid] is mistakenly described as the name of the
thread, whereas really the name is on /proc/self/task/[tid]/comm.

Fix it.

Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 years agoprctl.2: Clarify that prctl can apply to threads
Dave Martin [Tue, 12 May 2020 16:36:46 +0000 (17:36 +0100)] 
prctl.2: Clarify that prctl can apply to threads

The current synopsis for prctl(2) misleadingly claims that prctl
operates on a process.  Rather, some (in fact, most) prctls operate
on a thread.

The wording probably dates back to the old days when Linux didn't
really have threads at all.

Reword as appropriate.

Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 years agostat.2: Minor reworking of text describing AT_NO_AUTOMOUNT
Michael Kerrisk [Tue, 12 May 2020 09:35:35 +0000 (11:35 +0200)] 
stat.2: Minor reworking of text describing AT_NO_AUTOMOUNT

No content changes. Just put things in a slightly more logical
order and add a few paragraph breaks for readability.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 years agosymlink.7: Describe differences in the treatment of symlinks in the dirname
Michael Kerrisk [Tue, 12 May 2020 07:47:18 +0000 (09:47 +0200)] 
symlink.7: Describe differences in the treatment of symlinks in the dirname

Describe differences in the treatment of symlinks in the dirname
part of pathname.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 years agoopen.2: Some '*at' APIs have functionality that isn't in conventional APIs
Michael Kerrisk [Tue, 12 May 2020 07:38:09 +0000 (09:38 +0200)] 
open.2: Some '*at' APIs have functionality that isn't in conventional APIs

Note that another reason to use the *at() APIs is to access
'flags' functionality that is not available in the corresponding
conventional APIs.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 years agosymlink.7: wfix
Michael Kerrisk [Tue, 12 May 2020 06:55:33 +0000 (08:55 +0200)] 
symlink.7: wfix

The close proximity of an em-dash and a hyphen is a little
visually jarring.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 years agostat.2: wfix ("it" used with two different referents in same sentence)
Michael Kerrisk [Tue, 12 May 2020 06:46:13 +0000 (08:46 +0200)] 
stat.2: wfix ("it" used with two different referents in same sentence)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 years agoopen.2: Explain ways in which a 'directory file descriptor' can be obtained
Michael Kerrisk [Tue, 12 May 2020 06:45:06 +0000 (08:45 +0200)] 
open.2: Explain ways in which a 'directory file descriptor' can be obtained

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 years agoopen.2: wfix
Michael Kerrisk [Tue, 12 May 2020 06:03:52 +0000 (08:03 +0200)] 
open.2: wfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 years agoopen.2: Add a few more APIs to list in "Rationale for openat()..."
Michael Kerrisk [Tue, 12 May 2020 05:43:41 +0000 (07:43 +0200)] 
open.2: Add a few more APIs to list in "Rationale for openat()..."

There have been a few more dirfd APIs added in recent times.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 years agodirfd.3: SEE ALSO: add openat(2)
Michael Kerrisk [Tue, 12 May 2020 05:07:30 +0000 (07:07 +0200)] 
dirfd.3: SEE ALSO: add openat(2)

By way of a hint that the file descriptor returned by dirfd()
could usefully be fed to the *at() APIs.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 years agosetenv.3: wfix
Kir Kolyshkin [Mon, 11 May 2020 17:58:26 +0000 (10:58 -0700)] 
setenv.3: wfix

Both functions behave the same wrt return value, no need to describe
them separately.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 years agopid_namespaces.7: Note that /proc/sys/kernel/ns_last_pid is virtualized per PID NS
Michael Kerrisk [Mon, 11 May 2020 12:07:36 +0000 (14:07 +0200)] 
pid_namespaces.7: Note that /proc/sys/kernel/ns_last_pid is virtualized per PID NS

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 years agopid_namespaces.7: Correct capability requirements for write to /proc/sys/kernel/ns_la...
Michael Kerrisk [Mon, 11 May 2020 12:04:17 +0000 (14:04 +0200)] 
pid_namespaces.7: Correct capability requirements for write to /proc/sys/kernel/ns_last_pid

CAP_SYS_ADMIN is needed in the user NS that owns the PID NS.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 years agoclose.2: Note behavior when close() happens in a parallel thread
Michael Kerrisk [Fri, 8 May 2020 15:44:01 +0000 (17:44 +0200)] 
close.2: Note behavior when close() happens in a parallel thread

If one thread is blocked in an I/O system call on a file descriptor
that is closed in another thread, then the blocking system call
does not return immediately, but rather when the I/O operation
completes. This surprises some people, but is longstanding
behavior.

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

and

https://lore.kernel.org/lkml/3B1E3D86.C7A7874@canal-plus.fr/
To: linux-kernel@vger.kernel.org
Subject: PROBLEM: I/O system call never returns if file desc is closed in the  meantime
Date: Wed, 06 Jun 2001 16:26:14 +0200

Examples where people are surprised by this behavior:
https://www.linuxquestions.org/questions/linux-networking-3/recv-is-not-coming-out-of-blocking-after-closing-the-socket-459461/
https://stackoverflow.com/questions/3589723/can-a-socket-be-closed-from-another-thread-when-a-send-recv-on-the-same-socket

Reported-by: Thierry Lelegard <thierry.lelegard@canal-plus.fr>
Reported-by: Lukas Czerner <lczerner@redhat.com>
Reported-by: Peter Schiffer <pschiffe@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 years agosyscall.2: arm64: Fix syscall number register size
Dave Martin [Tue, 5 May 2020 15:24:40 +0000 (16:24 +0100)] 
syscall.2: arm64: Fix syscall number register size

arm64 is currently documented as receiving the syscall number in
x8.

While this is the correct register, the syscall number is a 32-bit
integer.  Bits [63:32] are ignored by the kernel.

So it is more correct to say "w8".

Acked-by: Will Deacon <will@kernel.org>
Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 years agosyscall.2: arm: Use real register names for arm/OABI
Dave Martin [Tue, 5 May 2020 15:24:39 +0000 (16:24 +0100)] 
syscall.2: arm: Use real register names for arm/OABI

The arm OABI syscall interface is currently documented in terms of
register name aliases defined by the ARM Procedure Call Standard
(APCS).  However, these don't make sense in the context of a
binary interface that doesn't comply (or need to comply) with
APCS.

Use the real architectural register names instead.

The names a1-a4, v1... are just aliases for r0-r3, r4... anyway,
so the interface is just the same regardless of which set of names
is used.

Acked-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 years agoloop.4: 'lo_flags' is nowadays "r/w"
Michael Kerrisk [Wed, 6 May 2020 09:33:21 +0000 (11:33 +0200)] 
loop.4: 'lo_flags' is nowadays "r/w"

Since kernel commit 96c5865559cee0f9cbc5173f3c949f6ce3525581,
the 'lo_flags' field is modifiable via the LOOP_SET_STATUS and
LOOP_SET_STATUS64 ioctl() operations.

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

Reported-by: Vlad <cvazir@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 years agoloop.4: ffix
Michael Kerrisk [Wed, 6 May 2020 09:28:00 +0000 (11:28 +0200)] 
loop.4: ffix

In preparation for next patch

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 years agocopy_file_range.2: tfix
Michael Kerrisk [Mon, 4 May 2020 08:29:01 +0000 (10:29 +0200)] 
copy_file_range.2: tfix

There are 2 typos:
file_in is used instead of fd_in in the ERRORS and NOTES sections.
file_out is used instead of fd_out in the ERRORS section.

Reported-by: Ricardo Castano <ricardo.castano.salinas@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 years agotcp.7: Update info on tcp_syn_retries default value
Michael Kerrisk [Mon, 4 May 2020 08:21:57 +0000 (10:21 +0200)] 
tcp.7: Update info on tcp_syn_retries default value

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

Reported-by: vrafaeli@msn.com
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 years agonamespaces.7: srcfix: Quote Eric Biederman on significance of st_dev in ns comparisons
Michael Kerrisk [Sat, 2 May 2020 19:28:09 +0000 (21:28 +0200)] 
namespaces.7: srcfix: Quote Eric Biederman on significance of st_dev in ns comparisons

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 years agoinotify.7: Add missing #include in example program
Michael Kerrisk [Fri, 1 May 2020 19:21:09 +0000 (21:21 +0200)] 
inotify.7: Add missing #include in example program

Reported-by: Jason Etherton <jason@ethertonltd.co.uk>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 years agoexecve.2: Clarify signal sent to the process on late failure
Nikola Forró [Wed, 29 Apr 2020 15:30:19 +0000 (17:30 +0200)] 
execve.2: Clarify signal sent to the process on late failure

Signed-off-by: Nikola Forró <nforro@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 years agostatfs.2: Add SMB2 constant to filesystem types list
Michael Kerrisk [Wed, 29 Apr 2020 19:47:58 +0000 (21:47 +0200)] 
statfs.2: Add SMB2 constant to filesystem types list

Reported-by: David Adam <zanchey@ucc.gu.uwa.edu.au>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 years agowait4.2: Update wait3() feature test macro requirements for changes in glibc 2.26
Michael Kerrisk [Wed, 29 Apr 2020 19:31:30 +0000 (21:31 +0200)] 
wait4.2: Update wait3() feature test macro requirements for changes in glibc 2.26

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 years agosetlogmask.3: Note that LOG_UPTO() is included in the next POSIX release
Michael Kerrisk [Wed, 29 Apr 2020 11:46:42 +0000 (13:46 +0200)] 
setlogmask.3: Note that LOG_UPTO() is included in the next POSIX release

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 years agopoll.2: srcfix: add pointer to Austin bug where ppoll() is proposed for POSIX
Michael Kerrisk [Wed, 29 Apr 2020 10:35:03 +0000 (12:35 +0200)] 
poll.2: srcfix: add pointer to Austin bug where ppoll() is proposed for POSIX

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 years agocmsg.3: CONFORMING TO: note which CMSG_* APIs are in current and upcoming POSIX
Michael Kerrisk [Wed, 29 Apr 2020 10:27:54 +0000 (12:27 +0200)] 
cmsg.3: CONFORMING TO: note which CMSG_* APIs are in current and upcoming POSIX

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 years agodlopen.3: srcfix: add URL relevant for BUGS
Michael Kerrisk [Wed, 29 Apr 2020 07:28:48 +0000 (09:28 +0200)] 
dlopen.3: srcfix: add URL relevant for BUGS

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoftw.3: glibc eventually fixed a regression in FTW_SLN behavior
Michael Kerrisk [Tue, 28 Apr 2020 11:17:06 +0000 (13:17 +0200)] 
ftw.3: glibc eventually fixed a regression in FTW_SLN behavior

For details, see:
https://bugzilla.redhat.com/show_bug.cgi?id=1422736
http://austingroupbugs.net/view.php?id=1121
https://bugzilla.redhat.com/show_bug.cgi?id=1422736

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agonetlink.7: Update path for NETLINK_CONNECTOR docs in kernel source tree
Michael Kerrisk [Tue, 28 Apr 2020 09:10:20 +0000 (11:10 +0200)] 
netlink.7: Update path for NETLINK_CONNECTOR docs in kernel source tree

Reported-by: Idan Katz <idanski1@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agouser_namespaces.7: tfix
Jakub Wilk [Mon, 27 Apr 2020 13:38:56 +0000 (15:38 +0200)] 
user_namespaces.7: tfix

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agotzfile.5: Sync to 2020a tzdb release
Michael Kerrisk [Mon, 27 Apr 2020 05:29:37 +0000 (07:29 +0200)] 
tzfile.5: Sync to 2020a tzdb release

From https://www.iana.org/time-zones, version 2020a.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agozdump.8: ffix
Michael Kerrisk [Mon, 27 Apr 2020 05:17:24 +0000 (07:17 +0200)] 
zdump.8: ffix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agozdump.8: Update to latest upstream tz release
Michael Kerrisk [Mon, 27 Apr 2020 05:13:22 +0000 (07:13 +0200)] 
zdump.8: Update to latest upstream tz release

This update addresses an issue described in
https://bugzilla.kernel.org/show_bug.cgi?id=207345

In answer to my question, Paul Eggert noted:

    > Where do I find it?

    https://www.iana.org/time-zones

    Look under "Latest version", which is 2020a.

Reported-by: Paul Eggert <eggert@cs.ucla.edu>
Reported-by: Marco Curreli <marcocurreli@tiscali.it>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoptsname.3: Fix description of failure behaviour of ptsname_r()
Bruno Haible [Sat, 26 Jan 2019 13:31:56 +0000 (14:31 +0100)] 
ptsname.3: Fix description of failure behaviour of ptsname_r()

The Linux man page for ptsname_r, when describing the behaviour
in the error case, is
  - not consistent with the future POSIX standard (POSIX Issue 8).
  - not consistent with musl libc.

Find attached a patch to
  - keep it consistent with what glibc does,
  - make it consistent with musl libc,
  - make it consistent with the future POSIX standard (POSIX
    Issue 8).

Details:

glibc's implementation of ptsname_r, when it fails, returns the
error code as return value AND sets errno. See
https://sourceware.org/git/?p=glibc.git;a=blob;f=login/ptsname.c
https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/mach/hurd/ptsname.c
https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/ptsname.c

musl's implementation of ptsname_r, when it fails, returns the error code
but does NOT set errno. See
https://git.musl-libc.org/cgit/musl/tree/src/misc/pty.c

The proposal to add ptsname_r to POSIX, with text

  "If successful, the ptsname_r( ) function shall return zero.
   Otherwise, an error number shall be returned to indicate the
   error."

has been accepted for inclusion in POSIX Issue 8.
http://austingroupbugs.net/view.php?id=508

Therefore a portable program should look at the return value from
ptsname_r, NOT the errno value. The current text in the man page
suggests to look at the errno value, which is wrong (because of
musl libc) and not future-proof (because of future POSIX).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoio_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2: Change uses of...
Michael Kerrisk [Sat, 25 Apr 2020 07:02:18 +0000 (09:02 +0200)] 
io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2: Change uses of aio_context_t to io_context_t

Reported-by: Andi Kleen <andi@firstfloor.org>
Reported-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agortnetlink.7: Minor consistency fixes
Michael Kerrisk [Fri, 24 Apr 2020 20:11:13 +0000 (22:11 +0200)] 
rtnetlink.7: Minor consistency fixes

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoprctl.2: wfix
Michael Kerrisk [Fri, 24 Apr 2020 19:53:10 +0000 (21:53 +0200)] 
prctl.2: wfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoxattr.7: Add attr(1) as relevant page to SEE ALSO
Achilles Gaikwad [Fri, 24 Apr 2020 16:02:52 +0000 (21:32 +0530)] 
xattr.7: Add attr(1) as relevant page to SEE ALSO

The page of attr(1) is relevant to xattrs, therefore add it to the
SEE ALSO section.

attr(1) command works for other filesystems as well.

Signed-off-by: Achilles Gaikwad <agaikwad@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agortnetlink.7: Various tweaks to Jan Moskyto Matejka's patch
Michael Kerrisk [Thu, 23 Apr 2020 19:48:09 +0000 (21:48 +0200)] 
rtnetlink.7: Various tweaks to Jan Moskyto Matejka's patch

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agortnetlink.7: Add missing RTA_* attributes
Jan Moskyto Matejka [Thu, 23 Apr 2020 19:28:05 +0000 (21:28 +0200)] 
rtnetlink.7: Add missing RTA_* attributes

Used Bird's source code, kernel source code, iproute2 source code
and iproute2 manpages to find meanings of these new attributes.

Signed-off-by: Jan Moskyto Matejka <mq@ucw.cz>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agonewlocale.3: Fix a valgrind issue in example program
Michael Kerrisk [Thu, 23 Apr 2020 12:49:29 +0000 (14:49 +0200)] 
newlocale.3: Fix a valgrind issue in example program

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

Reported-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agofanotify_mark.2: ffix
Michael Kerrisk [Thu, 23 Apr 2020 12:46:41 +0000 (14:46 +0200)] 
fanotify_mark.2: ffix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agofanotify_mark.2: Remove mention of FAN_Q_OVERFLOW as an input value in 'mask'
Michael Kerrisk [Thu, 23 Apr 2020 12:31:27 +0000 (14:31 +0200)] 
fanotify_mark.2: Remove mention of FAN_Q_OVERFLOW as an input value in 'mask'

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

Reported-by: Alexander Morozov <alexandermv@gmail.com>
Reported-by: Amir Goldstein <amir73il@gmail.com>
Reported-by: Jan Kara <jack@suse.cz>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agonetdevice.7: Minor rewording
Michael Kerrisk [Thu, 23 Apr 2020 11:55:16 +0000 (13:55 +0200)] 
netdevice.7: Minor rewording

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

Reported-by: alexopo.ceid@gmail.com
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoip.7: SEE ALSO: add netdevice(7)
Michael Kerrisk [Thu, 23 Apr 2020 11:48:37 +0000 (13:48 +0200)] 
ip.7: SEE ALSO: add netdevice(7)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agosem_getvalue.3: Note that glibc's sem_getvalue() doesn't return EINVAL errors
Michael Kerrisk [Thu, 23 Apr 2020 09:24:36 +0000 (11:24 +0200)] 
sem_getvalue.3: Note that glibc's sem_getvalue() doesn't return EINVAL errors

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

Reported-by: Andrea Galbusera <gizero@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoip.7: Note a few more valid 'protocol' values
Michael Kerrisk [Thu, 23 Apr 2020 09:12:05 +0000 (11:12 +0200)] 
ip.7: Note a few more valid 'protocol' values

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

Reported-by: Martin Doucha <mdoucha@suse.cz>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agolp.4: tfix + ffix
Michael Kerrisk [Wed, 22 Apr 2020 20:12:40 +0000 (22:12 +0200)] 
lp.4: tfix + ffix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agogetdtablesize.3: Remove redundant statment that getdtablesize() is a library function
Michael Kerrisk [Wed, 22 Apr 2020 19:46:09 +0000 (21:46 +0200)] 
getdtablesize.3: Remove redundant statment that getdtablesize() is a library function

Redundant because this is a Section 3 page, and the
text also describes the implementation in glibc.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agomremap.2: Describe some use cases for MREMAP_DONTUNMAP
Michael Kerrisk [Wed, 22 Apr 2020 12:04:58 +0000 (14:04 +0200)] 
mremap.2: Describe some use cases for MREMAP_DONTUNMAP

Reported-by: Brian Geffon <bgeffon@google.com>
Reported-by: Lokesh Gidra <lokeshgidra@google.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agomremap.2: wfix
Michael Kerrisk [Wed, 22 Apr 2020 11:49:03 +0000 (13:49 +0200)] 
mremap.2: wfix

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