]> git.ipfire.org Git - thirdparty/man-pages.git/log
thirdparty/man-pages.git
4 years agolocaledef.1: ffix
Michael Kerrisk [Sun, 8 Nov 2020 12:13:35 +0000 (13:13 +0100)] 
localedef.1: ffix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agosyscalls.2: Note that sysctl() was removed in Linux 5.5
Michael Kerrisk [Fri, 6 Nov 2020 11:35:47 +0000 (12:35 +0100)] 
syscalls.2: Note that sysctl() was removed in Linux 5.5

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agobpf.2: Minor wording improvement
Michael Kerrisk [Fri, 6 Nov 2020 11:34:00 +0000 (12:34 +0100)] 
bpf.2: Minor wording improvement

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoproc.5: wfix
Michael Kerrisk [Fri, 6 Nov 2020 11:30:20 +0000 (12:30 +0100)] 
proc.5: wfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agosyscalls.2: Add process_madvise()
Michael Kerrisk [Mon, 26 Oct 2020 05:52:08 +0000 (06:52 +0100)] 
syscalls.2: Add process_madvise()

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agomount.2, statfs.2: Minor tweaks to Ross Zwisler's patch
Michael Kerrisk [Tue, 27 Oct 2020 17:16:36 +0000 (18:16 +0100)] 
mount.2, statfs.2: Minor tweaks to Ross Zwisler's patch

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agomount.2, statfs.2: Add NOSYMFOLLOW flags to mount(2) and statfs(2)
Ross Zwisler [Fri, 4 Sep 2020 16:12:03 +0000 (10:12 -0600)] 
mount.2, statfs.2: Add NOSYMFOLLOW flags to mount(2) and statfs(2)

Signed-off-by: Ross Zwisler <zwisler@google.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agomembarrier.2: Update for Linux 5.10
Peter Oskolkov [Thu, 5 Nov 2020 11:32:00 +0000 (12:32 +0100)] 
membarrier.2: Update for Linux 5.10

Linux kernel commit 2a36ab717e8fe678d98f81c14a0b124712719840
(part of 5.10 release) changed sys_membarrier prototype/parameters
and added two new commands [MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ
and MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_RSEQ]. This
man-pages patch reflects these changes, by mostly copying comments
from the kernel patch into the man-page ([Peter Oskolkov] was also
the author of the kernel change).

[mtk: commit message tweaked]

Signed-off-by: Peter Oskolkov <posk@google.com>
Cowritten-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agostrerror.3: tfix
Alejandro Colomar [Wed, 4 Nov 2020 16:35:10 +0000 (17:35 +0100)] 
strerror.3: tfix

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoerrno.3: Note another possible cause of the EMFILE error
Michael Kerrisk [Mon, 2 Nov 2020 12:15:37 +0000 (13:15 +0100)] 
errno.3: Note another possible cause of the EMFILE error

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agommap.2: Clarify SIGBUS text and treatment of partial page at end of a mapping
Michael Kerrisk [Mon, 2 Nov 2020 09:57:14 +0000 (10:57 +0100)] 
mmap.2: Clarify SIGBUS text and treatment of partial page at end of a mapping

See https://unix.stackexchange.com/questions/616848/what-is-the-behaviour-of-a-file-backed-memory-map-when-reading-from-or-writing-t

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: SYNOPSIS: s/io_co...
Alejandro Colomar [Sun, 1 Nov 2020 23:31:43 +0000 (00:31 +0100)] 
io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2: SYNOPSIS: s/io_context_t/aio_context_t/

Linux uses aio_context_t for these syscalls,
and it's the type provided by <linux/aio_abi.h>.
Use it in the SYNOPSIS.

libaio uses 'io_context_t', but that difference is already noted
in NOTES.

[mtk: patch slightly tweaked]

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agofeature_test_macros.7: tfix
John A. Leuenhagen [Mon, 2 Nov 2020 04:11:47 +0000 (23:11 -0500)] 
feature_test_macros.7: tfix

