Commit Graph

4197 Commits

Author SHA1 Message Date
Jakub Wilk 27e7a9a48b feature_test_macros.7: Update list of macros that inhibit default definitions
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-01 13:10:34 +02:00
Alejandro Colomar bd85f9c632 system_data_types.7: Improve "Include" wording and format, and explain it in NOTES
The previous format/wording for the includes wasn't very clear.
Improve it a bit following Branden's proposal.
It also helps reduce lines of code.

Add a subsection in NOTES explaining the conventions used.

Remove the comment for helping maintain the page,
as the NOTES section is now clear enough.

Reported-by: G. Branden Robinson <g.branden.robinson@gmail.com>
Reported-by: Dave Martin <Dave.Martin@arm.com>
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-01 11:34:49 +02:00
Michael Kerrisk 9ac786461f feature_test_macros.7: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-29 22:00:44 +02:00
Michael Kerrisk 3cf6149060 adjtimex.2, futex.2, semop.2, slabinfo.5, feature_test_macros.7, keyrings.7: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-29 16:34:29 +02:00
Tycho Andersen edc18bbf61 system_data_types.7: Add 'FILE'
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-29 15:33:03 +02:00
Michael Kerrisk c37e8cfb04 system_data_types.7: Minor edits to Alejandro Colomar's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-29 13:48:52 +02:00
Alejandro Colomar 1231520ca9 system_data_types.7: Add uintN_t family of types
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-29 13:43:27 +02:00
Alejandro Colomar 76ea908ca8 system_data_types.7: Add intN_t family of types
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-29 13:43:15 +02:00
Alejandro Colomar 1d0046bf67 system_data_types.7: Add 'uintmax_t'
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-29 13:43:03 +02:00
Alejandro Colomar df7da8f544 system_data_types.7: Add 'intmax_t'
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-29 13:42:48 +02:00
Alejandro Colomar 9cdd2e0512 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-09-28 07:52:54 +02:00
Alejandro Colomar 5f85c6469f system_data_types.7: Add va_list
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-26 22:12:16 +02:00
Michael Kerrisk cfedbfb96c rtld-audit.7: srcfix: semantic newlines
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-25 20:41:01 +02:00
Florian Weimer 3d49f95b4d rtld-audit.7: Clarify la_version handshake
Returning its argument without further checks is almost always
wrong for la_version.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Signed-off-by: Florian Weimer <fweimer@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-25 20:41:01 +02:00
Michael Kerrisk 7955742d0d system_data_types.7: Minor tweaks to Alejandro Colomar's float_t/double_t patches
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-25 13:58:47 +02:00
Alejandro Colomar 156e30baa6 system_data_types.7: srcfix
The contents of each type are a logical block that is indented as
a block.  They are not separate paragraphs that happen to be
indented separately, but a set of continuous paragraphs, all at
the same level, indented as a block from the list entry--the name
of the type--.  Therefore, it makes more sense to use block
indentation, represented by .RS/.RE, rather than indenting each
paragraph separately.  That way it's also easier to further indent
a separate paragraph inside a block, which happens for example in
the case of float_t & double_t.  It's simply much easier now to
use .IP specifically in those cases where you want to indent just
a single paragraph.

Also added an ending separator comment line just after the last
type.

