Commit Graph

8388 Commits

Author SHA1 Message Date
Michael Kerrisk 26c8d4bb8c semop.2: Add a reference to the semop(2) example in shmop(2)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-03-12 09:24:44 +01:00
Michael Kerrisk fc4774234e shmop.2: EXAMPLE: add a pair of example programs
Add example programs demonstrating usage of shmget(2), shmat(2),
semget(2), semctl(2), and semop(2).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-03-12 09:24:44 +01:00
Michael Kerrisk 90f986d35f semget.2: EXAMPLE: add an example program
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-03-12 09:24:44 +01:00
Michael Kerrisk c436f71fa0 statx.2: Minor tweaks to Eric Bigger's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-03-12 09:20:50 +01:00
Eric Biggers ba2a520059 statx.2: Document STATX_ATTR_VERITY
Document the verity attribute for statx(), which was added in
Linux 5.5.

For more context, see the fs-verity documentation:
https://www.kernel.org/doc/html/latest/filesystems/fsverity.html

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-03-12 09:18:57 +01:00
Jakub Wilk 765a67c3ad semctl.2: tfix
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-03-12 09:16:22 +01:00
Krzysztof Małysa d5d482ec7a clone.2: tfix
Fix clone3() syscall description for CLONE_PARENT_SETTID: kernel uses
cl_args.parent_tid instead of the specified cl_args.child_tid.

Signed-off-by: Krzysztof Małysa <varqox@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-03-12 09:14:11 +01:00
Mike Frysinger deb1825fcf mlock.2: ffix
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-03-12 06:43:37 +01:00
Michael Kerrisk cd356fa192 _exit.2: Clarify that raw _exit() system call terminates only the calling thread
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-03-04 22:36:31 +01:00
Michael Kerrisk 07f462e9f2 _exit.2: Minor wording tweaks
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-03-04 22:35:11 +01:00
Michael Kerrisk b2a8e05384 stat.2: Clarify definitions of timestamp fields
In particular, make it clear that atime and mtime relate to the
file *data*.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-03-02 17:45:05 +01:00
Michael Kerrisk 64cde6e3bf poll.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-28 22:12:33 +01:00
Michael Kerrisk 232057c309 inotify_add_watch.2: EXAMPLE: add referecne to example in inotify(7)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-28 22:08:38 +01:00
Michael Kerrisk ce160b21ab semctl.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-28 08:46:58 +01:00
Michael Kerrisk 1923607c30 execve.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-28 08:41:51 +01:00
Michael Kerrisk 63433c537c execve.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-28 08:38:19 +01:00
Michael Kerrisk 5d92031a43 execve.2: Explicitly note that argv[argc] == NULL in the new program
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-28 08:38:19 +01:00
Michael Kerrisk 0262995818 execve.2: wfix 2020-02-28 08:32:32 +01:00
Michael Kerrisk 01b08fe410 msgop.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-27 14:00:09 +01:00
Michael Kerrisk 5abea51fba semop.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-25 21:48:53 +01:00
Michael Kerrisk 410ad57327 shmop.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-25 21:47:57 +01:00
Michael Kerrisk 55f2c84816 msgop.2, shmop.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-25 21:44:42 +01:00
Michael Kerrisk a63243b9e2 msgctl.2: Add information on permission bits (based on sysvipc(7) text)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-25 16:53:25 +01:00
Michael Kerrisk cce90cf33a msgctl.2: Copy information on 'msqid_ds' fields from sysvipc(7)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-25 16:53:25 +01:00
Michael Kerrisk dd7f869f66 semctl.2: Minor wording fixes
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-25 16:53:25 +01:00
Michael Kerrisk 702f1a76e1 semctl.2: Add information on permission bits (based on sysvipc(7) text)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-25 16:53:25 +01:00
Michael Kerrisk c7d32a9ee7 semctl.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-25 16:53:25 +01:00
Michael Kerrisk 1c9b3f5ff2 semctl.2: Copy information on 'semid_ds' fields from sysvipc(7)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-25 16:53:25 +01:00
Michael Kerrisk bede9ac097 shmctl.2: Note that execute permission is not needed for shmat() SHM_EXEC
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-25 16:53:25 +01:00
Michael Kerrisk aa3b28505e shmctl.2: Add information on permission bits (based on sysvipc(7) text)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-25 16:53:25 +01:00
Michael Kerrisk 5ec2120137 shmctl.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-25 16:53:25 +01:00
Michael Kerrisk fc11d0e500 shmctl.2: Some small improvements to the description of the 'shmid_ds' structure
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-25 16:53:25 +01:00
Michael Kerrisk c41cf60e5c shmctl.2: Copy information on 'shmid_ds' fields from sysvipc(7)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-25 16:53:25 +01:00
Alexander Miller 3b9cbcdc61 pidfd_open.2: wfix
Signed-off-by: Alexander Miller <alex.miller@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-23 22:47:39 +01:00
Michael Kerrisk 7b9f319555 clock_getres.2: Tweaks to Helge Deller's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-23 22:47:39 +01:00
Helge Deller 7b02075b19 clock_getres.2: Consecutive calls for CLOCK_MONOTONIC may return same value
Consecutive calls to clock_gettime(CLOCK_MONOTONIC) are guaranteed
to return MONOTONIC values, which means that they either return
the *SAME* time value like the last call, or a later (higher) time
value.

