Commit Graph

3682 Commits

Author SHA1 Message Date
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
Torin Carey 6a14132925 unix.7: tfix
Signed-off-by: Torin Carey <torin@tcarey.uk>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-10-31 06:18:19 +01:00
Michael Kerrisk 640453bbea cgroups.7: Switch to "considerate language"
Thanks-to: https://twitter.com/expensivestevie
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-10-28 14:32:07 +01:00
Jakub Wilk bce2cf9805 mount_namespaces.7: tfix
Remove duplicated word.

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-10-11 23:45:12 +02:00
Michael Kerrisk 867c9b3408 localedef.1, close.2, copy_file_range.2, execve.2, get_robust_list.2, getdomainname.2, gethostname.2, inotify_add_watch.2, io_submit.2, ioctl_fideduperange.2, kcmp.2, kill.2, mmap.2, move_pages.2, perf_event_open.2, ptrace.2, rt_sigqueueinfo.2, sched_setaffinity.2, sched_setparam.2, setns.2, sigaction.2, signalfd.2, statx.2, syscall.2, syscalls.2, uname.2, write.2, errno.3, fexecve.3, getauxval.3, printf.3, pthread_mutex_consistent.3, pthread_mutexattr_init.3, pthread_mutexattr_setrobust.3, pthread_setcancelstate.3, regex.3, strtok.3, strtol.3, ttyname.3, smartpqi.4, core.5, resolv.conf.5, man-pages.7, mq_overview.7, operator.7, pthreads.7, signal-safety.7, sysvipc.7: Update timestamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-10-11 10:45:02 +02:00
Michael Kerrisk 86fd6bad0a signal.7: SEE ALSO: add pidfd_send_signal(2)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-10-10 12:24:28 +02:00
Michael Kerrisk ee81d7e418 namespaces.7: Include manual page references in the summary table of namespace types
Make the page more compact by removing the stub subsections that
list the manual pages for the namespace types. And while we're
here, add an explanation of the table columns.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-10-09 08:59:22 +02:00
Michael Kerrisk 4d75df3711 mount_namespaces.7: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-10-09 08:25:04 +02:00
Michael Kerrisk 19416046c5 mount_namespaces.7: Tweak discussion of "less privileged" mount namespace
Eric Biederman:

    I hate to nitpick, but I am going to say that when I read
    the text above the phrase "mount namespace of the process
    that created the new mount namespace" feels wrong.

    Either you use unshare(2) and the mount namespace of the
    process that created the mount namespace changes.

    Or you use clone(2) and you could argue it is the new child
    that created the mount namespace.

    Having a different mount namespace at the end of the
    creation operation feels like it makes your phrase confusing
    about what the starting mount namespace is.  I hate to use
    references that are ambiguous when things are changing.

Reported-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-10-08 23:30:55 +02:00
Michael Kerrisk 534755eed9 mount_namespaces.7: Explain how a namespace's mount point list is initialized
Provide a more detailed explanation of the initialization of
the mount point list in a new mount namespace.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-10-08 22:51:59 +02:00
Michael Kerrisk ed425459c5 mount_namespaces.7: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-10-08 16:26:15 +02:00
Michael Kerrisk a0c9733194 mount_namespaces.7: Clarify description of "less privileged" mount namespaces
The current text talks about "parent mount namespaces", but there
is no such concept. As confirmed by Eric Biederman, what is mean
here is "the mount namespace this mount namespace started as a
copy of". So, this change writes up Eric's description in a more
detailed way.

Reported-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-10-08 16:20:59 +02:00
Michael Kerrisk a2fc45a9f8 mount_namespaces.7: It may be desirable to disable propagation after creating a namespace
After creating a new mount namespace, it may be desirable to
disable mount propagation. Give the reader a more explicit
hint about this.

Reported-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-10-07 12:11:30 +03:00
Michael Kerrisk 0b6cf5d26e pthreads.7: Minor tweaks to Carlos O'Donell's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-10-05 14:54:24 +03:00
Michael Kerrisk 50639a2a18 pthread_setcancelstate.3, pthreads.7: srcfix: wrap source lines at sentence boundaries
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-10-05 14:54:15 +03:00
Carlos O'Donell dbb01cbbdb pthread_setcancelstate.3, pthreads.7, signal-safety.7: Describe issues with cancellation points in signal handlers
In a recent conversation with Mathieu Desnoyers I was reminded
that we haven't written up anything about how deferred
cancellation and asynchronous signal handlers interact. Mathieu
ran into some of this behaviour and I promised to improve the
documentation in this area to point out the potential pitfall.

Thoughts?

8< --- 8< --- 8<
In pthread_setcancelstate.3, pthreads.7, and signal-safety.7 we
describe that if you have an asynchronous signal nesting over a
deferred cancellation region that any cancellation point in the
signal handler may trigger a cancellation that will behave
as-if it was an asynchronous cancellation. This asynchronous
cancellation may have unexpected effects on the consistency of
the application. Therefore care should be taken with asynchronous
signals and deferred cancellation.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-10-05 14:54:02 +03:00