Michael Kerrisk
820e13fbd4
socket.7: srcfix: rewrap source lines
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-28 07:20:31 +01:00
Sridhar Samudrala
e8500ecc78
socket.7: Document SO_INCOMING_NAPI_ID
...
Signed-off-by: Sridhar Samudrala <sridhar.samudrala@intel.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-28 07:15:43 +01:00
Michael Kerrisk
f36f4f855b
strtol.3: ffix
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-28 07:01:01 +01:00
Michael Kerrisk
b6a968bca7
strtol.3: srcfix: Add myself to copyright
...
I added the xample program in 2006, but omitted to add myself to the
copyright.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-27 20:00:23 +01:00
Michael Kerrisk
30d41ce662
FIXME_list.sh: Fix broken regexp
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-27 19:42:47 +01:00
Michael Kerrisk
4111ac7675
perf_event_open.2: wfix
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-27 17:59:36 +01:00
Michael Kerrisk
0f66701491
perf_event_open.2: wfix
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-27 17:55:07 +01:00
Alexey Budankov
d19b29a5bc
perf_event_open.2: Update the man page with CAP_PERFMON related information
...
Extend this page with the information about CAP_PERFMON capability
designed to secure performance monitoring and observability
operation in a system according to the principle of least
privilege [1] (POSIX IEEE 1003.1e, 2.2.2.39).
[1] https://sites.google.com/site/fullycapable/ , posix_1003.1e-990310.pdf
Signed-off-by: Alexey Budankov <alexey.budankov@linux.intel.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-27 17:53:10 +01:00
Alejandro Colomar
900d564055
system_data_types.7: off_t: Add note about _FILE_OFFSET_BITS
...
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-27 17:34:55 +01:00
Michael Kerrisk
8573214f58
lseek64.3: Since glibc 2.28. the 'llseek' symbol is no longer available
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-27 17:08:18 +01:00
Jann Horn
20e43cd694
proc.5: Document inaccurate RSS due to SPLIT_RSS_COUNTING
...
[mtk: Manually applied patch, because of conflicts with other
merged changes; also added an edit suggested by Jann; see the
thread at
https://lore.kernel.org/linux-man/20201012114940.1317510-1-jannh@google.com/ ]
Since 34e55232e59f7b19050267a05ff1226e5cd122a5 (introduced back in
v2.6.34), Linux uses per-thread RSS counters to reduce cache
contention on the per-mm counters. With a 4K page size, that means
that you can end up with the counters off by up to 252KiB per
thread.
Example:
$ cat rsstest.c
#include <stdlib.h>
#include <err.h>
#include <stdio.h>
#include <signal.h>
#include <unistd.h>
#include <sys/mman.h>
#include <sys/eventfd.h>
#include <sys/prctl.h>
void dump(int pid) {
char cmd[1000];
sprintf(cmd,
"grep '^VmRSS' /proc/%d/status;"
"grep '^Rss:' /proc/%d/smaps_rollup;"
"echo",
pid, pid
);
system(cmd);
}
int main(void) {
eventfd_t dummy;
int child_wait = eventfd(0, EFD_SEMAPHORE|EFD_CLOEXEC);
int child_resume = eventfd(0, EFD_SEMAPHORE|EFD_CLOEXEC);
if (child_wait == -1 || child_resume == -1) err(1, "eventfd");
pid_t child = fork();
if (child == -1) err(1, "fork");
if (child == 0) {
if (prctl(PR_SET_PDEATHSIG, SIGKILL)) err(1, "PDEATHSIG");
if (getppid() == 1) exit(0);
char *mapping = mmap(NULL, 80 * 0x1000, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
eventfd_write(child_wait, 1);
eventfd_read(child_resume, &dummy);
for (int i=0; i<40; i++) mapping[0x1000 * i] = 1;
eventfd_write(child_wait, 1);
eventfd_read(child_resume, &dummy);
for (int i=40; i<80; i++) mapping[0x1000 * i] = 1;
eventfd_write(child_wait, 1);
eventfd_read(child_resume, &dummy);
exit(0);
}
eventfd_read(child_wait, &dummy);
dump(child);
eventfd_write(child_resume, 1);
eventfd_read(child_wait, &dummy);
dump(child);
eventfd_write(child_resume, 1);
eventfd_read(child_wait, &dummy);
dump(child);
eventfd_write(child_resume, 1);
exit(0);
}
$ gcc -o rsstest rsstest.c && ./rsstest
VmRSS: 68 kB
Rss: 616 kB
VmRSS: 68 kB
Rss: 776 kB
VmRSS: 812 kB
Rss: 936 kB
$
Let's document that those counters aren't entirely accurate.
Reported-by: Mark Mossberg <mark.mossberg@gmail.com>
Signed-off-by: Jann Horn <jannh@google.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-27 14:52:08 +01:00
Michael Kerrisk
14948ad6ec
proc.5: Minor fixes
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-27 14:51:44 +01:00
Michael Kerrisk
bd13ace0c5
proc.5: ffix: use a hanging list as is done elsewhere in the page
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-27 14:51:44 +01:00
Alejandro Colomar
4492c4bf2c
system_data_types.7: ffix
...
Format section names inside each type.
Follow the same pattern as in stat.2 (see line 158: ".IR Note :")
Before this ffix, it was visually harder to find sections inside a type.
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-27 14:51:44 +01:00
Alejandro Colomar
476e632b65
system_data_types.7: ffix
...
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-27 14:51:44 +01:00
Michael Kerrisk
2fbfb575b8
capabilities.7: Under CAP_SYS_ADMIN, group "sub-capabilities" together
...
CAP_BPF, CAP_PERFMON, and CAP_CHECKPOINT_RESTORE have all been
added to split out the power of CAP_SYS_ADMIN into weaker pieces.
Group all of these capabilities together in the list under
CAP_SYS_ADMIN, to make it clear that there is a pattern to these
capabilities.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-27 14:51:44 +01:00
Michael Kerrisk
045c5bde77
capabilities.7: CAP_SYS_ADMIN implies CAP_CHECKPOINT_RESTORE
...
But the latter, weaker capability is preferred.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-27 14:51:44 +01:00
Michael Kerrisk
a526aa4040
capabilities.7: tfix
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-27 14:51:44 +01:00
Michael Kerrisk
71f6247f3c
capabilities.7: Document the CAP_CHECKPOINT_RESTORE capability added in Linux 5.9
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-27 14:51:44 +01:00
Michael Kerrisk
167f94b707
proc.5: Update capability requirements for accessing /proc/[pid]/map_files
...
The requirements changed with kernel commit 12886f8ab10ce6.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-27 14:51:44 +01:00
Michael Kerrisk
1e516a820b
pid_namespaces.7: Update capability requirements for /proc/sys/kernel/ns_last_pid
...
Since Linux 5.9, CONFIG_CHECKPOINT_RESTORE also allows writing to
/proc/sys/kernel/ns_last_pid.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-27 14:51:44 +01:00
Michael Kerrisk
1e4d6750e0
clone.2: CAP_CHECKPOINT_RESTORE can now be used to employ 'set_tid'
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-27 14:51:44 +01:00
Michael Kerrisk
874355e30b
capabilities.7: Add kernel doc reference for CAP_PERFMON
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-27 14:51:44 +01:00
Michael Kerrisk
f7cf9c0bf0
capabilities.7: ffix
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-27 14:51:44 +01:00
Michael Kerrisk
3af4e9733e
posix_fallocate.3: wfix
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-27 14:51:44 +01:00
Érico Rolim
d5ee3a149e
posix_fallocate.3: add EOPNOTSUPP error code.
...
As can be seen in
https://git.musl-libc.org/cgit/musl/tree/src/fcntl/posix_fallocate.c?id=73cc775bee53300c7cf759f37580220b18ac13d3
musl libc returns the syscall's errors directly, which means it
doesn't perform the same emulation as glibc, and can return
EOPNOTSUPP to an application, which isn't listed in ERRORS.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-27 14:51:44 +01:00
Michael Kerrisk
631337cee3
system_data_types.7: Promote makedev(3) in discussion of 'dev_t'
...
makedev(3) provides much more detail on this type, so mention it
in the description rather than in 'See also'.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-27 07:06:15 +01:00
Michael Kerrisk
c198bc6d41
system_data_types.7: Under 'dev_t' mention stat(2) rather than ustat(2) in "See also"
...
stat(2) is the most interesting API here; ustat(2) is obscure.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-27 06:59:57 +01:00
Alejandro Colomar
c5af3bfc1a
dev_t.3: New link to system_data_types(7)
...
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-27 06:58:59 +01:00
Alejandro Colomar
63aa8b9a46
system_data_types.7: Add 'dev_t'
...
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-27 06:58:35 +01:00
Michael Kerrisk
43891c16ed
argz_add.3, envz_add.3: Point out that 'error_t' is an integer type
...
Reported-by: Jonny Grant <jg@jguk.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-26 17:13:33 +01:00
Michael Kerrisk
588b77dc9d
argz_add.3: tfix
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-26 16:51:15 +01:00
Michael Kerrisk
dd427377e2
argz_add.3, envz_add.3: Remove sentence that conveys no useful info
...
The sentence "Handle with care" in CONFORMING TO conveys no useful
information. Remove it.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-26 16:25:51 +01:00
Michael Kerrisk
fd6f7ef2f7
argz_add.3: ffix
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-26 16:24:49 +01:00
Alejandro Colomar
c89a843c28
stailq.3: SEE ALSO: Add insque(3), queue(7)
...
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-26 06:49:31 +01:00
Alejandro Colomar
94964749a5
clockid_t: New link to system_data_types(7)
...
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-25 22:17:47 +01:00
Alejandro Colomar
8df562c03f
system_Data_types.7: Add 'clockid_t'
...
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-25 22:17:39 +01:00
Alejandro Colomar
083d4e6a47
circleq.3, insque.3, list.3, slist.3, tailq.3: SEE ALSO: queue(3) -> queue(7)
...
queue.3 has been moved to queue.7.
Fix SEE ALSO accordingly.
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-25 22:17:28 +01:00
Alejandro Colomar
68fab1113e
queue.3: Link to queue(7)
...
queue has been for so many years in Section 3,
and still is in Section 3 in most manuals.
For legacy reasons,
especially because hyperlinks to the online manual pages
would break otherwise,
a link queue.3 -> queue(7) is necessary.
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-25 22:17:13 +01:00
Alejandro Colomar
d9a0505f71
queue.3, queue.7: Move queue.3 to queue.7
...
After forking slist.3, list.3, tailq.3, stailq.3 & circleq.3
in the previous commits,
this page no longer belongs in Section 3 of the manual pages.
According to its contents, the most suitable section is Section 7.
Because of legacy reasons, a link queue.3 -> queue(7)
would be appropriate.
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-25 22:17:05 +01:00
Michael Kerrisk
11fd5e7c2a
membarrier.2, openat2.2, insque.3, proc.5, tzfile.5, hier.7: Minor grammar fix
...
Don't hyphenate after adjective ending in "ly". See, for example:
https://www.dragoman.ist/compound-modifiers-with-words-ending-in-ly/
https://www.merriam-webster.com/words-at-play/6-common-hypercorrections-and-how-to-avoid-them/between-you-and-i
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-25 13:12:57 +01:00
Dmitry V. Levin
ba273524e7
tailq.3: tfix
...
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-25 13:07:43 +01:00
Michael Kerrisk
9484d926ff
stailq.3, tailq.3: Minor fix: replace ".Ss" lines with ".PP"
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-25 12:31:25 +01:00
Michael Kerrisk
df10ec359a
circleq.3, list.3, queue.3, slist.3, stailq.3, tailq.3: Minor grammar fix
...
Don't hyphenate after adjective ending in "ly". See, for example:
https://www.dragoman.ist/compound-modifiers-with-words-ending-in-ly/
https://www.merriam-webster.com/words-at-play/6-common-hypercorrections-and-how-to-avoid-them/between-you-and-i
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-25 12:23:43 +01:00
Michael Kerrisk
df1a46a560
circleq.3: ffix
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-25 12:19:44 +01:00
Alejandro Colomar
13e59b9684
circleq.3, list.3, slist.3, stailq.3, tailq.3: Use the 'struct' keyword when appropriate
...
This helps differentiate 'TYPE' in some arguments from
'struct TYPE *var' in others, and is technically more correct.
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-25 12:15:47 +01:00
Michael Kerrisk
d03e886304
queue.3: wfix
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-25 12:11:25 +01:00
Alejandro Colomar
d43abf2771
queue.3: Fix & update after forking circleq.3, list.3, slist.3, stailq.3 & tailq.3
...
- ffix: Use man markup
- Remove specific notes about code size increase
and execution time increase,
as they were (at least) inaccurate.
Instead, a generic note has been added.
- Structure the text into subsections.
- Remove sections that were empty after the forks.
- Clearly relate macro names (SLIST, TAILQ, ...)
to a human readable name of which data structure
they implement.
Reported-by: Michael Kerrisk <mtk.manpages@gmail.com>
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-25 12:09:38 +01:00
Alejandro Colomar
90a60096ba
queue.3: Add self to copyright notice
...
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-25 12:09:27 +01:00
Michael Kerrisk
3fe1b81c69
strerrorname_np.3: New link to strerror(3)
...
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-25 10:58:01 +01:00