Due to high resolution counters, like TSC on x86, most people see
that the values returned increase, but on other less common
platforms it's less likely that consecutive calls return newer
values, and instead users may unexpectedly get back the SAME time
value.

I think it makes sense to document that people should not expect
to see "always-growing" time values. For example in Debian I've
seen in quite some source packages where return values of
consecutive calls are compared against each other and then the
package build fails if they are equal (e.g.  ruby-hitimes, ...).

Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-23 22:47:26 +01:00
Eugene Syromyatnikov ea09dfe60c syscalls.2: ffix (trying to fit the table into 80 columns)
* man2/syscalls.2 (.SH DESCRIPTION) <\fBgetdtablesize\fP(2)>: Remove "since
Linux 2.0" part for the osf_getdtablesize note, as syscall is generally
available since Linux 2.0; add line break after the word "as".
(.SH DESCRIPTION) <\fBpwrite\fP(2)>: Add line breaks.
(.SH DESCRIPTION) <\fBvm86old\fP(2)>: Add a line break after "in".

Signed-off-by: Eugene Syromyatnikov <evgsyr@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-23 21:46:22 +01:00
Michael Kerrisk ea5c73026f syscalls.2: Note that the 5.x series followed 4.20
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-23 21:42:31 +01:00
Michael Kerrisk 3ed6ea8db5 msgget.2, semget.2, shmget.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-23 09:58:23 +01:00
Michael Kerrisk 0f1e53ec43 ioctl_ficlonerange.2, ioctl_fideduperange.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-23 09:58:23 +01:00
Michael Kerrisk 58a114f1d9 execve.2: Add a subhead for the discussion of effect on process attributes
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-23 09:58:23 +01:00
Michael Kerrisk 1e980a0e8b sched_setattr.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-23 09:58:23 +01:00
Michael Kerrisk a2d56dbbe3 mmap.2: Add a subhead for the 'flags' argument
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-23 09:58:23 +01:00
Michael Kerrisk dd6ceee6f7 mmap.2: Move some text hidden at the end of DESCRIPTION to NOTES
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-23 09:58:23 +01:00
Michael Kerrisk 8762c93c83 ioctl_fat.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-23 09:58:23 +01:00
Michael Kerrisk 8a76077272 read.2: srcfix: Add self to copyright
By now, I'm the author of perhaps the majority of the text.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-23 09:58:23 +01:00
Michael Kerrisk e6356d613f msgop.2: arcfix: add Bill Pemberton to copyright
The example program in this page is from Bill Pemberton.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-23 09:58:23 +01:00
Michael Kerrisk b2a44c2ecc capget.2: srcfix: Add self to copyright
By now, I'm the author of a substantial part of the text.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-23 09:58:23 +01:00
Michael Kerrisk 7a5f235074 brk.2: srcfix: Add self to copyright
I'm the author of the majority of the text
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-23 09:58:23 +01:00
Michael Kerrisk 35e6d17bde bind.2: srcfix: Add self to copyright
I'm the author of the example program and various
other additions to the page.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-23 09:58:23 +01:00
Michael Kerrisk 50fd1cfe6f poll.2, atoi.3, gsignal.3, posix_memalign.3, scanf.3: Remove a few mentions of the ancient "Linux libc"
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-23 09:58:23 +01:00
Michael Kerrisk 38e17cbacc sigaction.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-23 09:58:23 +01:00
Michael Kerrisk 0019177eac getent.1, localedef.1, clock_nanosleep.2, fcntl.2, getitimer.2, getsockopt.2, inotify_init.2, ioctl.2, mlock.2, mprotect.2, quotactl.2, s390_sthyi.2, semctl.2, shmctl.2, shmget.2, wait.2, CPU_SET.3, aio_init.3, des_crypt.3, fmemopen.3, fopencookie.3, fts.3, getaddrinfo.3, getrpcent.3, lio_listio.3, posix_spawn.3, shm_open.3, st.4, elf.5, group.5, proc.5, services.5, aio.7, feature_test_macros.7, keyrings.7, man-pages.7, sigevent.7, tcp.7, udp.7: Global formatting fix: disfavor nonstandard .TP indents
In many cases, these don't improve readability, and (when stacked)
they sometimes have the side effect of sometimes forcing text
to be justified within a narrow column range.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-23 09:58:23 +01:00
Michael Kerrisk e41f05af22 splice.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-23 09:58:23 +01:00
Michael Kerrisk 962a269d97 epoll_create.2: srcfix: Add self to copyright
By now, I'm the author of the majority of the text.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-23 09:58:23 +01:00
Michael Kerrisk cce4f97420 epoll_create.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-23 09:58:22 +01:00
Michael Kerrisk 23a169f749 epoll_wait.2: A few minor additions and rewrites
And add self to copyright, since, by now, the majority of the
text in the page has now been (re)written by me.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-23 09:58:22 +01:00
Michael Kerrisk ee9c94436f epoll_ctl.2: Various minor additions and clarifications
And add self to copyright, since, by now, I'm the author of
substantial parts of the page.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-23 09:58:22 +01:00
Michael Kerrisk 733192cba6 poll.2: srcfix: Amend copyright
By now, I've written or rewritten pretty much the entire page

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-23 09:58:22 +01:00
Michael Kerrisk 342819c832 poll.2: Improve description of EFAULT error
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-23 09:58:22 +01:00
Michael Kerrisk 8bcfd68889 poll.2: Fix description of ENOMEM error
No file descriptors are being allocated...

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-23 09:58:22 +01:00
Michael Kerrisk 836efc18d7 poll.2: Add an example program
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-23 09:58:22 +01:00
Michael Kerrisk 83bb822c4f poll.2: Mention epoll(7) in the introductory paragraph
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-19 09:38:22 +01:00
Michael Kerrisk 6c485bbb3a poll.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-19 09:38:22 +01:00
Michael Kerrisk 4628e3eca7 select.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-19 09:38:22 +01:00
Michael Kerrisk 602b388d07 select.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-19 09:38:22 +01:00
Michael Kerrisk 95a85f1438 select.2: Note that FD_SET() and FD_CLR() do not return errors
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-19 09:38:22 +01:00
Michael Kerrisk a84ed70098 select.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-19 09:38:22 +01:00
Michael Kerrisk 0a4d109d22 select.2: Consolidate historical glibc pselect() details under one subhead
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-19 09:38:22 +01:00
Michael Kerrisk d221e421a5 select.2: Place the discussion of the self-pipe technique in a headed subsection
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-19 09:38:22 +01:00
Michael Kerrisk 73e8f3b4c1 select_tut.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-19 09:38:22 +01:00
Michael Kerrisk 4551a1b1d1 select_tut.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-18 22:59:35 +01:00
Michael Kerrisk a1f163d6c0 select_tut.2: wfix: break up a long paragraph
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-18 22:59:35 +01:00
Michael Kerrisk 97a5a8d838 select_tut.2: Adjust header file includes in example
Employ <sys/select.h>, rather than the historical header files.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-18 22:59:35 +01:00
Michael Kerrisk 21677b1bb5 select_tut.2: SEE ALSO: shorten this list
select(2) already lists most of these.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-18 22:59:35 +01:00
Michael Kerrisk 82cf8e8850 select_tut.2: RETURN VALUE: defer to select(2)
Defer to select(2), rather than repeating the information
in this page.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-18 22:59:35 +01:00
Michael Kerrisk c9a275a703 select_tut.2: DESCRIPTION: defer to select(2)
Avoid duplicating the same information in two pages.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-18 22:59:35 +01:00
Michael Kerrisk b3b45b2b16 select_tut.2: SYNOPSIS: defer to select(2), rather than repeating the same info
Remove the prototypes, which are detailed in select(2).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-18 22:59:35 +01:00
Michael Kerrisk 095d8388cf select.2: Rewrite DESCRIPTION
Improve structure and readability, at the same time incorporating
text and details that were formerly in select_tut(2). Also
move a few details in other parts of the page into DESCRIPTION.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-18 22:59:35 +01:00
Michael Kerrisk f7cd286592 select.2: Minor wording fix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-18 11:55:51 +01:00
Michael Kerrisk e5704b1a7a select.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-18 11:55:51 +01:00
Michael Kerrisk b397824f99 select.2: srcfix: add myself to copyright
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-18 11:55:51 +01:00
Michael Kerrisk bd89babbed select.2, select_tut.2: Consolidate info on usleep() emulation in one place
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-18 11:55:51 +01:00
Michael Kerrisk a63fef4359 select.2: Remove details of historical #include requirements
The POSIX situation has been the norm for a long time now,
and including ancient details overcomplicates the page.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-18 11:55:51 +01:00
Michael Kerrisk f0e902c3a1 select.2: Remove some ancient information about pre-POSIX types for 'timeout'
The discussion about pre-POSIX types for 'timeval' and 'timespec'
is rather old, and these days serves mainly to complicate the
page. Remove it.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-18 10:14:13 +01:00
Michael Kerrisk b8f8864d29 select.2: Minor fix: add forward reference to 'timeval' description
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-18 10:14:13 +01:00
Michael Kerrisk 01901530b2 select.2: Consolidate the discussion of pselect into a headed subsection
The current text layout is a little hard to parse, with details of
pselect() spread in the main description.  Move some of that text
to a headed subsection, and add a one-sentence introduction
describing the purpose of pselect().

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-18 10:14:13 +01:00
Michael Kerrisk 1eda1a3a5b select.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-18 08:40:54 +01:00
Michael Kerrisk 2054c92aa1 syscalls.2: Add new Linux 5.6 system calls
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-15 23:18:58 +01:00
Michael Kerrisk 6b621d05b3 _exit.2, capget.2, fcntl.2, futex.2, listen.2, memfd_create.2, modify_ldt.2, move_pages.2, open.2, perf_event_open.2, ptrace.2, set_thread_area.2, stime.2, syscall.2, sysctl.2, userfaultfd.2, cmsg.3, exit.3, ftime.3, getpt.3, malloc.3, console_codes.4, loop.4, inotify.7, netlink.7, packet.7, rtnetlink.7, tcp.7, unix.7, vsock.7, ldconfig.8: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-09 11:53:28 +01:00
Michael Kerrisk 93902a96eb stime.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-09 10:25:48 +01:00
Michael Kerrisk f3aa51b217 fcntl.2: Further tweaks to F_SEAL_FUTURE_WRITE text
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-08 14:10:31 +01:00
Michael Kerrisk e15b10ba32 memfd_create.2: Minor tweaks's to Joel Fernandes's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-08 13:04:07 +01:00
Michael Kerrisk fc6a14f557 memfd_create.2: srcfix: semantic line breaks
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-08 13:04:07 +01:00
Joel Fernandes (Google) 98eff9f7e5 memfd_create.2: Update manpage with new memfd F_SEAL_FUTURE_WRITE seal
More details of the seal can be found in the LKML patch:
https://lore.kernel.org/lkml/20181120052137.74317-1-joel@joelfernandes.org/T/#t

Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-08 13:04:07 +01:00
Michael Kerrisk e1cd30eb5e fcntl.2: Note kernel version for F_SEAL_FUTURE_WRITE
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-08 13:04:07 +01:00
Michael Kerrisk e9a2c239b3 fcntl.2: Minor tweaks to Joel Fernandes's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-08 12:37:39 +01:00
Michael Kerrisk 9341a793d0 fcntl.2: srcfix: rewrap source lines
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-08 12:31:11 +01:00
Michael Kerrisk e38bb9196d fcntl.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-08 12:09:56 +01:00
Joel Fernandes (Google) 7b7d3b200a fcntl.2: Update manpage with new memfd F_SEAL_FUTURE_WRITE seal
More details of the seal can be found in the LKML patch:
https://lore.kernel.org/lkml/20181120052137.74317-1-joel@joelfernandes.org/T/#t

Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-08 12:09:07 +01:00
Benjamin Peterson f3491e47ba exit.3: Use hex for the status mask
Admittedly, the POSIX specification for exit() also uses octal.
However, 0xFF immediately indicates the lowest 8 bits to me
whereas I had to think a bit about the octal mask.

