Commit Graph

20940 Commits

Author SHA1 Message Date
Kir Kolyshkin bba4bbbd9a Various pages: Add missing commas in SEE ALSO part II
This is a sequel to commit baf17bc4f2, 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>
2020-05-18 21:37:48 +02:00
Michael Kerrisk aa02339ca4 filesystems.5: SEE ALSO: add sysfs(5) and xfs(5)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-15 11:50:47 +02:00
Ondrej Slamecka 448d14e716 ip.7: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-15 11:49:54 +02:00
Michael Kerrisk 11b0b31a14 prctl.2: ffix
Reported-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-13 13:44:06 +02:00
Michael Kerrisk cd41e08cbf prctl.2: Soften Dave Martin's warning about the use of prctl()
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-13 13:37:45 +02:00
Dave Martin f7abc99cf9 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>
2020-05-13 12:49:36 +02:00
Michael Kerrisk 49a88f5dec prctl.2: ffix to "Work around bogus constant "maxsig" in PR_SET_PDEATHSIG" patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-13 12:44:23 +02:00
Michael Kerrisk 230dd8d060 prctl.2: wfix to "prctl.2: Document removal of Intel MPX prctls" patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-13 12:41:31 +02:00
Michael Kerrisk 0841915dee prctl.2: tfix to "prctl.2: Add health warning" patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-13 12:37:58 +02:00
Dave Martin e6935958b7 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>
2020-05-13 12:34:28 +02:00
Dave Martin bfc592db67 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>
2020-05-13 12:34:13 +02:00
Dave Martin 2ab5fe267f 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>
2020-05-13 12:34:02 +02:00
Dave Martin 194ccff9cc 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>
2020-05-13 12:33:53 +02:00
Dave Martin 667eb3ac39 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>
2020-05-13 12:33:45 +02:00
Dave Martin ec5cb536b1 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>
2020-05-13 12:32:50 +02:00
Dave Martin 5aaf1385fb 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>
2020-05-13 12:32:40 +02:00
Dave Martin 1e0d99b899 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>
2020-05-13 12:32:32 +02:00
Michael Kerrisk 3f1dc8e16a 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>
2020-05-12 11:35:35 +02:00
Michael Kerrisk 7200e79646 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>
2020-05-12 09:47:18 +02:00
Michael Kerrisk 4146f81b7d 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>
2020-05-12 09:43:01 +02:00
Michael Kerrisk 9660f3baaf 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>
2020-05-12 09:43:01 +02:00
Michael Kerrisk 4d989e3563 stat.2: wfix ("it" used with two different referents in same sentence)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-12 09:42:56 +02:00
Michael Kerrisk 96c44b8f50 open.2: Explain ways in which a 'directory file descriptor' can be obtained
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-12 08:45:06 +02:00
Michael Kerrisk aec13430b1 open.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-12 08:03:52 +02:00
Michael Kerrisk 5c30e7cd9d 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>
2020-05-12 07:43:41 +02:00
Michael Kerrisk 7022462f1d 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>
2020-05-12 07:07:30 +02:00
Kir Kolyshkin 483368b3b1 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>
2020-05-11 20:17:05 +02:00
Michael Kerrisk 3f298932bd 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>
2020-05-11 14:07:36 +02:00
Michael Kerrisk 439526d153 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>
2020-05-11 14:06:09 +02:00
Michael Kerrisk c2f15a1349 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>
2020-05-09 13:24:39 +02:00
Dave Martin 3862672084 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>
2020-05-06 12:14:18 +02:00
Dave Martin f13396bc2d 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>
2020-05-06 12:03:22 +02:00
Michael Kerrisk 2b38639ab9 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>
2020-05-06 11:36:20 +02:00
Michael Kerrisk ff1cac76a3 loop.4: ffix
In preparation for next patch

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-06 11:36:20 +02:00
Michael Kerrisk 3bd3ade0aa 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>
2020-05-04 10:29:01 +02:00
Michael Kerrisk 25da04997e 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>
2020-05-04 10:21:57 +02:00
Michael Kerrisk 0dd34252fd namespaces.7: srcfix: Quote Eric Biederman on significance of st_dev in ns comparisons
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-02 21:29:04 +02:00
Michael Kerrisk 113a073baf 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>
2020-05-02 21:28:59 +02:00
Nikola Forró bdc01e533e 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>
2020-04-29 21:50:22 +02:00
Michael Kerrisk 9e91819909 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>
2020-04-29 21:50:09 +02:00
Michael Kerrisk d8e46424aa wait4.2: Update wait3() feature test macro requirements for changes in glibc 2.26
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-29 21:31:30 +02:00
Michael Kerrisk e9378590c4 setlogmask.3: Note that LOG_UPTO() is included in the next POSIX release
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-29 13:54:13 +02:00
Michael Kerrisk 20b82882f3 poll.2: srcfix: add pointer to Austin bug where ppoll() is proposed for POSIX
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-29 13:54:13 +02:00
Michael Kerrisk 34b0e020fd cmsg.3: CONFORMING TO: note which CMSG_* APIs are in current and upcoming POSIX
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-29 13:54:13 +02:00
Michael Kerrisk 0f5538870d dlopen.3: srcfix: add URL relevant for BUGS
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-29 09:28:48 +02:00
Michael Kerrisk 518271052d 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>
2020-04-28 13:18:18 +02:00
Michael Kerrisk 2ece4ef7c6 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>
2020-04-28 11:10:20 +02:00
Jakub Wilk dcf91cdc7e user_namespaces.7: tfix
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-27 21:29:42 +02:00
Michael Kerrisk 63fd767f64 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>
2020-04-27 07:29:37 +02:00
Michael Kerrisk 7ab4eb9aae zdump.8: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-27 07:17:24 +02:00