[mtk: minor edits to commit message]

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-25 13:51:32 +02:00
Alejandro Colomar 55e24f06a0 system_data_types.7: Add double_t
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-25 13:50:20 +02:00
Alejandro Colomar 77b5b456de system_data_types.7: Add float_t
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-25 13:48:49 +02:00
Alejandro Colomar 963e636c35 system_data_types.7: srcfix
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-25 12:38:20 +02:00
Alejandro Colomar ecc4a0453b system_data_types.7: Add lconv
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-25 09:58:26 +02:00
Alejandro Colomar 548c692848 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-09-25 09:56:51 +02:00
Alejandro Colomar 7ffe6428d0 system_data_types.7: Add lldiv_t
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-24 13:04:31 +02:00
Alejandro Colomar 6680e1944e system_data_types.7: Add ldiv_t
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-24 13:03:35 +02:00
Alejandro Colomar 55cc29ab80 system_data_types.7: Add div_t
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-24 13:03:03 +02:00
Alejandro Colomar 9037ba92eb system_data_types.7: Add imaxdiv_t
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-24 12:07:11 +02:00
Michael Kerrisk 861d36ba31 pldd.1, bpf.2, clone.2, dup.2, ioctl_fat.2, nfsservctl.2, open_by_handle_at.2, perf_event_open.2, pivot_root.2, request_key.2, sched_setaffinity.2, seccomp.2, select.2, statx.2, dl_iterate_phdr.3, dlinfo.3, dlopen.3, insque.3, newlocale.3, printf.3, pthread_setname_np.3, rpc.3, stdarg.3, strfmon.3, veth.4, proc.5, slabinfo.5, cgroup_namespaces.7, cgroups.7, cpuset.7, fanotify.7, inotify.7, mount_namespaces.7, sock_diag.7, user_namespaces.7, ld.so.8: Use \(aq instead of ' inside monospace fonts
Use \(aq to get an unslanted single quote inside monospace code
blocks. Using a simple ' results in a slanted quote inside PDFs.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-24 09:32:31 +02:00
Alejandro Colomar 1f4e2d27b4 system_data_types.7: Add 'fexcept_t'
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-23 15:30:31 +02:00
Michael Kerrisk 6eaf991472 system_data_types.7: Reword description of fenv_t to avoid simply quoting POSIX text
The existing text comes straight from POSIX. In copyright terms,
this is at least a gray area, and in any case, simply reproducing
the text of the standard has limited value, since people can
consult the standard directly.  So, rewrite the text, to simply
quote the description from fenv(3).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-23 10:41:28 +02:00
Alejandro Colomar 2f98c2d488 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-09-22 11:09:35 +02:00
Michael Kerrisk a9e48bd40f system_data_types.7: Add 'id_t'
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-22 10:38:42 +02:00
Michael Kerrisk cde5ffdeb4 system_data_types.7: Add self to copyright notice
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-22 10:30:08 +02:00
Michael Kerrisk 7c6b4444ce system_data_types.7: Add 'gid_t'
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-22 10:28:08 +02:00
Michael Kerrisk de74a9bba2 system_data_types.7: Add 'uid_t'
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-22 10:22:35 +02:00
Michael Kerrisk 6415668a2a credentials.7: SEE ALSO: add system_data_types(7)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-22 10:03:07 +02:00
Michael Kerrisk 2d96af707a system_data_types.7: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-22 09:59:57 +02:00
Michael Kerrisk b383f33581 system_data_types.7: Add further POSIX details for size_t, ssize_t, and suseconds_t
The implementation shall support one or more programming
environments where these types are no wider than 'long'.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-22 09:56:03 +02:00
Michael Kerrisk 68fe0bc92e system_data_types.7: Document pid_t
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-22 09:51:41 +02:00
Michael Kerrisk 786a98e286 system_data_types.7: Add description of sigset_t
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-22 09:30:31 +02:00
Michael Kerrisk a6c2dc0da0 system_data_types.7: Add brief description of regmatch_t
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-22 09:18:41 +02:00
Alejandro Colomar 8eb2d11770 system_data_types.7: Document fenv_t
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-21 20:43:44 +02:00
Alejandro Colomar 097a4463dd system_data_types.7: wfix
A limit can be defined by other than POSIX

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-21 20:41:41 +02:00
Michael Kerrisk 89c6c2bdd2 system_data_types.7: Minor tweaks to Alejandro Colomar's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-21 16:08:18 +02:00
Alejandro Colomar f5d2c2efb2 system_data_types.7: Describe use of printf()/scanf() modifiers for integer data types
Add note about length modifiers and conversions to [u]intmax_t,
and add a corresponding example.

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-09-21 16:00:48 +02:00
Michael Kerrisk 104fcc3c16 system_data_types.7: Minor tweaks to Alejandro Colomar's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-20 22:14:51 +02:00
Alejandro Colomar 1a6e6d4012 system_data_types.7: Specify the length modifiers for the variables that have them
Reported-by: Florian Weimer <fweimer@redhat.com>
Reported-by: Paul Eggert <eggert@cs.ucla.edu>
Reviewed-by: Paul Eggert <eggert@cs.ucla.edu>
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-20 22:10:42 +02:00
Michael Kerrisk 50ba3793f9 system_data_types.7: Defer to sigaction(2) for further information on siginfo_t
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-20 22:10:42 +02:00
Michael Kerrisk 6b20a947be system_data_types.7: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-20 22:10:42 +02:00
Alejandro Colomar 60ce58d963 system_data_types.7: Document siginfo_t
Note: There are a few members of this structure that are
not required by POSIX (XSI extensions, and such).

I simply chose to not document them at all.

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-20 21:50:42 +02:00
Michael Kerrisk a35315178d ip.7: Minor wording fixes
Mainly cleaning up usages of "only".

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-19 10:26:21 +02:00
Michael Kerrisk b5d7102ea4 ip.7: Minor edits to Stephen Smalley's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-19 10:22:55 +02:00
Stephen Smalley 755b3ecb73 ip.7: Document IP_PASSSEC for UDP sockets
Document the IP_PASSSEC socket option and SCM_SECURITY
ancillary/control message type for UDP sockets.

IP_PASSSEC for UDP sockets was introduced in Linux 2.6.17 [1].

Example NetLabel and IPSEC configurations and usage of this
option can be found in the SELinux Notebook [2] and SELinux
testsuite [3].

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2c7946a7bf45ae86736ab3b43d0085e43947945c

[2] https://github.com/SELinuxProject/selinux-notebook

[3] https://github.com/SELinuxProject/selinux-testsuite

Reviewed-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: Stephen Smalley <stephen.smalley.work@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-19 10:18:52 +02:00
Michael Kerrisk 29494dfeb8 ip.7, unix.7: Minor edits to Stephen Smalley's patches
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-19 10:18:46 +02:00
Michael Kerrisk 14c11c826a unix.7: srcfix: rewrap source lines in Stephen Smalley's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-19 10:18:46 +02:00
Michael Kerrisk 7e915f4c58 ip.7: srcfix: rewrap source lines in Stephen Smalley's patch
(No content changes.)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-19 10:18:46 +02:00
Stephen Smalley 3c63603499 socket.7,ip.7: Document SO_PEERSEC for AF_INET sockets
Augment the description of SO_PEERSEC to cover AF_INET sockets in
addition to the prior description for AF_UNIX.

SO_PEERSEC for TCP sockets was introduced in Linux 2.6.17 [1], and
SO_PEERSEC for SCTP sockets was introduced in Linux 4.17 [2].

This does not cover usage of SCM_SECURITY for UDP sockets, which
was also introduced in the same commit for 2.6.17.

Examples of the necessary labeled IPSEC and NetLabel
configurations to enable use of SO_PEERSEC for TCP and SCTP
sockets can be found in the SELinux Notebook [3] and the
selinux-testsuite [4].

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2c7946a7bf45ae86736ab3b43d0085e43947945c

[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d452930fd3b9031e59abfeddb2fa383f1403d61a

[3] https://github.com/SELinuxProject/selinux-notebook

[4] https://github.com/SELinuxProject/selinux-testsuite

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-19 10:18:46 +02:00
Stephen Smalley e6f90c3fb2 socket.7, unix.7: Add initial description for SO_PEERSEC
SO_PEERSEC was introduced for AF_UNIX stream sockets connected via
connect(2) in Linux 2.6.2 [1] and later augmented to support
AF_UNIX stream and datagram sockets created via socketpair(2) in
Linux 4.18 [2].  Document SO_PEERSEC in the socket.7 and unix.7
man pages following the example of the existing SO_PEERCRED
descriptions.  SO_PEERSEC is also supported on AF_INET sockets
when using labeled IPSEC or NetLabel but defer adding a
description of that support to a separate patch.

The module-independent description of the security context
returned by SO_PEERSEC is from Simon McVittie.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git/commit/?id=da6e57a2e6bd7939f610d957afacaf6a131e75ed

[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0b811db2cb2aabc910e53d34ebb95a15997c33e7

Reviewed-by: Serge Hallyn <serge@hallyn.com>
Cowritten-by: Simon McVittie <smcv@collabora.com>
Signed-off-by: Stephen Smalley <stephen.smalley.work@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-19 10:18:46 +02:00
Michael Kerrisk 65c0f42710 sigevent.7: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-19 10:07:26 +02:00
Michael Kerrisk 0b62a2e3bd sigevent.7: Note that 'sigev_notify_thread_id' is Linux-specific
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-19 10:02:51 +02:00
Michael Kerrisk efbe7900b9 system_data_types.7: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-19 09:59:36 +02:00
Michael Kerrisk 6b7bf192b9 system_data_types.7: Minor tweaks
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-19 00:16:50 +02:00
Michael Kerrisk 126e68fb73 system_data_types.7: Defer to aio(7) for further information about 'struct aiocb'
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-18 23:26:29 +02:00
Alejandro Colomar def0975720 system_data_types.7: Document aiocb
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-18 23:25:19 +02:00
Alejandro Colomar b4a5c62b3b system_data_types.7: srcfix: cosmetic: Visually separate types
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-18 23:13:36 +02:00
Michael Kerrisk 66c2f0b251 system_data_types.7: Add reference to sigevent(7)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-18 23:08:28 +02:00
Alejandro Colomar bcae58d752 system_data_types.7: Document sigevent
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-18 23:05:49 +02:00
Alejandro Colomar 8d1c20e01e 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-09-18 22:49:47 +02:00
Alejandro Colomar 6fdfb077b8 system_data_types.7: Document regmatch_t
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-18 22:42:50 +02:00
Alejandro Colomar f33cc31420 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-09-18 22:41:38 +02:00
Alejandro Colomar 924dea4c9c system_data_types.7: srcfix: Add FIXME notes
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-18 22:31:46 +02:00
Alejandro Colomar 1415a39e39 system_data_types.7: Document regoff_t
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-18 22:29:27 +02:00
Alejandro Colomar 515348d543 system_data_types.7: Document ptrdiff_t
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-18 22:19:07 +02:00
Alejandro Colomar dd06f85245 system_data_types.7: wfix: sort referenced types
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-18 22:16:09 +02:00
Alejandro Colomar b6d3f94f29 system_data_types.7: srcfix: Remove TODO comment
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-18 22:15:38 +02:00
Michael Kerrisk c72ab20dc8 system_data_types.7: Add read(2) and write(2) to "See also" for size_t
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-18 22:08:02 +02:00
Alejandro Colomar eb3f724506 system_data_types.7: Document size_t
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-18 22:06:50 +02:00
Michael Kerrisk 3006c18803 feature_test_macros.7: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-17 22:54:01 +02:00
Michael Kerrisk 9f2a6007d1 intro.2, intro.3, feature_test_macros.7, standards.7: SEE ALSO: add system_data_types(7)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-17 22:54:01 +02:00
Michael Kerrisk 866c73c89f system_data_types.7: Add SEE ALSO references to feature_test_macros(7) and standards(7)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-17 22:54:01 +02:00
Alejandro Colomar cb7fd5031a system_data_types.7: Add a new page to document system data types
The initial version documents sigval, ssize_t, suseconds_t,
time_t, timer_t, timespec, and timeval.

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-17 22:37:57 +02:00
Michael Kerrisk 15e2ed1500 man-pages.7: Add some more requests re code examples
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-15 10:44:00 +02:00
Michael Kerrisk 6e68441741 man-pages.7: Soften the statement that ideal programs should be short
Sometimes, a longer program is needed. See
https://twitter.com/shuveb/status/1305689727715086337.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-15 10:43:20 +02:00
Michael Kerrisk 1aaa7bcd6a fanotify.7: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-15 07:39:27 +02:00
Alejandro Colomar 8eb90116f1 add_key.2, clock_getres.2, clone.2, futex.2, getdents.2, getpid.2, getrlimit.2, ioctl_ns.2, kcmp.2, keyctl.2, memfd_create.2, request_key.2, stat.2, timer_create.2, wait.2, clock_getcpuclockid.3, dl_iterate_phdr.3, getgrent_r.3, getpwent_r.3, getpwnam.3, posix_spawn.3, pthread_getcpuclockid.3, strcat.3, feature_test_macros.7, user_namespaces.7: Switch printf() casts to use [u]intmax_t + %ju / %jd
Let's move to the 21st century. Instead of casting system data
types to long/long long/etc. in printf() calls, instead cast to
intmax_t or uintmax_t, the largest available signed/unsigned
integer types.

[mtk: rewrote commit message]

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-15 07:39:19 +02:00
Alejandro Colomar adb2084109 rtld-audit.7: Use "%u" rather than "%d" when printing 'unsigned int' values
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-13 08:07:05 +02:00
Alejandro Colomar dc97703b4a eventfd.2, mprotect.2, pidfd_open.2, spu_run.2, timer_create.2, bswap.3, dl_iterate_phdr.3, endian.3, pthread_attr_init.3, pthread_getattr_np.3, vcs.4, rtld-audit.7: In printf(): s/0x%/%#/ except when followed by X instead of x
Use printf()'s '#' flag character to prepend the string "0x".

However, when the number is printed in uppercase, and the prefix
is in lowercase, the string "0x" needs to be manually written.

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-12 08:38:20 +02:00
Alejandro Colomar ae85f653e4 msgctl.2, outb.2, abs.3, dl_iterate_phdr.3, drand48.3, drand48_r.3, encrypt.3, ffs.3, lrint.3, lround.3, ntp_gettime.3, printf.3, random.3, scalbln.3, scanf.3, strtol.3, strtoul.3, utmp.5, feature_test_macros.7, rtld-audit.7: Omit 'int' keyword for 'short', 'long' and 'long long' types, both signed and 'unsigned'
For consistency.

The types are written both with and without the redundant 'int' keyword
all over the man-pages.  However, the most used form, by far, is the one
without 'int'.

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-12 08:37:41 +02:00
Alejandro Colomar b9bf902972 unix.7: Use sizeof() to get buffer size (instead of hardcoding macro name)
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-11 11:33:28 +02:00
Alejandro Colomar b8c40f8946 aio.7: Use perror() directly
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-11 08:42:46 +02:00
Michael Kerrisk 288d42bc37 rtnetlink.7: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-11 07:42:55 +02:00
Michael Kerrisk 50dc2db4eb rtnetlink.7: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-11 07:32:56 +02:00
Michael Kerrisk 1bad27850d rtnetlink.7: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-11 07:31:50 +02:00
Michael Kerrisk a6c679521b locale.7: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-11 07:24:36 +02:00
Michael Kerrisk f9a5e57925 pthreads.7: Explicitly note that pthreads APIs return an errno-style value on error
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-07 11:11:30 +02:00
Alejandro Colomar dc0bba35e7 user_namespaces.7: Remove unneeded cast
Casting `void *` to `struct child_args *` is already done implicitly.
Explicitly casting can silence warnings when mistakes are made, so it's
better to remove those casts when possible.

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-06 14:58:13 +02:00
Alejandro Colomar 44ab56cd6e sock_diag.7: Remove unneeded casts
The type `struct sockaddr_nl *` is implicitly casted to `void *`.
Explicitly casting can silence warnings when mistakes are made, so it's
better to remove those casts when possible.

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-06 14:57:29 +02:00
Alejandro Colomar 209e118e30 fanotify.7: Pass array to read(2) directly instead of a pointer to it
It doesn't make any sense to pass a pointer to the array to
read(2).

It might make sense to pass a pointer to the first element of the
array, but that is already implicitly done when passing the array,
which decays to that pointer, so it's simpler to pass the array.

And anyway, the cast was unneeded, as any pointer is implicitly
cast to `void *`.

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-05 17:43:55 +02:00
Michael Kerrisk 88893a773c sprof.1, eventfd.2, execve.2, futex.2, getdents.2, mprotect.2, open_by_handle_at.2, recvmmsg.2, sched_setaffinity.2, CPU_SET.3, backtrace.3, bsearch.3, dl_iterate_phdr.3, dlinfo.3, duplocale.3, encrypt.3, envz_add.3, fopencookie.3, getaddrinfo.3, getaddrinfo_a.3, getdate.3, getgrent_r.3, getgrouplist.3, getifaddrs.3, getprotoent_r.3, getservent_r.3, hsearch.3, mallinfo.3, malloc_info.3, mbstowcs.3, mtrace.3, pthread_create.3, pthread_getcpuclockid.3, pthread_setaffinity_np.3, qsort.3, rand.3, strcat.3, strtok.3, tsearch.3, wordexp.3, core.5, aio.7, inotify.7, sock_diag.7, unix.7, user_namespaces.7: Use C99 style to declare loop counter variables
Rather than:

    sometype x;

    for (x = ....; ...)

use

    for (sometype x = ...; ...)

This brings the declaration and use closer together (thus aiding
readability) and also clearly indicates the scope of the loop
counter variable.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-05 17:20:12 +02:00
Michael Kerrisk 48d0510307 getgrouplist.3, insque.3, malloc_info.3, pthread_create.3, tsearch.3, aio.7: Use C99-style declarations for readability
Rather than writing things such as:

    struct sometype *x;
    ...
    x = malloc(sizeof(*x));

let's use C99 style so that the type info is in the same line as
the allocation:

    struct sometype *x = malloc(sizeof(*x));

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-05 16:34:34 +02:00
Alejandro Colomar a899cafef4 aio.7: Use sizeof consistently
Use ``sizeof`` consistently through all the examples in the following
way:

- Use the name of the variable instead of its type as argument for
  ``sizeof``.

	Rationale:
	https://www.kernel.org/doc/html/v5.8/process/coding-style.html#allocating-memory

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-05 14:49:42 +02:00
Alejandro Colomar 012b86a0b6 unix.7: Use sizeof consistently
Use ``sizeof`` consistently through all the examples in the following
way:

- Use the name of the variable instead of its type as argument for
  ``sizeof``.

	Rationale:
	https://www.kernel.org/doc/html/v5.8/process/coding-style.html#allocating-memory

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-05 14:49:42 +02:00
Alejandro Colomar 0ff1c5e28a fanotify.7: Use sizeof consistently
Use ``sizeof`` consistently through all the examples in the following
way:

- Use the name of the variable instead of its type as argument for
  ``sizeof``.

	Rationale:
	https://www.kernel.org/doc/html/v5.8/process/coding-style.html#allocating-memory

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-05 14:49:42 +02:00
Michael Kerrisk bf49fb9387 cpuset.7: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-05 14:49:42 +02:00
Alejandro Colomar 7551caeaed unix.7: wsfix
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-04 09:37:24 +02:00
Michael Kerrisk 2d3122a1ea fanotify.7: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-08-28 14:26:57 +02:00
Michael Kerrisk 0bda7dedcf fanotify_init.2, fanotify.7: Minor edits to Amir Goldstein's patches
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-08-28 14:26:12 +02:00
Michael Kerrisk 1a1e4638a5 fanotify_init.2, fanotify.7: srcfix: Semantic newlines
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-08-28 14:18:05 +02:00
Amir Goldstein ea4f577808 fanotify.7, fanotify_init.2: Document FAN_REPORT_NAME
Document fanotify_init(2) flag FAN_REPORT_NAME and the format of
the event info type FAN_EVENT_INFO_TYPE_DFID_NAME.

The fanotify_fid.c example is extended to also report the name of
the created file or subdirectory.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Matthew Bobrowski <mbobrowski@mbobrowski.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-08-28 14:16:30 +02:00
Amir Goldstein e9f14fa0bb fanotify.7, fanotify_init.2: Document FAN_REPORT_DIR_FID
Document fanotify_init(2) flag FAN_REPORT_DIR_FID and event info
type FAN_EVENT_INFO_TYPE_DFID.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Matthew Bobrowski <mbobrowski@mbobrowski.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-08-28 14:16:03 +02:00
Amir Goldstein b216da617f fanotify.7, fanotify_mark.2: Generalize documentation of FAN_REPORT_FID
With fanotify_init(2) flag FAN_REPORT_FID, the group identifies
filesystem objects by file handles in a single event info record
of type FAN_EVENT_INFO_TYPE_FID.

We intend to add support for new fanotify_init(2) flags for which
the group identifies filesystem objects by file handles and add
more event info record types.

To that end, start by changing the language of the man page to
refer to a "group that identifies filesystem objects by file
handles" instead of referring to the FAN_REPORT_FID flag and
document the extended event format structure in a more generic
manner that allows more than a single event info record and not
only a record of type FAN_EVENT_INFO_TYPE_FID.

Clarify that the object identified by the file handle refers to
the directory in directory entry modification events.

Remove a note about directory entry modification events and
monitoring a mount point that I found to be too confusing and out
of context.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Matthew Bobrowski <mbobrowski@mbobrowski.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-08-28 14:15:31 +02:00
Michael Kerrisk 5c14a73b2c bpf-helpers.7: Really resync against latest kernel source
Jakub points out that my last resync may accidentally have been
against an old version of the kernel source, since the resync
resulted in many deleted lines. I suspect he may be right.
Let's resync against today's current kernel.

Reported-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-08-26 20:55:47 +02:00
Alejandro Colomar b5cd247069 getgrouplist.3, inotify.7: Use sizeof consistently
Use ``sizeof`` consistently through all the examples in the
following way:

- Never use a space after ``sizeof``, and always use parentheses
  around the argument.

  Rationale:
  https://www.kernel.org/doc/html/v5.8/process/coding-style.html#spaces

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-08-25 14:33:03 +02:00
Steve Hilder cbcd119573 capabilities.7: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-08-22 22:24:02 +02:00
Michael Kerrisk 7b203a3d6d bpf-helpers.7: Resync with current kernel source
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-08-22 13:28:09 +02:00
Thomas Piekarski e00e18a247 cgroups.7: wfix
Removing repeated word "the"

Signed-off-by: Thomas Piekarski <t.piekarski@deloquencia.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-08-22 10:16:39 +02:00
Thomas Piekarski b754b41430 time_namespaces.7: wfix
Removing repeated word "the"

Signed-off-by: Thomas Piekarski <t.piekarski@deloquencia.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-08-22 10:16:23 +02:00
Michael Kerrisk ed6c69cab9 intro.1, clock_getres.2, execve.2, fcntl.2, iopl.2, lseek.2, mknod.2, mmap.2, mount.2, mq_getsetattr.2, pidfd_open.2, prctl.2, setns.2, sgetmask.2, sigaction.2, stat.2, statx.2, sync.2, syscalls.2, syslog.2, timerfd_create.2, umask.2, a64l.3, aio_init.3, atoi.3, dladdr.3, fread.3, getpt.3, isfdtype.3, malloc_stats.3, malloc_trim.3, mkfifo.3, mq_close.3, mq_open.3, mq_receive.3, mq_send.3, mq_unlink.3, posix_memalign.3, posix_openpt.3, pthread_atfork.3, pthread_rwlockattr_setkind_np.3, regex.3, scanf.3, sem_close.3, sem_destroy.3, sem_init.3, sem_open.3, sem_post.3, sem_unlink.3, sigset.3, sigvec.3, strftime.3, termios.3, console_codes.4, dsp56k.4, fd.4, lp.4, mouse.4, pts.4, sk98lin.4, dir_colors.5, proc.5, resolv.conf.5, termcap.5, utmp.5, aio.7, armscii-8.7, arp.7, capabilities.7, cgroups.7, charsets.7, cp1251.7, cp1252.7, environ.7, glob.7, inode.7, iso_8859-1.7, iso_8859-10.7, iso_8859-11.7, iso_8859-13.7, iso_8859-14.7, iso_8859-15.7, iso_8859-16.7, iso_8859-2.7, iso_8859-3.7, iso_8859-4.7, iso_8859-5.7, iso_8859-6.7, iso_8859-7.7, iso_8859-8.7, iso_8859-9.7, keyrings.7, koi8-r.7, koi8-u.7, mailaddr.7, man-pages.7, netdevice.7, operator.7, persistent-keyring.7, process-keyring.7, pthreads.7, pty.7, raw.7, regex.7, session-keyring.7, shm_overview.7, signal.7, socket.7, suffixes.7, thread-keyring.7, unicode.7, units.7, uri.7, user-keyring.7, user-session-keyring.7, iconvconfig.8, ld.so.8, zic.8: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-08-13 10:01:14 +02:00
Mike Frysinger b4c38a723f drop "coding: UTF-8" header
This header is used inconsistently -- man pages are UTF-8 encoded
but not setting this marker.  It's only respected by the man-db
package, and seems a bit anachronistic at this point when UTF-8
is the standard default nowadays.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-08-13 09:36:46 +02:00
Michael Kerrisk cc863b39dd man-pages.7: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-08-09 12:35:22 +02:00
Michael Kerrisk 17b015b53e man-pages.7: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-08-09 12:34:42 +02:00
Michael Kerrisk 4fba3f2aa8 man-pages.7: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-08-09 12:33:20 +02:00
Michael Kerrisk 1884339410 man-pages.7: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-08-09 10:27:38 +02:00
Michael Kerrisk 5daacbdbcc man-pages.7: Add some notes on generating optimal glyphs
Getting nice renderings of ^ ` and ~ requires special
steps in the page source.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-08-09 10:27:38 +02:00
Michael Kerrisk 9ca13180d5 pldd.1, bpf.2, execve.2, futex.2, ioctl_fat.2, ioctl_tty.2, keyctl.2, signalfd.2, timerfd_create.2, __ppc_get_timebase.3, a64l.3, frexp.3, pthread_setname_np.3, regex.3, rpmatch.3, scanf.3, strfmon.3, strftime.3, termios.3, console_codes.4, vcs.4, veth.4, core.5, dir_colors.5, termcap.5, ascii.7, charsets.7, glob.7, man-pages.7, operator.7, regex.7, user_namespaces.7, zic.8: Use "\(ha" rather than "^" in code
This renders better in PDF.

Reported-by: Geoff Clare <gwc@opengroup.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-08-09 10:22:22 +02:00
Michael Kerrisk 7b97eb9ff0 glob.7, zic.8: Use \` rather than `
\` produces better rendering in PDF.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-08-09 10:22:19 +02:00
Michael Kerrisk af2d18b2c2 intro.1, clock_getres.2, clone.2, futex.2, ioctl_fat.2, mkdir.2, mknod.2, mmap.2, open.2, statx.2, umask.2, userfaultfd.2, glob.3, mkfifo.3, termios.3, wordexp.3, console_codes.4, sk98lin.4, vcs.4, dir_colors.5, hosts.equiv.5, proc.5, termcap.5, utmp.5, ascii.7, bpf-helpers.7, charsets.7, environ.7, glob.7, mailaddr.7, netlink.7, operator.7, suffixes.7, tcp.7, unicode.7, uri.7, zic.8: Use "\(ti" instead of "~"
A naked tilde ("~") renders poorly in PDF. Instead use "\(ti",
which renders better in a PDF, and produces the same glyph
when rendering on a terminal.

Reported-by: Geoff Clare <gwc@opengroup.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-08-06 22:25:11 +02:00
Michael Kerrisk 18f49d7563 math_error.7: tfix
Reported-by: John Scott <jscott@posteo.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-08-04 21:08:06 +02:00
Michael Kerrisk 490f9b6c2b socket.2, address_families.7: wfix: multiplexor ==> multiplexer
Both are used, but "multiplexer" seems to be majority usage in
English.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-07-30 08:03:02 +02:00
Michael Kerrisk 9e232754c1 pty.7: Explicitly mention CONFIG_LEGACY_PTYS
Explicitly mention CONFIG_LEGACY_PTYS, and note that it is disabled
by default since Linux 2.6.30.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-07-29 11:17:11 +02:00
Michael Kerrisk 8931e190a9 pty.7: Relocate a paragraph to NOTES
The paragraph noting applications that use pseudoterminals is better
placed in NOTES than in the DESCRTIPTION.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-07-29 11:17:11 +02:00
Mike Frysinger 795cf36094 Various pages: Drop t comment header
Historically, a comment of the following form at the top of a
manual page was used to indicate too man(1) that the use of tbl(1)
was required in order to process tables:

    '\" t

However, at least as far back as 2001 (according to Branden),
man-db's man(1) automatically uses tbl(1) as needed, rendering
this comment unnecessary. And indeed many existing pages in
man-pages that have tables don't have this comment at the top of
the file.  So, drop the comment from those files where it is
present.

[mtk: completely rewrote commit message]

Reported-by: G. Branden Robinson <g.branden.robinson@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-07-24 14:18:27 +02:00
Mike Frysinger 01ae31d315 Various pages: Trim leading blank comment line
Very few pages do this, so trim them.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-07-24 12:56:59 +02:00
Mike Frysinger 243d656fdb Various pages: Use standard .\" comment style
The \" comment produces blank lines.  Use the .\" that the vast
majority of the codebase uses instead.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-07-24 12:55:55 +02:00
Michael Kerrisk aade901bee capabilities.7: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-07-17 13:31:12 +02:00
Saikiran Madugula 69a0c93e3c capabilities.7: CAP_SYS_RESOURCE: add two more items for POSIX message queues
CAP_SYS_RESOURCE also allows overriding /proc/sys/fs/mqueue/msg_max
and /proc/sys/fs/mqueue/msgsize_max.

Signed-off-by: Saikiran Madugula <hummerbliss@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-07-17 13:31:06 +02:00
Benjamin Peterson 80c5b48d9c cgroup_namespaces.7: wfix
Signed-off-by: Benjamin Peterson <benjamin@python.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-07-17 09:59:19 +02:00
Michael Kerrisk 28a4c58cc2 intro.1, localedef.1, memusage.1, memusagestat.1, bpf.2, execve.2, fork.2, keyctl.2, request_key.2, sigaction.2, signal.2, socket.2, dlopen.3, getauxval.3, gnu_get_libc_version.3, pthread_atfork.3, sem_post.3, setjmp.3, strftime.3, veth.4, locale.5, nscd.conf.5, resolv.conf.5, address_families.7, armscii-8.7, ascii.7, capabilities.7, cgroups.7, charsets.7, cp1251.7, cp1252.7, iso_8859-1.7, iso_8859-10.7, iso_8859-11.7, iso_8859-13.7, iso_8859-14.7, iso_8859-15.7, iso_8859-16.7, iso_8859-2.7, iso_8859-3.7, iso_8859-4.7, iso_8859-5.7, iso_8859-6.7, iso_8859-7.7, iso_8859-8.7, iso_8859-9.7, keyrings.7, koi8-r.7, koi8-u.7, libc.7, locale.7, man.7, network_namespaces.7, persistent-keyring.7, session-keyring.7, signal.7, unicode.7, uri.7, user-keyring.7, user-session-keyring.7: ffix: replace - with real\-
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-07-06 14:28:51 +02:00
Michael Kerrisk f08ee8bca4 math_error.7: wfix
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-07-06 13:36:01 +02:00
Bjarni Ingi Gislason fb6d2c09ae man7/*: ffix: change '-' to '\-' for options and to '\(en' for a range
Change '-' to '\-' for the prefix of names to indicate an option.

  Change '-' to '\(en' for a range.

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-07-02 12:21:02 +02:00
Sven Hoexter 069cbb6044 cgroups.7, cpuset.7: Update kernel cgroup documentation references
cgroups-v1/v2 documentation got moved to the "admin-guide" subfolder
and converted from .txt files to .rst

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-06-30 09:37:38 +02:00
Michael Kerrisk 09caeefd5c ip.7: Remove mention of ipfw(4) which was in long obsolete ipchains project
Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-06-25 09:00:59 +02:00
Dan Kenigsberg 0c576731a8 capabilities.7: Clarify that CAP_SYS_NICE relates to *lowering* the nice value
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-06-24 13:43:06 +02:00
Michael Kerrisk 7122afd6bf standards.7: Add an entry for POSIX.1-1988
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-06-24 13:22:12 +02:00
Michael Kerrisk f5f55ae2d3 standards.7: Correct various details in the explanation of XPG/POSIX/SUS
As reported by mail from Geoff Clare, there are some details that
need correcting:

Subject: standards(7) (was: man-pages-5.07 released)
Date: Wed, 10 Jun 2020 10:53:14 +0100
From: Geoff Clare <gwc@opengroup.org>

...

The first isn't really a problem, just an oddity. You list
POSIX.1b as "formerly known as POSIX.4", but you don't do the
equivalent for POSIX.1c ("formerly known as POSIX.4a").

There are several problems with the XPG3 entry:

    "first significant release" - although I suppose XPG3 could
    be considered more significant than XPG2 because it was the
    first one to incorporate POSIX.1, I don't think it's fair to
    imply that XPG2 was not significant.  (E.g. XPG2 was
    significant in that it was the first release to include
    I18N, and the first that had a conformance test suite.)

    "produced by the X/Open Company, a multivendor consortium" -
    this conflates two different things called X/Open. X/Open
    Company Limited is the UK company that did the editing work,
    organised meetings, etc. X/Open Group is the consortium
    whose members developed the technical content.

    "This multivolume guide was based on the POSIX standards" -
    at the time there was only one POSIX standard, namely
    POSIX.1-1988.  The first release to incorporate POSIX.2 was
    XPG4 (which you may consider worth noting in the XPG4
    entry).

To fix these problems I would suggest changing the entry to:

XPG3  Released in 1989, this was the first release of the X/Open
      Portability Guide to be based on a POSIX standard
      (POSIX.1-1988).  This multivolume guide was developed by the
      X/Open Group, a multivendor consortium.

Under SUSv2 I would suggest changing:

    Sometimes also referred to as XPG5.

to:

    Sometimes also referred to (incorrectly) as XPG5.

Under POSIX.1-2001, SUSv3: "XSI conformance constitutes the Single
UNIX Specification version 3 (SUSv3)" is problematic.  I think I
touched on this in the previous discussion. I would suggest
deleting that sentence and instead inserting, before "Two
Technical Corrigenda ...", the following:

    The Single UNIX Specification version 3 (SUSv3) comprises the
    Base Specifications containing XBD, XSH, XCU and XRAT as
    above, plus X/Open Curses Issue 4 version 2 as an extra volume
    that is not in POSIX.1-2001.

Something similar is needed in the POSIX.1-2008, SUSv4 entry where
it talks about "the same four parts". The extra volume this time
is X/Open Curses Issue 7.
]]

Cowritten-by: Geoff Clare <gwc@opengroup.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-06-24 13:22:12 +02:00
Michael Kerrisk baa9880610 capabilities.7: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-06-24 12:02:18 +02:00
Michael Kerrisk 9f6f7345e4 capabilities.7: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-06-24 12:01:06 +02:00
Michael Kerrisk a3cb5856c8 capabilities.7: Clarify wording around increasing process nice value
The fact that a more negative nice value means higher
priority is a continuing source of confusion.

Reported-by: Dan Kenigsberg <danken@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-06-24 11:59:49 +02:00
Michael Kerrisk 575bac0fdd connect.2, pidfd_send_signal.2, ptrace.2, socket.7: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-06-21 09:26:30 +02:00
Bjarni Ingi Gislason c3f602233d man7/*: srcfix: trim trailing space
Trim tailing space in "strings".

  There is no change in the output from "nroff" and "groff".

###

Output is from: test-groff -b -mandoc -T utf8 -rF0 -t -w w -z

  [ "test-groff" is a developmental version of "groff" ]

troff: <attributes.7>:510: warning: trailing space
troff: <attributes.7>:512: warning: trailing space
troff: <attributes.7>:513: warning: trailing space
troff: <attributes.7>:516: warning: trailing space
troff: <attributes.7>:649: warning: trailing space
troff: <attributes.7>:681: warning: trailing space
troff: <attributes.7>:720: warning: trailing space
####

troff: <environ.7>:181: warning: trailing space
troff: <environ.7>:182: warning: trailing space
####

troff: <ip.7>:820: warning: trailing space
####

troff: <signal.7>:316: warning: trailing space
Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>

####

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-06-21 09:03:31 +02:00
Michael Kerrisk 04ce17bdba symlink.7: Minor fixes to Aleksa Sarai's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-06-19 14:59:45 +02:00
Aleksa Sarai 41e240557f symlink.7: Document magic links more completely
Traditionally, magic links have not been a well-understood topic
in Linux. This helps clarify some of the terminology used in
openat2.2.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-06-19 14:59:45 +02:00
Jakub Wilk 1297d74439 man-pages.7: wfix
Reorder full wordings to match the order of abbreviations.

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-06-19 12:47:44 +02:00
Michael Kerrisk 81701c0437 capabilities.7: Document CAP_BPF
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-06-12 13:52:22 +02:00
Michael Kerrisk 3502d8682f capabilities.7: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-06-12 13:52:22 +02:00
Michael Kerrisk e39e42409d capabilities.7: Add CAP_PERFMON
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-06-12 13:52:22 +02:00
Michael Kerrisk c0cf0480da address_families.7: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-06-11 07:53:17 +02:00
Michael Kerrisk 22f79f9580 chroot.2, utimensat.2, vfork.2, getcwd.3, getdtablesize.3, ualarm.3, usleep.3, rtnetlink.7: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-06-11 07:52:18 +02:00
Michael Kerrisk 9bfc9cb197 dup.2, fallocate.2, futex.2, ioctl_fat.2, ioctl_ficlonerange.2, ioctl_fideduperange.2, madvise.2, membarrier.2, mprotect.2, open.2, openat2.2, perf_event_open.2, perfmonctl.2, pipe.2, process_vm_readv.2, s390_pci_mmio_write.2, s390_runtime_instr.2, s390_sthyi.2, set_thread_area.2, sigprocmask.2, subpage_prot.2, unshare.2, cmsg.3, newlocale.3, pthread_setname_np.3, strfmon.3, strfromd.3, tsearch.3, tcp.7, ld.so.8: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-06-11 07:45:09 +02:00
Michael Kerrisk 4f23702902 cgroups.7: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-06-10 12:06:41 +02:00
Michael Kerrisk 146842f921 cgroup_namespaces.7: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-06-10 12:04:48 +02:00
Michael Kerrisk a8fcac48f5 capabilities.7: SEE ALSO: add getpcaps(8)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-06-10 08:00:46 +02:00
Michael Kerrisk bffbb22fda iconv.1, locale.1, memusage.1, memusagestat.1, pldd.1, sprof.1, _syscall.2, add_key.2, adjtimex.2, bind.2, bpf.2, chown.2, clone.2, close.2, copy_file_range.2, eventfd.2, fanotify_init.2, fanotify_mark.2, fork.2, fsync.2, futex.2, getdents.2, getrlimit.2, getxattr.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, ioctl_fat.2, ioctl_getfsmap.2, ioctl_ns.2, ioctl_tty.2, ioctl_userfaultfd.2, kcmp.2, keyctl.2, listen.2, listxattr.2, mbind.2, membarrier.2, memfd_create.2, mkdir.2, move_pages.2, mremap.2, msync.2, nfsservctl.2, open.2, perf_event_open.2, pidfd_send_signal.2, pipe.2, pivot_root.2, pkey_alloc.2, process_vm_readv.2, ptrace.2, readlink.2, readv.2, recv.2, recvmmsg.2, rename.2, request_key.2, s390_runtime_instr.2, sched_setaffinity.2, seccomp.2, send.2, sendmmsg.2, sigaltstack.2, signalfd.2, socket.2, socketpair.2, splice.2, spu_create.2, spu_run.2, statfs.2, syscall.2, sysctl.2, sysfs.2, tee.2, timer_getoverrun.2, timer_settime.2, umount.2, userfaultfd.2, utimensat.2, wait4.2, INFINITY.3, __ppc_get_timebase.3, __setfpucw.3, abort.3, aio_cancel.3, aio_error.3, aio_read.3, aio_return.3, atexit.3, backtrace.3, basename.3, bsearch.3, bswap.3, cacos.3, cacosh.3, catan.3, catanh.3, cexp2.3, clock_getcpuclockid.3, clog2.3, cmsg.3, confstr.3, div.3, dl_iterate_phdr.3, dlerror.3, dlinfo.3, dlopen.3, dlsym.3, duplocale.3, encrypt.3, end.3, endian.3, envz_add.3, err.3, expm1.3, fdim.3, flockfile.3, fmtmsg.3, frexp.3, ftw.3, get_nprocs_conf.3, get_phys_pages.3, getaddrinfo_a.3, getauxval.3, getdate.3, getdtablesize.3, getgrent_r.3, getgrouplist.3, gethostbyname.3, getline.3, getnameinfo.3, getopt.3, getprotoent_r.3, getpwent_r.3, getpwnam.3, getservent_r.3, getsubopt.3, getutent.3, glob.3, gnu_get_libc_version.3, hsearch.3, if_nameindex.3, inet.3, inet_net_pton.3, inet_ntop.3, inet_pton.3, insque.3, killpg.3, makecontext.3, mallinfo.3, malloc.3, malloc_hook.3, malloc_info.3, mallopt.3, matherr.3, mbsnrtowcs.3, mbstowcs.3, mcheck.3, mempcpy.3, mq_getattr.3, mq_notify.3, mtrace.3, newlocale.3, nextafter.3, ntp_gettime.3, offsetof.3, open_memstream.3, pow.3, printf.3, pthread_attr_init.3, pthread_attr_setdetachstate.3, pthread_attr_setguardsize.3, pthread_attr_setinheritsched.3, pthread_attr_setschedparam.3, pthread_attr_setschedpolicy.3, pthread_attr_setstack.3, pthread_attr_setstacksize.3, pthread_cancel.3, pthread_cleanup_push.3, pthread_create.3, pthread_detach.3, pthread_getattr_default_np.3, pthread_getattr_np.3, pthread_getcpuclockid.3, pthread_join.3, pthread_mutex_consistent.3, pthread_mutexattr_setrobust.3, pthread_setaffinity_np.3, pthread_setcancelstate.3, pthread_setname_np.3, pthread_setschedparam.3, pthread_sigmask.3, pthread_spin_init.3, pthread_testcancel.3, pthread_tryjoin_np.3, ptsname.3, qsort.3, rand.3, random.3, remainder.3, rpmatch.3, rtime.3, rtnetlink.3, scalb.3, scalbln.3, scandir.3, sem_getvalue.3, sem_wait.3, setaliasent.3, setlogmask.3, sigwait.3, sincos.3, sockatmark.3, stdarg.3, stpcpy.3, strcat.3, strfmon.3, strptime.3, strtod.3, strtok.3, strtol.3, strtoul.3, strverscmp.3, tsearch.3, uselocale.3, wcstok.3, wcstombs.3, wordexp.3, y0.3, loop.4, vcs.4, veth.4, charmap.5, core.5, filesystems.5, gai.conf.5, hosts.5, hosts.equiv.5, locale.5, nss.5, repertoiremap.5, securetty.5, shells.5, ttytype.5, ascii.7, complex.7, cpuset.7, credentials.7, fanotify.7, hier.7, inotify.7, ip.7, mount_namespaces.7, mq_overview.7, netlink.7, network_namespaces.7, pid_namespaces.7, pkeys.7, rtld-audit.7, rtnetlink.7, sem_overview.7, signal-safety.7, sock_diag.7, spufs.7, standards.7, symlink.7, tcp.7, time_namespaces.7, unix.7, user_namespaces.7, xattr.7, ldconfig.8: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-06-09 14:48:40 +02:00
Michael Kerrisk fd85c2387b openat2.2, proc.5, bpf-helpers.7: srcfix: strip trailing whitespace
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-06-09 14:48:40 +02:00
Michael Kerrisk 94e316bfea user_namespaces.7: Clarify "system time"
From an email conversation with Léo Stefanesco:

> In the man7.org version of the man page for user_namespaces(7), it reads:
>
>    there are many privileged operations that affect
>    resources that are not associated with any namespace type,
>    for example, changing the system time
>    (governed by CAP_SYS_TIME)
>
> which is not consistent with time_namespaces(7).

In fact, strictly peaking the text still is correct, even after
the arrival of time namespaces.

Time namespaces virtualize only the boot-time and monotonic
clocks, not the "real time" (i.e., calendar time), which is the
time referred in the passage you quote.

That said, the text is perhaps now a little misleading, and
a little clarification would help. I changed the text to:

    there are many privileged operations that affect
    resources are not associated with any namespace type,
    for example, changing the system **(i.e., calendar)** time
    (governed by CAP_SYS_TIME)

Reported-by: Léo Stefanesco <leo.lveb@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-06-09 10:03:04 +02:00
Michael Kerrisk 7dc03d8607 bpf-helpers.7: Resync against kernel 5.7
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-06-09 09:47:48 +02:00
Amir Goldstein e9898cc8ba fanotify.7, fanotify_mark.2: Clarify FAN_ONDIR in output mask
FAN_ONDIR was an input only flag before introducing
FAN_REPORT_FID.  Since the introduction of FAN_REPORT_FID, it can
also be in output mask.

Move the text describing its role in the output mask to fanotify.7
where the other output mask bits are documented.

[mtk: commit message tidy-up]

Reviewed-by: Matthew Bobrowski <mbobrowski@mbobrowski.org>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-06-08 23:07:59 +02:00
Amir Goldstein c3a3f611f6 fanotify.7, fanotify_mark.2: Revert "fanotify.7, fanotify_mark.2: Document FAN_DIR_MODIFY"
This reverts commit a93e5c9593.

FAN_DIR_MODIFY was disabled for v5.7 release by kernel commit
f17936993af0 ("fanotify: turn off support for FAN_DIR_MODIFY").

Reviewed-by: Matthew Bobrowski <mbobrowski@mbobrowski.org>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-06-08 22:16:34 +02:00
Michael Kerrisk 005383e69e man-pages.7: Rename EXAMPLE to EXAMPLES
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-31 10:45:27 +02:00
Michael Kerrisk a14af333d6 Various pages: retitle EXAMPLE section heading to EXAMPLES
EXAMPLES appears to be the wider majority usage across various
projects' manual pages, and is also what is used in the POSIX
manual pages.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-31 10:45:27 +02:00
Michael Kerrisk c91a4f144c man-pages.7: Add REPORTING BUGS section
man-pages doesn't have a REPORTING BUGS section in manual pages,
but many other projects do. Make some recommendations about
placement of that section.
2020-05-31 10:45:27 +02:00
Michael Kerrisk fa1e323100 man-pages.7: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-31 10:45:27 +02:00
Michael Kerrisk 88c9c16a68 man-pages.7: Describe COPYRIGHT section
man-pages doesn't use COPYRIGHT sections in manual pages, but
various projects do. Make some recommendations about placement
of the section.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-31 10:45:27 +02:00
Michael Kerrisk cd2621174c man-pages.7: Mention AUTHORS in summary section list
Although man-pages doesn't use AUTHORS sections, many projects do
use an AUTHORS section in their manual pages, so mention it in
man-pages to suggest some guidance on the position at which
to place that section.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-31 10:45:27 +02:00
Michael Kerrisk 5dbd04b5f9 pipe.2, socketpair.2, dlopen.3, posix_memalign.3, signal-safety.7: Correct bogus POSIX.1 standards names
POSIX.1-2003 ==> POSIX.1-2001 TC1
POSIX.1-2004 ==> POSIX.1-2001 TC2
POSIX.1-2013 ==> POSIX.1-2008 TC1
POSIX.1-2016 ==> POSIX.1-2008 TC2

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-26 13:25:54 +02:00
Michael Kerrisk e9832dc0da mount_namespaces.7: SEE ALSO: add mount(8), umount(8)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-26 10:29:11 +02:00
Michael Kerrisk c82d80af7b mount_namespaces.7: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-21 21:56:19 +02:00
Michael Kerrisk f2637a5625 standards.7: Remove mention of bogus "POSIX" names
The terms POSIX.1-{2003,2004,2013,2016} were inventions of
my imagination, as confirmed by consulting Geoff Clare of
The Open Group. Remove these names.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-21 11:09:17 +02:00
Michael Kerrisk f69f82d84c standards.7: Add some more standards
Add: SUSv4 2016 edition, POSIX.1-2017, and SUSv4 2018 edition

Reported-by: Geoff Clare <gwc@opengroup.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-21 11:09:17 +02:00
Thomas Piekarski 3514b9beba hier.7: Updating from FHS 2.3 to 3.0
Adding description of new directories (/run, /usr/libexec,
/usr/share/color,/usr/share/ppd, /var/lib/color), stating
/usr/X11R6 as removed and updating URL to and version of FHS.

See https://bugzilla.kernel.org/show_bug.cgi?id=206693

Reported-by: Gary Perkins <glperkins@lit.edu>
Signed-off-by: Thomas Piekarski <t.piekarski@deloquencia.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-19 21:48:04 +02:00
Michael Kerrisk c0e4ab6356 cgroups.7: Note the existence of the clone3() CLONE_INTO_CGROUP flag
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-19 21:32:10 +02:00
Michael Kerrisk 81b8997f5f pipe.2, sigaltstack.2, abort.3, signal.7: Place SH sections in standard order
Fix various pages that deviated from the norm described in
man-pages(7).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-19 15:45:01 +02:00
Michael Kerrisk c8fb1c6d4a gettid.2, open.2, seccomp.2, pthread_mutex_consistent.3, signal.7, xattr.7: Put SEE ALSO entries in alphabetical order
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-19 07:23:34 +02:00
Kir Kolyshkin bba4bbbd9a Various pages: Add missing commas in SEE ALSO part II
This is a sequel to commit baf17bc4f2, addressing the
issues with missing commas in the middle of SEE ALSO lists that
emerged since.

The awk script from the original commit was not working and had to
be slightly modified (s/["]SEE ALSO["]/"?SEE ALSO/), otherwise it
works like a charm. Here's the fixed script and its output just
before this commit:

for f in man*/*; do
awk '
    /^.SH "?SEE ALSO/ {
	sa=1; print "== " FILENAME " =="; print; next
    }
    /^\.(PP|SH)/ {
	sa=0; no=0; next
    }
    /^\.BR/ {
	if (sa==1) {
	    print;
	    if (no == 1)
		print "Missing comma in " FILENAME " +" FNR-1; no=0
	}
    }
    /^\.BR .*)$/ {
	if (sa==1)
	    no=1;
	next
    }
    /\.\\"/ {next}
    /.*/ {
	if (sa==1) {
	    print; next
	}
    }
' $f; done | grep Missing
Missing comma in man1/memusage.1 +272
Missing comma in man2/adjtimex.2 +597
Missing comma in man2/adjtimex.2 +598
Missing comma in man2/mkdir.2 +252
Missing comma in man2/sigaction.2 +1045
Missing comma in man2/sigaction.2 +1047
Missing comma in man3/mbsnrtowcs.3 +198
Missing comma in man3/ntp_gettime.3 +142
Missing comma in man3/strcmp.3 +219
Missing comma in man3/strtol.3 +302
Missing comma in man3/wcstombs.3 +120
Missing comma in man7/user_namespaces.7 +1378
Missing comma in man7/xattr.7 +198

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-18 21:37:48 +02:00
Ondrej Slamecka 448d14e716 ip.7: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-15 11:49:54 +02:00
Michael Kerrisk 7200e79646 symlink.7: Describe differences in the treatment of symlinks in the dirname
Describe differences in the treatment of symlinks in the dirname
part of pathname.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-12 09:47:18 +02:00
Michael Kerrisk 9660f3baaf symlink.7: wfix
The close proximity of an em-dash and a hyphen is a little
visually jarring.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-12 09:43:01 +02:00
Michael Kerrisk 3f298932bd pid_namespaces.7: Note that /proc/sys/kernel/ns_last_pid is virtualized per PID NS
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-11 14:07:36 +02:00
Michael Kerrisk 439526d153 pid_namespaces.7: Correct capability requirements for write to /proc/sys/kernel/ns_last_pid
CAP_SYS_ADMIN is needed in the user NS that owns the PID NS.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-11 14:06:09 +02:00
Michael Kerrisk 25da04997e tcp.7: Update info on tcp_syn_retries default value
See https://bugzilla.kernel.org/show_bug.cgi?id=202885.

Reported-by: vrafaeli@msn.com
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-04 10:21:57 +02:00
Michael Kerrisk 0dd34252fd namespaces.7: srcfix: Quote Eric Biederman on significance of st_dev in ns comparisons
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-02 21:29:04 +02:00
Michael Kerrisk 113a073baf inotify.7: Add missing #include in example program
Reported-by: Jason Etherton <jason@ethertonltd.co.uk>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-02 21:28:59 +02:00
Michael Kerrisk 2ece4ef7c6 netlink.7: Update path for NETLINK_CONNECTOR docs in kernel source tree
Reported-by: Idan Katz <idanski1@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-28 11:10:20 +02:00
Jakub Wilk dcf91cdc7e user_namespaces.7: tfix
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-27 21:29:42 +02:00
Michael Kerrisk ab08f6698e rtnetlink.7: Minor consistency fixes
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-24 22:11:13 +02:00
Achilles Gaikwad ba3d7b1cd8 xattr.7: Add attr(1) as relevant page to SEE ALSO
The page of attr(1) is relevant to xattrs, therefore add it to the
SEE ALSO section.

attr(1) command works for other filesystems as well.

Signed-off-by: Achilles Gaikwad <agaikwad@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-24 21:43:23 +02:00
Michael Kerrisk 00b6e1dd67 rtnetlink.7: Various tweaks to Jan Moskyto Matejka's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-23 21:48:09 +02:00
Jan Moskyto Matejka a4c92224ac rtnetlink.7: Add missing RTA_* attributes
Used Bird's source code, kernel source code, iproute2 source code
and iproute2 manpages to find meanings of these new attributes.

Signed-off-by: Jan Moskyto Matejka <mq@ucw.cz>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-23 21:28:05 +02:00
Michael Kerrisk b789b1e430 netdevice.7: Minor rewording
See https://bugzilla.kernel.org/show_bug.cgi?id=201475.

Reported-by: alexopo.ceid@gmail.com
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-23 13:55:16 +02:00
Michael Kerrisk 792d42144b ip.7: SEE ALSO: add netdevice(7)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-23 13:48:37 +02:00
Michael Kerrisk d8833593c7 ip.7: Note a few more valid 'protocol' values
See https://bugzilla.kernel.org/show_bug.cgi?id=204981

Reported-by: Martin Doucha <mdoucha@suse.cz>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-23 11:13:26 +02:00
Michael Kerrisk 41f974b9fc user_namespaces.7: wfix: Improve wording in discussion of resetting of 'securebits' flags
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-22 13:07:07 +02:00
Michael Kerrisk 4d7a0dbc8b user_namespaces.7: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-22 13:03:44 +02:00
Michael Kerrisk 314f7c114e credentials.7: Alert reader that UID/GID changes can affect process capabilities
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-21 14:12:47 +02:00
Michael Kerrisk 485b33bf8c credentials.7: Relocate a paragraph (no content changes)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-21 14:09:30 +02:00
Michael Kerrisk cbae8f094e credentials.7: Changes to process UIDs/GIDs can effect the "dumpable" attribute
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-21 14:04:49 +02:00
Michael Kerrisk f09f6a0628 credentials.7: Add a list of the APIs that change a process's credentials
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-21 13:55:22 +02:00
Michael Kerrisk 4c258dbcb9 fanotify.7: Wrap some long lines in example program
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-20 21:33:46 +02:00
Amir Goldstein a93e5c9593 fanotify.7, fanotify_mark.2: Document FAN_DIR_MODIFY
Document the details of the new FAN_DIR_MODIFY event, which
introduces entry name information to the fanotify event
reporting format.

Enhance the fanotify_fid.c example to also report this event.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Matthew Bobrowski <mbobrowski@mbobrowski.org>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-20 21:22:09 +02:00
Amir Goldstein 4e53518552 fanotify.7: Fix fanotify_fid.c example
- The condition for printing "subdirectory created" was always
  true.
- The arguments and error check of open_by_handle_at() were
  incorrect.
- Fix example description inconsistencies.
- Nicer indentation of example output.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Matthew Bobrowski <mbobrowski@mbobrowski.org>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-20 21:22:02 +02:00
Michael Kerrisk 70523ea5d4 mount_namespaces.7: Minor wording fix
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-20 12:13:33 +02:00
Michael Kerrisk a93436f081 mount_namespaces.7: srcfix: remove a crufty FIXME
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-20 12:12:44 +02:00
Michael Kerrisk 6f283aed59 suffixes.7: wfix
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-20 11:41:25 +02:00
Michael Kerrisk 3921205dd2 man-pages.7: wfix
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-20 11:00:11 +02:00
Michael Kerrisk 20e973f526 ascii.7: SEE ALSO: fix sort order in entries
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-20 08:29:30 +02:00
Michael Kerrisk 08a964c97b signal.7: tfix
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-19 23:32:58 +02:00
Michael Kerrisk 85a102024c x25.7: tfix
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-19 21:45:01 +02:00
Michael Kerrisk 1cc2995abf capabilities.7: tfix
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-19 21:20:09 +02:00
Michael Kerrisk 19531dec84 capabilities.7: tfix
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-19 16:42:00 +02:00
Michael Kerrisk 858c85752a socket.7: Minor tweaks to SO_RCVLOWAT description
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-17 15:33:28 +02:00
Michael Kerrisk 7f9a6a9970 netlink.7: Note that NETLINK_SOCK_DIAG is preferred over NETLINK_INET_DIAG
Reported-by: Fabien Siron <fabien.siron@epita.fr>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-17 13:09:59 +02:00
Marcus Gelderie 8f0b7d765d cgroups.7: Mention cgroup.sane_behavior file
The cgroup.sane_behavior file returns the hard-coded value "0" and
is kept for legacy purposes. Mention this in the man-page.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-16 13:57:53 +02:00
Michael Kerrisk 4e2b112c91 bpf-helpers.7: Sync against Linux 5.7-rc1
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-16 13:45:41 +02:00
Michael Kerrisk c8bbab9a6a namespaces.7: Document /proc/sys/user/max_time_namespaces
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-16 13:25:02 +02:00
Michael Kerrisk c96bc2056c namespaces.7: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-16 13:23:44 +02:00
Michael Kerrisk 3220cf5f7e signal.7: srcfix: note some implementation-specific details for process-directed signals
Reported-by: Joseph C. Sible <josephcsible@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-13 12:27:47 +02:00
Michael Kerrisk 2f0182d20d time_namespaces.7: Minor wording fix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-12 08:44:50 +02:00
Michael Kerrisk a8433b3b16 time_namespaces.7: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-12 08:43:56 +02:00
Michael Kerrisk 8678102abe pidfd_getfd.2, select.2, exit.3, time.7, time_namespaces.7: srcfix: Trim trailing white spaces
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-11 22:33:10 +02:00
Michael Kerrisk e8426ca2b4 getent.1, localedef.1, accept.2, arch_prctl.2, clock_getres.2, clock_nanosleep.2, connect.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, execve.2, getitimer.2, getsockopt.2, gettid.2, inotify_add_watch.2, inotify_init.2, io_submit.2, ioctl.2, lseek.2, madvise.2, mlock.2, mmap.2, mprotect.2, msgctl.2, msgop.2, open_by_handle_at.2, openat2.2, pidfd_open.2, poll.2, prctl.2, quotactl.2, s390_sthyi.2, select.2, select_tut.2, semctl.2, semget.2, semop.2, setns.2, shmctl.2, shmget.2, shmop.2, sigaction.2, stat.2, statx.2, syscalls.2, timer_create.2, timerfd_create.2, unshare.2, wait.2, CPU_SET.3, aio_init.3, atoi.3, des_crypt.3, dirfd.3, fmemopen.3, fopencookie.3, ftok.3, fts.3, getaddrinfo.3, getifaddrs.3, getrpcent.3, gsignal.3, lio_listio.3, nl_langinfo.3, posix_memalign.3, posix_openpt.3, posix_spawn.3, scanf.3, sem_init.3, sem_post.3, shm_open.3, strcmp.3, strftime.3, st.4, elf.5, group.5, proc.5, services.5, aio.7, cgroups.7, feature_test_macros.7, keyrings.7, man-pages.7, namespaces.7, path_resolution.7, sigevent.7, signal.7, socket.7, sysvipc.7, time.7, udp.7: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-11 22:07:24 +02:00
Michael Kerrisk 5ea630a46a time.7: Add small subsection on clocks and time namespaces
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-11 21:38:07 +02:00
Michael Kerrisk 05d2e9d0ab namespaces.7: Eliminate some superfluous info from display of /proc/PID/ns links
The display of the /proc/PID/ns renders very wide. Make it
narrower by eliminating some nonessential info via some
awk(1) filtering.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-11 21:38:07 +02:00
Michael Kerrisk 19e8f797fc namespaces.7: Add time namespaces information
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-11 21:38:07 +02:00
Michael Kerrisk 0953c1b4b3 time_namespaces.7: Tweaks for symbolic clock-IDs in /proc/PID/timens_offsets
Andrei Vagin implemented a change I suggested:
clock-IDs are now be expressed in symbolic form (e.g.,
"monotonic") instead of numeric form (e.g., 1) when reading
/proc/PID/timerns_offsets, and can be expressed either
symbolically or numerically when writing to that file.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-11 21:34:51 +02:00
Michael Kerrisk 3685736f10 time_namespaces.7: Add an ERRORS description for writes to timens_offsets
In particular, note the ERANGE restrictions reported by
Thomas Gleixner.

Reported-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-10 10:14:29 +02:00
Michael Kerrisk cf40643937 time_namespaces.7: Updates after feedback from Andrei Vagin
Reported-by: Andrei Vagin <avagin@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-10 10:14:29 +02:00
Michael Kerrisk 1840148b08 time_namespaces.7: Minor wording tweaks
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-10 10:14:29 +02:00
Michael Kerrisk 5bed06a99a time_namespaces.7: New page documenting time namespaces
Reviewed-by: Dmitry Safonov <dima@arista.com>
Reviewed-by: Andrei Vagin <avagin@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-10 10:14:29 +02:00
Zack Weinberg d128b5b7ee sigaction.2, signal.7: Document kernel bugs in delivery of signals from CPU exceptions
signal.7: Which signal is delivered in response to a CPU exception
is under-documented and does not always make sense.  See
<https://bugzilla.kernel.org/show_bug.cgi?id=205831> for an
example where it doesn’t make sense; per the discussion there,
this cannot be changed because of backward compatibility concerns,
so let’s instead document the problem.

sigaction.2: For related reasons, the kernel doesn’t always fill
in all of the fields of the siginfo_t when delivering signals from
CPU exceptions.  Document this as well.  I imagine this one
_could_ be fixed, but the problem would still be relevant to
anyone using an older kernel.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-10 09:41:55 +02:00
Heinrich Schuchardt 18bbb297eb unix.7: Correct example
The example is misleading. It is not a good idea to unlink an
existing socket because we might try to start the server multiple
times. In this case it is preferable to receive an error.

We could add code that removes the socket when the server process
is killed but that would stretch the example too far.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-06 13:55:25 +02:00
Michael Kerrisk 526d9962b3 ip.7, tcp.7, udp.7: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-06 10:44:12 +02:00
Michael Kerrisk 5039577811 tcp.7: SEE ALSO: mention Documentation/networking/ip-sysctl.txt
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-06 10:41:42 +02:00
Michael Kerrisk dd6b076aa6 socket.7: Note SCM message types for SO_TIMESTAMP and SO_TIMESTAMPNS
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-06 10:07:04 +02:00
Michael Kerrisk 3e472692a6 socket.7: Add some SO_TIMESTAMPNS details.
Note the kernel version that added SO_TIMESTAMPNS,
and (from the kernel commit) note tha SO_TIMESTAMPNS and
SO_TIMESTAMP are mutually exclusive.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-06 10:07:04 +02:00
Alejandro Colomar a47d370bb3 socket.7: Document SO_TIMESTAMPNS
===========
DESCRIPTION
===========

I added a paragraph for ``SO_TIMESTAMP``, and modified the
paragraph for ``SIOCGSTAMP`` in relation to ``SO_TIMESTAMPNS``.

I based the documentation on the existing ``SO_TIMESTAMP``
documentation, and
on my experience using ``SO_TIMESTAMPNS``.

I asked a question on stackoverflow, which helped me understand
``SO_TIMESTAMPNS``:

https://stackoverflow.com/q/60971556/6872717

Testing of the feature being documented
=======================================

I wrote a simple server and client test.

In the client side, I connected a socket specifying
``SOCK_STREAM`` and ``"tcp"``.

Then I enabled timestamp in ns:

.. code-block:: c

     int enable = 1;

     if (setsockopt(sd, SOL_SOCKET, SO_TIMESTAMPNS, &enable,
             sizeof(enable)))
         goto err;

Then I prepared the msg header:

.. code-block:: c

     char        buf[BUFSIZ];
     char        cbuf[BUFSIZ];
     struct msghdr    msg;
     struct iovec    iov;

     memset(buf, 0, ARRAY_BYTES(buf));
     iov.iov_len    = ARRAY_BYTES(buf) - 1;
     iov.iov_base    = buf;
     msg.msg_name    = NULL;
     msg.msg_iov    = &iov;
     msg.msg_iovlen    = 1;
     msg.msg_control    = cbuf;
     msg.msg_controllen = ARRAY_BYTES(cbuf);

And got some times before and after receiving the msg:

.. code-block:: c

     struct timespec    tm_before, tm_recvmsg, tm_after, tm_msg;

     clock_gettime(CLOCK_REALTIME, &tm_before);
     usleep(500000);
     clock_gettime(CLOCK_REALTIME, &tm_recvmsg);
     n = recvmsg(sd, &msg, MSG_WAITALL);
     if (n < 0)
         goto err;
     usleep(1000000);
     clock_gettime(CLOCK_REALTIME, &tm_after);

After that I read the timestamp of the msg:

.. code-block:: c

     struct cmsghdr *cmsg;

     for (cmsg = CMSG_FIRSTHDR(&msg); cmsg;
             cmsg = CMSG_NXTHDR(&msg, cmsg)) {
         if (cmsg->cmsg_level == SOL_SOCKET  &&
                     cmsg->cmsg_type == SO_TIMESTAMPNS) {
             memcpy(&tm_msg, CMSG_DATA(cmsg), sizeof(tm_msg));
             break;
         }
     }
     if (!cmsg)
         goto err;

And finally printed the results:

.. code-block:: c

     double tdiff;

     printf("%s\n", buf);
     tdiff = timespec_diff_ms(&tm_before, &tm_recvmsg);
     printf("tm_r - tm_b = %lf ms\n", tdiff);
     tdiff = timespec_diff_ms(&tm_before, &tm_after);
     printf("tm_a - tm_b = %lf ms\n", tdiff);
     tdiff = timespec_diff_ms(&tm_before, &tm_msg);
     printf("tm_m - tm_b = %lf ms\n", tdiff);

Which printed:

::

     asdasdfasdfasdfadfgdfghfthgujty 6, 0;
     tm_r - tm_b = 500.000000 ms
     tm_a - tm_b = 1500.000000 ms
     tm_m - tm_b = 18.000000 ms

System:

::

     Linux debian 5.4.0-4-amd64 #1 SMP Debian 5.4.19-1 (2020-02-13) x86_64
     GNU/Linux
     gcc (Debian 9.3.0-8) 9.3.0

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-06 10:07:04 +02:00
Michael Kerrisk 6b6505af4d path_resolution.7: srcfix: semantic newlines
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-03-30 22:36:13 +02:00
Aleksa Sarai 61d24bff30 path_resolution.7: Update to mention openat2(2) features
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-03-30 22:35:33 +02:00
Michael Kerrisk c1d6273963 signal.7: wfix
Reported-by: Pablo M. Ronchi <pmronchi@yahoo.com.ar>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-03-29 09:22:38 +02:00
Jakub Wilk 1662b235bc units.7: tfix
Escape hyphens.

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-03-26 08:49:39 +01:00
Michael Kerrisk 9359ebce87 vsock.7: srcfix: semantic newlines
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-03-14 19:43:04 +01:00
Michael Kerrisk 0a8a31e804 vsock.7: Minor tweaks to Stefano Garzarella's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-03-14 19:42:34 +01:00
Stefano Garzarella cab58dfe1e vsock.7: Add VMADDR_CID_LOCAL description
Linux 5.6 added the new well-known VMADDR_CID_LOCAL for
local communication.

This patch explains how to use it and removes the legacy
VMADDR_CID_RESERVED no longer available.

Reviewed-by: Jorgen Hansen <jhansen@vmware.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-03-14 19:41:57 +01:00
Jakub Wilk 165bef47be socket.7: tfix
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-03-12 09:16:48 +01:00
Michael Kerrisk 112e0e60b7 socket.7: Add more details on SO_SELECT_ERR_QUEUE
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-28 21:42:29 +01:00
Michael Kerrisk cb1b0be683 socket.7: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-28 21:39:29 +01:00
Ricardo Biehl Pasquali 7ded63ef4c socket.7: Add description of SO_SELECT_ERR_QUEUE
Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-28 21:39:29 +01:00
Michael Kerrisk 2aa31d7fef sysvipc.7: Rewrite this page as just a summary of the sysvipc APIs
All of the other details in this page have by now been moved into
the relevant *ctl(2) pages.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-25 16:55:33 +01:00
Bjarni Ingi Gislason 2fe33a0da7 man7/namespaces.7: srcfix: Make the number of .RS/.RE macros equal
Add a '.RE' macro to terminate the last .RS block.

There is no change in the output.

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-24 09:00:08 +01:00
Michael Kerrisk 38c287b8c4 cgroups.7: Update list of cgroups v2 controllers
Update the list of cgroups v2 controllers (several controllers
were missing).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-23 09:58:23 +01:00
Michael Kerrisk cda7f4a31f cgroups.7: Put list of v2 controllers in alphabetical order
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-23 09:58:23 +01:00
Michael Kerrisk 9e18674a5b cgroups.7: Document the cgroups v2 'memory_localevents' mount option
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-23 09:58:23 +01:00
Michael Kerrisk efb9595454 cgroups.7: Add a subsection on cgroup v2 mount options and include 'nsdelegate'
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-23 09:58:23 +01:00
Michael Kerrisk d4c9a84828 cgroups.7: SEE ALSO: add Documentation/admin-guide/cgroup-v2.rst
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 2fd2369549 epoll.7: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-23 09:58:22 +01:00
Michael Kerrisk ee5d5d33c5 epoll.7: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-23 09:58:22 +01:00
Michael Kerrisk 0a26e2d352 epoll.7: wfix: break a sentence up, for clarity
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-23 09:58:22 +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 1059ffb804 tcp.7: tcp_low_latency is ignored since Linux 4.14
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-07 16:11:46 +01:00
Michael Kerrisk 863d6b7de0 unix.7: The PID sent with SCM_CREDENTIALS must match an existing process
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-05 12:51:51 +01:00
Nick Shipp 5687d86fa5 inotify.7: Merge late perror() into fprintf()
fprintf() may have overridden errno before perror() could print
it in this example.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-01-21 20:45:24 +01:00
Jakub Wilk 91201f28d8 keyrings.7: ffix
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-01-21 20:22:27 +01:00
Michael Kerrisk 9d7fb78448 epoll.7: wfix
Reported-by: John Jones <jmjatlanta@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-01-21 20:20:04 +01:00
Michael Kerrisk 0549038d6d uts_namespaces.7: wfix
Reported-by: Sam Varshavchik <mrsam@courier-mta.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-01-21 20:12:43 +01:00
Michael Kerrisk 1f294696f6 ipc_namespaces.7: wfix
Reported-by: Sam Varshavchik <mrsam@courier-mta.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-01-21 20:12:26 +01:00
Michael Kerrisk a0253f557d fanotify.7: srcfix
Reported-by: Sam Varshavchik <mrsam@courier-mta.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-01-21 20:11:17 +01:00
Michael Kerrisk f7d3e6aac1 sched.7: tfix
Reported-by: Will <cassis@tricolore.lu>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-01-06 19:42:43 +01:00
Antonin Décimo ae10667d48 netlink.7: Fix alignment issue in example
PVS-Studio reports that in

    char buf[8192];
    /* ... */
    nh = (struct nlmsghdr *) buf,

the pointer 'buf' is cast to a more strictly aligned pointer type.
This is undefined behaviour. One possible solution to make sure
that buf is correctly aligned is to declare buf as an array of
struct nlmsghdr. Other solutions include allocating the array on
the heap, use an union, or stdalign features.  With this patch,
the buffer still contains 8192 bytes.

This was raised on Stack Overflow:
https://stackoverflow.com/questions/57745580/netlink-receive-buffer-alignment

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-12-30 19:49:08 +01:00
Antonin Décimo 7aec4106be rtnetlink.7: ifa_index is an unsigned int
See include/linux/if_addr.h.

struct ifaddrmsg {
    __u8        ifa_family;
    __u8        ifa_prefixlen;    /* The prefix length        */
    __u8        ifa_flags;    /* Flags            */
    __u8        ifa_scope;    /* Address scope        */
    __u32        ifa_index;    /* Link index            */
};

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-12-30 19:46:45 +01:00
Michael Kerrisk ef0ba060b3 capabilities.7: Minor clarification of historical behavior
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-12-30 11:01:01 +01:00
Michael Kerrisk bafa494386 capabilities.7: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-12-30 11:01:01 +01:00
Michael Kerrisk 8bdc484e43 packet.7: Add comment noting when 'tp_vlan_tpid' field appeared
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-12-12 09:55:38 +01:00
kevin sztern 68d16cd0ae packet.7: Add missing tpacket_auxdata field (tp_vlan_tpid)
The definition of the tpacket_auxdata struct in the manpage is not
the same as the definition found in
/include/uapi/linux/if_packet.h.

In particular, instead of a tp_padding field, there is a
tp_vlan_tpid field. An example of a project using this field is
libpcap[1].

[1]: https://github.com/the-tcpdump-group/libpcap/blob/master/pcap-linux.c#L349

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-12-12 09:55:30 +01:00
Brennan Vincent d1203f4537 inotify.7: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-12-12 09:35:08 +01:00
Michael Kerrisk daf57a6ae0 cgroups.7: Improve the discussion of the advantages of v2 release notification
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-29 13:39:55 +01:00
Michael Kerrisk c309dee7e1 cgroups.7: Describe the cgroup.events "frozen" key
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-29 13:39:55 +01:00
Michael Kerrisk 71e2545e90 cgroups.7: Split discussion of cgroups.events file and v2 release notification
In preparation for adding a description of the "frozen" key.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-29 13:39:55 +01:00
Michael Kerrisk 31261a5dcc cgroups.7: The v2 freezer controller was added in Linux 5.2
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-29 11:27:48 +01:00
Michael Kerrisk cf4e631c96 vsock.7: Show size of svm_zero field in sockaddr_vm structure
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-21 10:52:14 +01:00
Michael Kerrisk 4475e3f07a vsock.7: Minor tweaks to Mikhail Golubev's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-21 10:52:14 +01:00
Mikhail Golubev 552c121013 vsock.7: Add missing structure element
The structure 'struct sockaddr_vm' has additional element
'unsigned char svm_zero[]' since version v3.9-rc1
(include/uapi/linux/vm_sockets.h).  Linux kernel checks that this
element is zeroed (net/vmw_vsock/vsock_addr.c). Reflect this on
the vsock man page.

Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=205583
Signed-off-by: Mikhail Golubev <Mikhail.Golubev@opensynergy.com>
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 e46733c47e bpf-helpers.7: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
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
Michael Kerrisk edca873239 bpf-helpers.7: Fix .TH line
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-19 12:50:47 +01:00
Michael Kerrisk 29965ffceb bpf-helpers.7: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-19 12:39:37 +01:00
Michael Kerrisk e6107b296a bpf-helpers.7: Refresh against kernel v5.4-rc7
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-19 12:36:56 +01:00
Michael Kerrisk 4791ea7fda uts_namespaces.7: Add a little more detail on scope of UTS namespaces
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-09 09:09:18 +01:00
Michael Kerrisk 49cb13ca52 signal-safety.7: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-05 10:38:54 +01:00
Michael Kerrisk a1b3319b7c netdevice.7: Small wording fix in description of SIOCGIFCONF
SIOCGIFCONF returns "network layer" addresses (not "transport
layer").

Reported-by: Silviu Popescu <silviupopescu1990@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-05 09:25:21 +01:00
Jakub Wilk 1191b4e7b2 netlink.7: tfix
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-10-31 06:21:50 +01:00
Torin Carey 897367f900 unix.7: tfix
In the given example, the second recvmsg(2) call should receive four bytes,
as the third sendmsg(2) call only sends four.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-10-31 06:18:30 +01:00