Signed-off-by: John A. Leuenhagen <john@zlima12.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoStart of man-pages-5.10: updating Changes and Changes.old
Michael Kerrisk [Mon, 2 Nov 2020 06:58:09 +0000 (07:58 +0100)] 
Start of man-pages-5.10: updating Changes and Changes.old

4 years agoStart of man-pages-5.10: updating .Announce and .lsm files
Michael Kerrisk [Mon, 2 Nov 2020 06:58:09 +0000 (07:58 +0100)] 
Start of man-pages-5.10: updating .Announce and .lsm files

4 years agoStart of man-pages-5.10: renaming .Announce and .lsm files
Michael Kerrisk [Mon, 2 Nov 2020 06:58:09 +0000 (07:58 +0100)] 
Start of man-pages-5.10: renaming .Announce and .lsm files

4 years agoReady for 5.09
Michael Kerrisk [Sun, 1 Nov 2020 20:08:55 +0000 (21:08 +0100)] 
Ready for 5.09

4 years agoChanges: whitespace cleanups
Michael Kerrisk [Sun, 1 Nov 2020 20:08:45 +0000 (21:08 +0100)] 
Changes: whitespace cleanups

4 years agomemusage.1, pldd.1, sprof.1, add_key.2, bind.2, bpf.2, clone.2, dup.2, epoll_ctl...
Michael Kerrisk [Sun, 1 Nov 2020 20:04:35 +0000 (21:04 +0100)] 
memusage.1, pldd.1, sprof.1, add_key.2, bind.2, bpf.2, clone.2, dup.2, epoll_ctl.2, eventfd.2, fanotify_init.2, fanotify_mark.2, futex.2, getdents.2, getpid.2, getrlimit.2, intro.2, ioctl_fat.2, ioctl_ns.2, kcmp.2, keyctl.2, membarrier.2, memfd_create.2, mprotect.2, msgctl.2, msgop.2, nfsservctl.2, open.2, open_by_handle_at.2, openat2.2, outb.2, perf_event_open.2, pivot_root.2, recv.2, recvmmsg.2, request_key.2, sched_setaffinity.2, sched_setattr.2, seccomp.2, select.2, send.2, signalfd.2, spu_run.2, sysctl.2, timer_create.2, userfaultfd.2, wait.2, CPU_SET.3, abs.3, argz_add.3, backtrace.3, bsearch.3, bswap.3, clock_getcpuclockid.3, cmsg.3, dl_iterate_phdr.3, dlinfo.3, dlopen.3, drand48.3, drand48_r.3, duplocale.3, encrypt.3, endian.3, envz_add.3, errno.3, ffs.3, fopencookie.3, get_phys_pages.3, getaddrinfo.3, getaddrinfo_a.3, getdate.3, getgrent_r.3, getgrouplist.3, getifaddrs.3, getline.3, getprotoent_r.3, getpwent_r.3, getpwnam.3, getservent_r.3, hsearch.3, insque.3, intro.3, lrint.3, lround.3, lseek64.3, mallinfo.3, malloc_hook.3, malloc_info.3, mbsinit.3, mbstowcs.3, mtrace.3, newlocale.3, ntp_gettime.3, offsetof.3, perror.3, posix_fallocate.3, posix_spawn.3, printf.3, psignal.3, pthread_attr_init.3, pthread_create.3, pthread_getattr_np.3, pthread_getcpuclockid.3, pthread_setaffinity_np.3, pthread_setname_np.3, pthread_sigmask.3, qsort.3, rand.3, random.3, rpc.3, rtnetlink.3, scalbln.3, shm_open.3, stdarg.3, strcat.3, strerror.3, strfmon.3, strptime.3, strsignal.3, strtod.3, strtok.3, strtol.3, strtoul.3, tsearch.3, wordexp.3, loop.4, vcs.4, veth.4, core.5, locale.5, slabinfo.5, cgroup_namespaces.7, cpuset.7, credentials.7, fanotify.7, feature_test_macros.7, inotify.7, ip.7, kernel_lockdown.7, man.7, mount_namespaces.7, namespaces.7, pid_namespaces.7, rtld-audit.7, sigevent.7, sock_diag.7, standards.7, unix.7, user_namespaces.7: tstamp

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoChanges: tfix
Michael Kerrisk [Sun, 1 Nov 2020 20:55:52 +0000 (21:55 +0100)] 
Changes: tfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoChanges: Ready for 5.09
Michael Kerrisk [Sun, 1 Nov 2020 19:59:53 +0000 (20:59 +0100)] 
Changes: Ready for 5.09

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agobpf-helpers.7: tfix
Michael Kerrisk [Sun, 1 Nov 2020 20:16:02 +0000 (21:16 +0100)] 
bpf-helpers.7: tfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agopthread_attr_init.3: tfix
Michael Kerrisk [Sun, 1 Nov 2020 20:06:39 +0000 (21:06 +0100)] 
pthread_attr_init.3: tfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoopenat.2: SYNOPSIS: return long
Alejandro Colomar [Sun, 1 Nov 2020 15:15:38 +0000 (16:15 +0100)] 
openat.2: SYNOPSIS: return long

