Commit Graph

8774 Commits

Author SHA1 Message Date
Michael Kerrisk ce7ba00b76 bpf.2: Place EXAMPLES section in correct location
As per section ordering rules given in man-pages(7).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-11-16 08:23:00 +01:00
Michael Kerrisk 71103ce878 prctl.2, setns.2: tfix: remove section number from API documented in this page
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-11-16 08:22:50 +01:00
Michael Kerrisk 7a92eea0de chroot.2, memfd_create.2, tailq.3: Fix unbalanced .nf/.fi
Reported-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-11-15 23:33:33 +01:00
Michael Kerrisk 678f71707e uname.2, feature_test_macros.7: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-11-15 22:30:17 +01:00
Alejandro Colomar d556548bf4 getent.1, fanotify_mark.2, fcntl.2, futex.2, membarrier.2, mmap.2, mount.2, msgctl.2, readv.2, semctl.2, set_mempolicy.2, shmctl.2, syscalls.2, abs.3, bstring.3, btree.3, ctime.3, drand48.3, fgetc.3, fopen.3, gethostbyname.3, getnetent.3, getprotoent.3, getservent.3, INFINITY.3, __ppc_set_ppr_med.3, inet.3, j0.3, makecontext.3, printf.3, puts.3, resolver.3, sigsetops.3, elf.5, nscd.conf.5, proc.5, inotify.7, ipv6.7, spufs.7, system_data_types.7: Use Oxford comma
Found using:
pcregrep -rnM "^\.[B|I]R .*,\n\.[B|I].*[^,]\nand" man? |grep ^man |sort

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-11-15 21:30:30 +01:00
Michael Kerrisk 3fd7a10d90 faccessat2.2: New link to access.2
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-11-15 12:46:29 +01:00
Michael Kerrisk 8729436021 access.2: Document faccessat2()
faccessat2() was added in Linux 5.8 and enables a fix to
longstanding bugs in the faccessat() wrapper function.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-11-15 12:44:34 +01:00
Michael Kerrisk 06ad6cdfac access.2: BUGS: note that faccessat() wrapper function emulation ignores ACLs
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-11-15 12:21:55 +01:00
Colin Ian King 8faba2435b openat.2: Fix include path, should be linux/openat2.h
The include path is linux/openat2, so fix the manual to reference
this correct path.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-11-15 10:45:56 +01:00
Michael Kerrisk 3890042031 shmctl.2: wfix (for consistency with other *ctl.2 pages)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-11-15 10:27:38 +01:00
Michael Kerrisk 0a33c83e51 msgctl.2, semctl.2, shmctl.2: Minor fix
Break text into more paragraphs to ease readability

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-11-15 10:27:33 +01:00
Michael Kerrisk 10aa508cad msgctl.2: Make comments in 'msqid_ds' definition more compact
The comments do not need to be so verbose, since the main text
provides the full details.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-11-15 10:06:50 +01:00
Michael Kerrisk bd0ff36407 msgctl.2: Add description of 'msg_cbytes' field
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-11-15 10:00:12 +01:00
Michael Kerrisk a07ea11104 msgctl.2: Use field name "msg_cbytes" rather than "__msg_cbytes"
The shorter name is provided by default (i.e., if _DEFAULT_SOURCE
is defined).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-11-15 09:56:03 +01:00
Michael Kerrisk 72d2eba770 msgctl.2: Place list of field descriptions in same order as structure definition
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-11-15 09:49:49 +01:00
Michael Kerrisk 379c3ee9d0 shmctl.2: Place list of field descriptions in same order as structure definition
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-11-15 09:48:15 +01:00
Michael Kerrisk a79c3fc030 semctl.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-11-15 09:24:11 +01:00
Michael Kerrisk 24ce772b9c sigaction.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-11-14 10:12:54 +01:00
Michael Kerrisk 57ffe9ddc4 sigaction.2: Minor wording improvements
Restructure the sa_handler description as a list, for easier
reading.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-11-14 07:56:27 +01:00
Michael Kerrisk 06287aca29 sigaction.2: Clarify description of SA_NODEFER
Clarify description of SA_NODEFER, and note interaction with
act.sa_mask.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-11-14 07:50:20 +01:00
Michael Kerrisk 66b961cab6 sigaction.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-11-14 07:50:20 +01:00
Michael Kerrisk 4f71321abe sigaction.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-11-14 07:50:20 +01:00
Alejandro Colomar 2b9bf369d1 perf_event_open.2: srcfix
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-11-13 22:49:55 +01:00
Alejandro Colomar 33694c779a io_setup.2: SYNOPSIS: return long
The Linux kernel uses a long as the return type for this syscall.
As glibc provides no 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>
2020-11-13 10:23:53 +01:00
Alejandro Colomar 5020bc2822 perf_event_open.2: Assign calculated value explicitly to 'config'
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-11-12 21:52:06 +01:00
Michael Kerrisk 3b7d89960a sigaltstack.2: Clarify that the alternate signal stack is per-thread
Clarify that the alternate signal stack is per-thread (rather
than process-wide).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-11-12 14:32:26 +01:00
Michael Kerrisk 52e5819c41 clone.2, sigaltstack.2: clone(CLONE_VM) disdables the alternate signal stack
In the kernel sources (kernel/fork.c::copy_process()), we have:

        /*
         * sigaltstack should be cleared when sharing the same VM
         */
        if ((clone_flags & (CLONE_VM|CLONE_VFORK)) == CLONE_VM)
                sas_ss_reset(p);

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-11-12 14:07:17 +01:00
Michael Kerrisk c2a2cc269c sigaction.2: Further clarify the effect of the SA_NODEFER flag
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-11-12 12:16:45 +01:00
Michael Kerrisk 4be47a8214 getrlimit.2: State more precisely the range of kernel versions that had RLIMIT_LOCKS
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-11-11 13:00:19 +01:00
Michael Kerrisk 0807d1b387 timer_getoverrun.2: timer_getoverrun() now clamps the overrun count to DELAYTIMER_MAX
See https://bugzilla.kernel.org/show_bug.cgi?id=12665.
The fix by Thomas Gleixner was in kernel commit
78c9c4dfbf8c04883941445a195276bb4bb92c76.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-11-11 10:33:33 +01:00
Michael Kerrisk 9b71be4f0b signal.2: wfix: Make the warning against the use of signal() even more obvious
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-11-10 13:13:11 +01:00
Michael Kerrisk f100465696 syscalls.2: Note that sysctl() was removed in Linux 5.5
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-11-06 12:35:47 +01:00
Michael Kerrisk c53d4fc16e bpf.2: Minor wording improvement
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-11-06 12:34:00 +01:00
Michael Kerrisk baa72cc312 syscalls.2: Add process_madvise()
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-11-06 07:41:02 +01:00
Michael Kerrisk 97ba2b53f5 mount.2, statfs.2: Minor tweaks to Ross Zwisler's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-11-06 07:40:06 +01:00
Ross Zwisler 527375b2c7 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>
2020-11-06 07:40:06 +01:00
Peter Oskolkov d98b1454fc 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>
2020-11-05 22:07:14 +01:00
Michael Kerrisk 9807d9afdd 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>
2020-11-02 10:57:14 +01:00
Alejandro Colomar 1d5974814d 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>
2020-11-02 08:46:39 +01:00
Michael Kerrisk 3fde8c2e45 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>
2020-11-01 21:56:08 +01:00
Alejandro Colomar 23a74bd771 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>
2020-11-01 19:04:11 +01:00
Alejandro Colomar a024704790 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>
2020-11-01 18:23:38 +01:00
Michael Kerrisk 2e33563284 statx.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-11-01 07:17:20 +01:00
Alejandro Colomar 68219aba7f 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>
2020-10-30 21:05:10 +01:00
Alejandro Colomar 2253ecf016 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>
2020-10-30 20:16:08 +01:00
Alejandro Colomar 8a60718ef0 futex.2: srcfix
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-30 20:15:59 +01:00
Alejandro Colomar 13e88b7070 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>
2020-10-29 20:10:56 +01:00
Michael Kerrisk 833ba57027 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>
2020-10-28 22:17:53 +01:00
Alejandro Colomar 2adfdd7795 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>
2020-10-28 22:16:41 +01:00
Alejandro Colomar d70361dab7 getdents.2: wfix
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-28 22:14:02 +01:00