Cowritten-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-08 11:59:37 +01:00
Michael Kerrisk ba9ae75ddb clone.2: Add old EINVAL error for AArch64
Reported-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-08 09:11:01 +01:00
Michael Kerrisk f44b032900 listen.2: The 'somaxconn' default value has increased to 4096
See https://bugzilla.suse.com/show_bug.cgi?id=1162464

Reported-by: Peter Gajdos <pgajdos@suse.cz>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-07 18:02:52 +01:00
Michael Kerrisk a2587fbb2e open.2: In O_TMPFILE example, describe alternative linkat() call
This was already shown in an earlier version of the page,
but Adam Borowski's patch replaced it with an alternative.
Probably, it is better to show both possibilities.

Reported-by: "Joseph C. Sible" <josephcsible@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-07 17:59:34 +01:00
Adam Borowski fc29a199d9 open.2: No need for /proc to make an O_TMPFILE file permanent
In the example snippet, we already have the fd, thus there's no
need to refer to the file by name.  And, /proc/ might be not
mounted or not accessible.

Noticed-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Adam Borowski <kilobyte@angband.pl>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-07 17:30:45 +01:00
Yu Jian Wu 03ba66f3a6 ioctl_userfaultfd.2: wfix
Hi,

Patch as attached. I think the comment on the variables in the struct is
reversed.