The Linux kernel uses long as the return type for this syscall.
As glibc provides no wrapper, use the same type the kernel uses.

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agomq_getsetattr.2: Use 'const' when appropriate
Alejandro Colomar [Sun, 1 Nov 2020 15:08:31 +0000 (16:08 +0100)] 
mq_getsetattr.2: Use 'const' when appropriate

The Linux kernel uses the following:

ipc/mqueue.c:1480:
SYSCALL_DEFINE3(mq_getsetattr, mqd_t, mqdes,
const struct mq_attr __user *, u_mqstat,
struct mq_attr __user *, u_omqstat)

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agopthread_attr_init.3: SEE ALSO: add pthread_attr_init(3)
Michael Kerrisk [Sun, 1 Nov 2020 17:15:40 +0000 (18:15 +0100)] 
pthread_attr_init.3: SEE ALSO: add pthread_attr_init(3)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agopthread_sigmask.3: SEE ALSO: add pthread_attr_setsigmask_np(3)
Michael Kerrisk [Sun, 1 Nov 2020 17:14:17 +0000 (18:14 +0100)] 
pthread_sigmask.3: SEE ALSO: add pthread_attr_setsigmask_np(3)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agopthread_attr_setsigmask_np.3: New page for pthread_attr_setsigmask_np() + pthread_att...
Michael Kerrisk [Sun, 1 Nov 2020 17:09:54 +0000 (18:09 +0100)] 
pthread_attr_setsigmask_np.3: New page for pthread_attr_setsigmask_np() + pthread_attr_getsigmask_np()

Add a page documenting the pthread_attr_setsigmask_np(3) and
pthread_attr_getsigmask_np() functions added in glibc 2.32.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agostatx.2: ffix
Michael Kerrisk [Sun, 1 Nov 2020 06:15:54 +0000 (07:15 +0100)] 
statx.2: ffix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agodlopen.3: ffix
Michael Kerrisk [Sat, 31 Oct 2020 09:17:00 +0000 (10:17 +0100)] 
dlopen.3: ffix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agofutex.2: ffix
Alejandro Colomar [Fri, 30 Oct 2020 12:49:22 +0000 (13:49 +0100)] 
futex.2: ffix

That comment wrapped on an 80-column terminal.
Divide it into two lines.

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agofutex.2: Use appropriate types
Alejandro Colomar [Fri, 30 Oct 2020 12:39:57 +0000 (13:39 +0100)] 
futex.2: Use appropriate types

The Linux kernel uses the following:

kernel/futex.c:3778:
SYSCALL_DEFINE6(futex, u32 __user *, uaddr, int, op, u32, val,
struct __kernel_timespec __user *, utime, u32 __user *, uaddr2,
u32, val3)

Since there is no glibc wrapper, use the same types the kernel uses.

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agofutex.2: srcfix
Alejandro Colomar [Fri, 30 Oct 2020 12:39:56 +0000 (13:39 +0100)] 
futex.2: srcfix

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agogetdents.2: Use appropriate types
Alejandro Colomar [Thu, 29 Oct 2020 19:10:21 +0000 (20:10 +0100)] 
getdents.2: Use appropriate types

[mtk: Applied patch manually]

getdents():
This function has no glibc wrapper.
As such, we should use the same types the Linux kernel uses:
Use 'long' as the return type.

getdents64():
The glibc wrapper uses:
ssize_t getdents64(int, void *, size_t);

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agogetdents.2: Minor tweak to Alex's patch
Michael Kerrisk [Wed, 28 Oct 2020 21:17:53 +0000 (22:17 +0100)] 
getdents.2: Minor tweak to Alex's patch

The text in NOTES doesn't really relate specifically to
the #include, so remove the comment on the #include.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agogetdents.2: SYNOPSIS: Add missing header and feature test macro
Alejandro Colomar [Wed, 28 Oct 2020 19:51:25 +0000 (20:51 +0100)] 
getdents.2: SYNOPSIS: Add missing header and feature test macro

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agogetdents.2: wfix
Alejandro Colomar [Wed, 28 Oct 2020 19:34:12 +0000 (20:34 +0100)] 
getdents.2: wfix

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoclock_getres.2: EXAMPLES: Use 'const' when appropriate
Alejandro Colomar [Wed, 28 Oct 2020 19:32:45 +0000 (20:32 +0100)] 
clock_getres.2: EXAMPLES: Use 'const' when appropriate

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agostrtol.3: EXAMPLES: Simplify errno checking
Alejandro Colomar [Wed, 28 Oct 2020 09:33:08 +0000 (10:33 +0100)] 
strtol.3: EXAMPLES: Simplify errno checking