Thanks!

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-07 16:21:18 +01:00
Michael Kerrisk c98fe9f8ad seccomp.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-01-22 05:23:50 +01:00
Michael Kerrisk b386cee344 clone.2: Note the kernel version that added the 'set_tid' feature
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-01-22 02:19:09 +01:00
Michael Kerrisk 27f14b447a clone.2: Document CLONE_CLEAR_SIGHAND
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-01-22 02:09:17 +01:00
Denys Vlasenko 302c512cef ptrace.2: PTRACE_EVENT_STOP does not always report SIGTRAP
PTRACE_EVENT_STOP does not always report SIGTRAP, can be the
signal which stopped us

While at it, fix an obvious copy/paste error in
PTRACE_GET_SYSCALL_INFO description.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-01-22 01:14:19 +01:00
Michael Kerrisk 2b6923ba65 userfaultfd.2: Note that CAP_SYS_PTRACE is checked in the *initial* user namespace
(Add a detail missing in Yang Xu's patch.)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-01-21 22:02:04 +01:00
Michael Kerrisk c4f13bc72a userfaultfd.2: Tweaks to Yang Xu's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-01-21 22:01:35 +01:00
Yang Xu 339b899c4c userfaultfd.2: Add EPERM error
Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-01-21 21:46:23 +01:00
Daniel Colascione f46304f747 perf_event_open.2: Mention EINTR for perf_event_open
Somewhat surprisingly, perf_event_open() can fail with EINTR when
trying to enable perf reporting for a uprobe that's already been
configured for use with ftrace. Mention this error in the man
page.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-01-21 20:48:28 +01:00
Michael Kerrisk a473f8a707 fanotify_init.2: srcfix
Reported-by: Sam Varshavchik <mrsam@courier-mta.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-01-21 20:07:34 +01:00
Michael Kerrisk ee8bb310d8 clone.2: Minor tweaks to Adrian Reber's 'set_tid' patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-01-12 21:47:35 +01:00
Michael Kerrisk 09007c4b88 clone.2: srcfix: semantic line breaks
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-01-12 21:47:35 +01:00
Adrian Reber bf031aaa54 clone.2: Add clone3() set_tid information
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Adrian Reber <areber@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-01-12 21:47:29 +01:00
Ponnuvel Palaniyappan 09e456c2d0 futex.2: Fix a bug in the example
The man page contains a trivial bug that's discussed here:
https://stackoverflow.com/q/59628958

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-01-10 21:30:29 +01:00
Michael Kerrisk 4897b19d4e syscall.2: Minor tweaks to Petr Vorel's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-01-10 21:12:20 +01:00
Petr Vorel ce0f522790 syscall.2: Update feature test macro requirements
Reported-by: Cyril Hrubis <chrubis@suse.cz>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-01-10 21:07:55 +01:00
John Hubbard e15ff1e76d move_pages.2: Remove ENOENT from the list of possible return values
Linux kernel commit e78bbfa82624 ("mm: stop returning -ENOENT from
sys_move_pages() if nothing got migrated") had the effect of
*never* returning -ENOENT, in any situation. So we need to update
the man page to reflect that ENOENT is not a possible return
value.

Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Brice Goglin <Brice.Goglin@inria.fr>
Cc: Yang Shi <yang.shi@linux.alibaba.com>
Cc: Christoph Lameter <cl@linux.com>
Signed-off-by: John Hubbard <jhubbard@nvidia.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-12-30 19:53:31 +01:00
Andy Lutomirski 59b191dc04 modify_ldt.2, set_thread_area.2: Fix type of base_addr
Historically (before Linux 2.6.23), base_addr was unsigned long
for 32-bit code and unsigned int for 64-bit code.  In other words,
it was always a 32-bit value.  When the ldt.h header files were
unified, the type became unsigned int on all systems.  Update
modify_ldt.2 and set_thread_area.2 accordingly.

Indeed, on x86, the GDT and LDT specify 32-bit bases for code and
data segments, and this has nothing to do with the kernel.

Reported-by: "Metzger, Markus T" <markus.t.metzger@intel.com>
Signed-off-by: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-12-14 05:53:47 +01:00
Michael Kerrisk 36a35d6735 quotactl.2: Don't show numeric values of Q_XQUOTAON XFS_QUOTA_?DQ_* flags
The programmer should not need to care about the numeric values,
and their inclusion is verbosity.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-12-13 18:07:27 +01:00
Michael Kerrisk 0674437054 quotactl.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-12-13 18:03:33 +01:00
Michael Kerrisk fcd4007bfa quotactl.2: srcfix: semantic line breaks
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-12-13 18:03:14 +01:00
Michael Kerrisk 64e4eac9ea quotactl.2: Tweaks to Yang Xu's Q_XQUOTARM EINVAL patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-12-13 18:03:08 +01:00
Yang Xu ef9e5be04f quotactl.2: Add EINVAL error of Q_XQUOTARM operation
Since kernel commit 3dd4d40b4208("xfs: Sanity check flags
of Q_XQUOTARM call"), it has added flags check. If it is
not usr,grp,prj quota type, it will report EINVAL.

Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-12-13 17:51:09 +01:00
Nikola Forró b9827733ba copy_file_range.2: tfix
Signed-off-by: Nikola Forró <nforro@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-12-12 09:36:30 +01:00
Michael Kerrisk 782715806c capget.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-12-12 09:33:00 +01:00
Michael Kerrisk c0188da633 capget.2: Add missing details in EPERM error for setting inheritable capabilities
Reported-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-12-12 09:27:28 +01:00
Michael Kerrisk 5dc3d7b78f sysctl.2: This system call was removed in Linux 5.5; adjust the page accordingly
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-12-11 23:01:08 +01:00
Adrian Reber bc03b11659 clone.2: tfix
Added two missing parentheses

Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Adrian Reber <areber@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-12-01 09:03:31 +01:00
Michael Kerrisk 445fc03eeb stime.2: Note that stime() is deprecated
As per glibc 2.31 feature notes.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-23 10:53:56 +01:00
Michael Kerrisk d279876353 gettimeofday.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-23 10:45:43 +01:00
Christian Brauner 97883faea2 clone.2: tfix
This surely meant to say clone3() and not clone(3).

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-21 12:24:24 +01:00
Michael Kerrisk be479fdf02 clone.2: ERRORS: add EINVAL for use of CLONE_PARENT by an init process
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-21 10:52:14 +01:00
Michael Kerrisk 4269a6ab8b clone.2: Some reworking of Christian Braunner's CLONE_PARENT init text
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-21 10:52:14 +01:00
Michael Kerrisk d36198870c clone.2: srcfix: rewrap source lines
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-21 10:52:14 +01:00
Christian Brauner a17b9d28c3 clone.2: Mention that CLONE_PARENT is off-limits for inits
The CLONE_PARENT flag cannot but used by init processes. Let's mention
this in the manpages to prevent surprises.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-21 10:52:14 +01:00
Michael Kerrisk a10c5a33de clone.2: Note that CLONE_THREAD causes similar behavior to CLONE_PARENT
The introductory paragraphs note that "the calling process" is
normally synonymous with the "the parent process", except in the
case of CLONE_PARENT. The same is also true of CLONE_THREAD.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-21 10:52:14 +01:00
Michael Kerrisk 324f6154f4 Removed trailing white space at end of lines 2019-11-19 15:31:20 +01:00
Michael Kerrisk a5409de92c clone.2, fallocate.2, ioctl_iflags.2, ioctl_list.2, pidfd_open.2, pivot_root.2, quotactl.2, seccomp.2, select.2, wait.2, proc.5, cgroups.7, netdevice.7, uts_namespaces.7: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-19 15:31:20 +01:00
Christian Brauner be66dbc7a7 clone.2: Use pid_t for clone3() {child,parent}_tid
Advertise to userspace that they should use proper pid_t types
for arguments returning a pid.

The kernel-internal struct kernel_clone_args currently uses int
as type and since POSIX mandates that pid_t is a signed integer
type and glibc and friends use int this is not an issue. After
the merge window for v5.5 closes we can switch struct
kernel_clone_args over to using pid_t as well without any danger
in regressing current userspace.

Also note, that the new set tid feature which will be merged for
v5.5 uses pid_t types as well.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-17 18:58:24 +01:00
Christian Brauner 8eea66b8bb clone.2: Check for MAP_FAILED not NULL on mmap()
If mmap() fails it will return MAP_FAILED which according to the manpage
is (void *)-1 not NULL.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-17 18:56:07 +01:00
Christian Brauner 225f5da8ac clone.2: tfix
Fix two spelling mistakes in manpage describing the clone{2,3}()
syscalls/syscall wrappers.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-17 18:55:46 +01:00
Michael Kerrisk efc7fb935e mmap.2: tfix
Reported-by: Marko Myllynen <myllynen@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-16 23:35:14 +01:00
Michael Kerrisk 91243dad42 mmap.2: Some rewording of the description of MAP_STACK
Reword a little to allow for the fact that there are now
*two* reasons to consider using this flag.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-14 22:24:52 +01:00
Michael Kerrisk d3d881232b mmap.2: Note that MAP_STACK exists on some other systems
As noted in man-pages commit 99c3a00027,
MAP_STACK exists on at least OpenBSD and FreeBSD.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-14 22:24:52 +01:00
Michael Kerrisk 1b54731692 pivot_root.2: EXAMPLE: allocate stack using mmap() MAP_STACK rather than malloc()
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-14 22:24:45 +01:00