(No expected change in behavior,)

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agostrtol.3: EXAMPLES: As the default base, use special value 0
Alejandro Colomar [Wed, 28 Oct 2020 09:33:07 +0000 (10:33 +0100)] 
strtol.3: EXAMPLES: As the default base, use special value 0

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agostrtol.3: EXAMPLES: Delimit output string using ""
Alejandro Colomar [Wed, 28 Oct 2020 09:33:06 +0000 (10:33 +0100)] 
strtol.3: EXAMPLES: Delimit output string using ""

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoman_show_fixme.sh: Don't hyphenate or justify the manual page
Michael Kerrisk [Mon, 26 Oct 2020 09:34:01 +0000 (10:34 +0100)] 
man_show_fixme.sh: Don't hyphenate or justify the manual page

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agosocket.7: srcfix: rewrap source lines
Michael Kerrisk [Wed, 28 Oct 2020 06:17:18 +0000 (07:17 +0100)] 
socket.7: srcfix: rewrap source lines

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agosocket.7: Document SO_INCOMING_NAPI_ID
Sridhar Samudrala [Wed, 28 Oct 2020 01:15:22 +0000 (18:15 -0700)] 
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>
4 years agostrtol.3: ffix
Michael Kerrisk [Wed, 28 Oct 2020 06:01:01 +0000 (07:01 +0100)] 
strtol.3: ffix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agostrtol.3: srcfix: Add myself to copyright
Michael Kerrisk [Tue, 27 Oct 2020 19:00:23 +0000 (20:00 +0100)] 
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>
4 years agoFIXME_list.sh: Fix broken regexp
Michael Kerrisk [Tue, 27 Oct 2020 18:42:47 +0000 (19:42 +0100)] 
FIXME_list.sh: Fix broken regexp

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoperf_event_open.2: wfix
Michael Kerrisk [Tue, 27 Oct 2020 16:59:36 +0000 (17:59 +0100)] 
perf_event_open.2: wfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoperf_event_open.2: wfix
Michael Kerrisk [Tue, 27 Oct 2020 16:55:07 +0000 (17:55 +0100)] 
perf_event_open.2: wfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoperf_event_open.2: Update the man page with CAP_PERFMON related information
Alexey Budankov [Tue, 27 Oct 2020 16:48:25 +0000 (19:48 +0300)] 
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>
4 years agosystem_data_types.7: off_t: Add note about _FILE_OFFSET_BITS
Alejandro Colomar [Tue, 27 Oct 2020 16:34:55 +0000 (17:34 +0100)] 
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>
4 years agolseek64.3: Since glibc 2.28. the 'llseek' symbol is no longer available
Michael Kerrisk [Tue, 27 Oct 2020 16:08:18 +0000 (17:08 +0100)] 
lseek64.3: Since glibc 2.28. the 'llseek' symbol is no longer available

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoproc.5: Document inaccurate RSS due to SPLIT_RSS_COUNTING
Jann Horn [Tue, 27 Oct 2020 13:35:35 +0000 (14:35 +0100)] 
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>
4 years agoproc.5: Minor fixes
Michael Kerrisk [Tue, 27 Oct 2020 13:14:20 +0000 (14:14 +0100)] 
proc.5: Minor fixes

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoproc.5: ffix: use a hanging list as is done elsewhere in the page
Michael Kerrisk [Tue, 27 Oct 2020 06:53:44 +0000 (07:53 +0100)] 
proc.5: ffix: use a hanging list as is done elsewhere in the page

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agosystem_data_types.7: ffix
Alejandro Colomar [Tue, 27 Oct 2020 13:09:52 +0000 (14:09 +0100)] 
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>
4 years agosystem_data_types.7: ffix
Alejandro Colomar [Tue, 27 Oct 2020 10:47:37 +0000 (11:47 +0100)] 
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>
4 years agocapabilities.7: Under CAP_SYS_ADMIN, group "sub-capabilities" together
Michael Kerrisk [Tue, 27 Oct 2020 12:54:22 +0000 (13:54 +0100)] 
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>
4 years agocapabilities.7: CAP_SYS_ADMIN implies CAP_CHECKPOINT_RESTORE
Michael Kerrisk [Tue, 27 Oct 2020 12:46:16 +0000 (13:46 +0100)] 
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>
4 years agocapabilities.7: tfix
Michael Kerrisk [Tue, 27 Oct 2020 12:41:50 +0000 (13:41 +0100)] 
capabilities.7: tfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agocapabilities.7: Document the CAP_CHECKPOINT_RESTORE capability added in Linux 5.9
Michael Kerrisk [Tue, 27 Oct 2020 12:41:03 +0000 (13:41 +0100)] 
capabilities.7: Document the CAP_CHECKPOINT_RESTORE capability added in Linux 5.9

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoproc.5: Update capability requirements for accessing /proc/[pid]/map_files
Michael Kerrisk [Tue, 27 Oct 2020 12:34:31 +0000 (13:34 +0100)] 
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>
4 years agopid_namespaces.7: Update capability requirements for /proc/sys/kernel/ns_last_pid
Michael Kerrisk [Tue, 27 Oct 2020 10:41:18 +0000 (11:41 +0100)] 
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>
4 years agoclone.2: CAP_CHECKPOINT_RESTORE can now be used to employ 'set_tid'
Michael Kerrisk [Tue, 27 Oct 2020 09:36:50 +0000 (10:36 +0100)] 
clone.2: CAP_CHECKPOINT_RESTORE can now be used to employ 'set_tid'

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agocapabilities.7: Add kernel doc reference for CAP_PERFMON
Michael Kerrisk [Tue, 27 Oct 2020 09:27:03 +0000 (10:27 +0100)] 
capabilities.7: Add kernel doc reference for CAP_PERFMON

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agocapabilities.7: ffix
Michael Kerrisk [Tue, 27 Oct 2020 09:22:03 +0000 (10:22 +0100)] 
capabilities.7: ffix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoposix_fallocate.3: wfix
Michael Kerrisk [Tue, 27 Oct 2020 07:00:44 +0000 (08:00 +0100)] 
posix_fallocate.3: wfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoposix_fallocate.3: add EOPNOTSUPP error code.
Érico Rolim [Mon, 26 Oct 2020 23:21:18 +0000 (20:21 -0300)] 
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>
4 years agosystem_data_types.7: Promote makedev(3) in discussion of 'dev_t'
Michael Kerrisk [Tue, 27 Oct 2020 06:06:15 +0000 (07:06 +0100)] 
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>
4 years agosystem_data_types.7: Under 'dev_t' mention stat(2) rather than ustat(2) in "See also"
Michael Kerrisk [Tue, 27 Oct 2020 05:59:57 +0000 (06:59 +0100)] 
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>
4 years agodev_t.3: New link to system_data_types(7)
Alejandro Colomar [Mon, 26 Oct 2020 22:50:09 +0000 (23:50 +0100)] 
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>
4 years agosystem_data_types.7: Add 'dev_t'
Alejandro Colomar [Mon, 26 Oct 2020 22:50:08 +0000 (23:50 +0100)] 
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>
4 years agoargz_add.3, envz_add.3: Point out that 'error_t' is an integer type
Michael Kerrisk [Mon, 26 Oct 2020 16:13:33 +0000 (17:13 +0100)] 
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>
4 years agoargz_add.3: tfix
Michael Kerrisk [Mon, 26 Oct 2020 15:51:01 +0000 (16:51 +0100)] 
argz_add.3: tfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoargz_add.3, envz_add.3: Remove sentence that conveys no useful info
Michael Kerrisk [Mon, 26 Oct 2020 15:25:51 +0000 (16:25 +0100)] 
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>
4 years agoargz_add.3: ffix
Michael Kerrisk [Mon, 26 Oct 2020 15:24:49 +0000 (16:24 +0100)] 
argz_add.3: ffix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agostailq.3: SEE ALSO: Add insque(3), queue(7)
Alejandro Colomar [Sun, 25 Oct 2020 22:08:26 +0000 (23:08 +0100)] 
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>
4 years agoclockid_t: New link to system_data_types(7)
Alejandro Colomar [Sun, 25 Oct 2020 21:08:17 +0000 (22:08 +0100)] 
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>
4 years agosystem_Data_types.7: Add 'clockid_t'
Alejandro Colomar [Sun, 25 Oct 2020 21:08:16 +0000 (22:08 +0100)] 
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>
4 years agocircleq.3, insque.3, list.3, slist.3, tailq.3: SEE ALSO: queue(3) -> queue(7)
Alejandro Colomar [Sun, 25 Oct 2020 20:46:18 +0000 (21:46 +0100)] 
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>
4 years agoqueue.3: Link to queue(7)
Alejandro Colomar [Sun, 25 Oct 2020 20:46:17 +0000 (21:46 +0100)] 
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>
4 years agoqueue.3, queue.7: Move queue.3 to queue.7
Alejandro Colomar [Sun, 25 Oct 2020 20:46:16 +0000 (21:46 +0100)] 
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>
4 years agomembarrier.2, openat2.2, insque.3, proc.5, tzfile.5, hier.7: Minor grammar fix
Michael Kerrisk [Sun, 25 Oct 2020 12:12:57 +0000 (13:12 +0100)] 
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>
4 years agotailq.3: tfix
Dmitry V. Levin [Sun, 25 Oct 2020 12:03:31 +0000 (15:03 +0300)] 
tailq.3: tfix

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agostailq.3, tailq.3: Minor fix: replace ".Ss" lines with ".PP"
Michael Kerrisk [Sun, 25 Oct 2020 11:31:25 +0000 (12:31 +0100)] 
stailq.3, tailq.3: Minor fix: replace ".Ss" lines with ".PP"

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agocircleq.3, list.3, queue.3, slist.3, stailq.3, tailq.3: Minor grammar fix
Michael Kerrisk [Sun, 25 Oct 2020 11:23:43 +0000 (12:23 +0100)] 
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>
4 years agocircleq.3: ffix
Michael Kerrisk [Sun, 25 Oct 2020 11:19:44 +0000 (12:19 +0100)] 
circleq.3: ffix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agocircleq.3, list.3, slist.3, stailq.3, tailq.3: Use the 'struct' keyword when appropriate
Alejandro Colomar [Sun, 25 Oct 2020 10:46:24 +0000 (11:46 +0100)] 
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>
4 years agoqueue.3: wfix
Michael Kerrisk [Sun, 25 Oct 2020 11:11:25 +0000 (12:11 +0100)] 
queue.3: wfix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoqueue.3: Fix & update after forking circleq.3, list.3, slist.3, stailq.3 & tailq.3
Alejandro Colomar [Sun, 25 Oct 2020 10:21:33 +0000 (11:21 +0100)] 
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>
4 years agoqueue.3: Add self to copyright notice
Alejandro Colomar [Sun, 25 Oct 2020 10:21:32 +0000 (11:21 +0100)] 
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>
4 years agostrerrorname_np.3: New link to strerror(3)
Michael Kerrisk [Sat, 17 Oct 2020 20:33:43 +0000 (22:33 +0200)] 
strerrorname_np.3: New link to strerror(3)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agostrerrordesc_np.3: New link to strerror(3)
Michael Kerrisk [Sat, 17 Oct 2020 20:33:18 +0000 (22:33 +0200)] 
strerrordesc_np.3: New link to strerror(3)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agostrerror.3: Document strerrorname_np() and strerrordesc_np()
Michael Kerrisk [Sat, 17 Oct 2020 20:29:50 +0000 (22:29 +0200)] 
strerror.3: Document strerrorname_np() and strerrordesc_np()

strerrorname_np() and strerrordesc_np() were added in glibc 2.32.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agosigdescr_np.3: New link to strsignal.3
Michael Kerrisk [Sat, 17 Oct 2020 19:29:44 +0000 (21:29 +0200)] 
sigdescr_np.3: New link to strsignal.3

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agosigabbrev_np.3: New link to strsignal.3
Michael Kerrisk [Sat, 17 Oct 2020 19:29:17 +0000 (21:29 +0200)] 
sigabbrev_np.3: New link to strsignal.3

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agostrsignal.3: Document sigabbrev_np() and sigdescr_np().
Michael Kerrisk [Sat, 17 Oct 2020 19:26:16 +0000 (21:26 +0200)] 
strsignal.3: Document sigabbrev_np() and sigdescr_np().

sigabbrev_np() and sigdescr_np() were added in glibc 2.32.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoqueue.3: SEE ALSO: Add tailq(3)
Alejandro Colomar [Sun, 25 Oct 2020 09:36:52 +0000 (10:36 +0100)] 
queue.3: SEE ALSO: Add tailq(3)

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agoTAILQ_CONCAT.3, TAILQ_EMPTY.3, TAILQ_ENTRY.3, TAILQ_FIRST.3, TAILQ_FOREACH.3, TAILQ_F...
Alejandro Colomar [Sun, 25 Oct 2020 09:36:51 +0000 (10:36 +0100)] 
TAILQ_CONCAT.3, TAILQ_EMPTY.3, TAILQ_ENTRY.3, TAILQ_FIRST.3, TAILQ_FOREACH.3, TAILQ_FOREACH_REVERSE.3, TAILQ_HEAD.3, TAILQ_HEAD_INITIALIZER.3, TAILQ_INIT.3, TAILQ_INSERT_AFTER.3, TAILQ_INSERT_BEFORE.3, TAILQ_INSERT_HEAD.3, TAILQ_INSERT_TAIL.3, TAILQ_LAST.3, TAILQ_NEXT.3, TAILQ_PREV.3, TAILQ_REMOVE.3, TAILQ_SWAP.3: Link to the new tailq(3) page instead of queue(3)

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
4 years agotailq.3: Add remaining details to complete the page
Alejandro Colomar [Sun, 25 Oct 2020 09:36:50 +0000 (10:36 +0100)] 
tailq.3: Add remaining details to complete the page

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>