aboutsummaryrefslogtreecommitdiffstats
path: root/man7
AgeCommit message (Collapse)AuthorFilesLines
2020-05-12symlink.7: Describe differences in the treatment of symlinks in the dirnameMichael Kerrisk1-5/+35
Describe differences in the treatment of symlinks in the dirname part of pathname. Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-12symlink.7: wfixMichael Kerrisk1-1/+1
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-11pid_namespaces.7: Note that /proc/sys/kernel/ns_last_pid is virtualized per ↵Michael Kerrisk1-1/+3
PID NS Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-11pid_namespaces.7: Correct capability requirements for write to ↵Michael Kerrisk1-1/+1
/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-04tcp.7: Update info on tcp_syn_retries default valueMichael Kerrisk1-2/+8
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-02namespaces.7: srcfix: Quote Eric Biederman on significance of st_dev in ns ↵Michael Kerrisk1-0/+5
comparisons Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-02inotify.7: Add missing #include in example programMichael Kerrisk1-0/+1
Reported-by: Jason Etherton <jason@ethertonltd.co.uk> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-28netlink.7: Update path for NETLINK_CONNECTOR docs in kernel source treeMichael Kerrisk1-1/+5
Reported-by: Idan Katz <idanski1@gmail.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-27user_namespaces.7: tfixJakub Wilk1-1/+1
Signed-off-by: Jakub Wilk <jwilk@jwilk.net> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-24rtnetlink.7: Minor consistency fixesMichael Kerrisk1-27/+27
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-24xattr.7: Add attr(1) as relevant page to SEE ALSOAchilles Gaikwad1-0/+1
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-23rtnetlink.7: Various tweaks to Jan Moskyto Matejka's patchMichael Kerrisk1-26/+62
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-23rtnetlink.7: Add missing RTA_* attributesJan Moskyto Matejka1-6/+53
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-23netdevice.7: Minor rewordingMichael Kerrisk1-3/+2
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-23ip.7: SEE ALSO: add netdevice(7)Michael Kerrisk1-0/+1
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-23ip.7: Note a few more valid 'protocol' valuesMichael Kerrisk1-11/+27
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-22user_namespaces.7: wfix: Improve wording in discussion of resetting of ↵Michael Kerrisk1-4/+7
'securebits' flags Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-22user_namespaces.7: tfixMichael Kerrisk1-1/+1
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-21credentials.7: Alert reader that UID/GID changes can affect process capabilitiesMichael Kerrisk1-0/+6
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-21credentials.7: Relocate a paragraph (no content changes)Michael Kerrisk1-24/+24
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-21credentials.7: Changes to process UIDs/GIDs can effect the "dumpable" attributeMichael Kerrisk1-0/+3
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-21credentials.7: Add a list of the APIs that change a process's credentialsMichael Kerrisk1-3/+28
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-20fanotify.7: Wrap some long lines in example programMichael Kerrisk1-9/+12
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-20fanotify.7, fanotify_mark.2: Document FAN_DIR_MODIFYAmir Goldstein1-10/+61
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-20fanotify.7: Fix fanotify_fid.c exampleAmir Goldstein1-16/+22
- 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-20mount_namespaces.7: Minor wording fixMichael Kerrisk1-1/+1
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-20mount_namespaces.7: srcfix: remove a crufty FIXMEMichael Kerrisk1-2/+0
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-20suffixes.7: wfixMichael Kerrisk1-1/+1
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-20man-pages.7: wfixMichael Kerrisk1-2/+2
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-20ascii.7: SEE ALSO: fix sort order in entriesMichael Kerrisk1-6/+6
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-19signal.7: tfixMichael Kerrisk1-2/+2
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-19x25.7: tfixMichael Kerrisk1-1/+1
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-19capabilities.7: tfixMichael Kerrisk1-2/+2
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-19capabilities.7: tfixMichael Kerrisk1-1/+1
Reported-by: Helge Kreutzmann <debian@helgefjell.de> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-17socket.7: Minor tweaks to SO_RCVLOWAT descriptionMichael Kerrisk1-3/+10
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-17netlink.7: Note that NETLINK_SOCK_DIAG is preferred over NETLINK_INET_DIAGMichael Kerrisk1-5/+5
Reported-by: Fabien Siron <fabien.siron@epita.fr> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-16cgroups.7: Mention cgroup.sane_behavior fileMarcus Gelderie1-0/+4
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-16bpf-helpers.7: Sync against Linux 5.7-rc1Michael Kerrisk1-75/+343
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-16namespaces.7: Document /proc/sys/user/max_time_namespacesMichael Kerrisk1-0/+5
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-16namespaces.7: tfixMichael Kerrisk1-1/+1
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-13signal.7: srcfix: note some implementation-specific details for ↵Michael Kerrisk1-0/+18
process-directed signals Reported-by: Joseph C. Sible <josephcsible@gmail.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-12time_namespaces.7: Minor wording fixMichael Kerrisk1-1/+1
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-12time_namespaces.7: tfixMichael Kerrisk1-1/+1
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-11pidfd_getfd.2, select.2, exit.3, time.7, time_namespaces.7: srcfix: Trim ↵Michael Kerrisk2-2/+2
trailing white spaces Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-11getent.1, localedef.1, accept.2, arch_prctl.2, clock_getres.2, ↵Michael Kerrisk13-13/+13
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-11time.7: Add small subsection on clocks and time namespacesMichael Kerrisk1-0/+11
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-11namespaces.7: Eliminate some superfluous info from display of /proc/PID/ns linksMichael Kerrisk1-11/+11
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-11namespaces.7: Add time namespaces informationMichael Kerrisk1-0/+22
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-11time_namespaces.7: Tweaks for symbolic clock-IDs in /proc/PID/timens_offsetsMichael Kerrisk1-10/+25
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-10time_namespaces.7: Add an ERRORS description for writes to timens_offsetsMichael Kerrisk1-1/+41
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-10time_namespaces.7: Updates after feedback from Andrei VaginMichael Kerrisk1-3/+17
Reported-by: Andrei Vagin <avagin@gmail.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-10time_namespaces.7: Minor wording tweaksMichael Kerrisk1-4/+5
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-10time_namespaces.7: New page documenting time namespacesMichael Kerrisk1-0/+299
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-10sigaction.2, signal.7: Document kernel bugs in delivery of signals from CPU ↵Zack Weinberg1-10/+30
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-06unix.7: Correct exampleHeinrich Schuchardt1-7/+0
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-06ip.7, tcp.7, udp.7: ffixMichael Kerrisk3-1/+7
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-06tcp.7: SEE ALSO: mention Documentation/networking/ip-sysctl.txtMichael Kerrisk1-0/+3
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-06socket.7: Note SCM message types for SO_TIMESTAMP and SO_TIMESTAMPNSMichael Kerrisk1-2/+10
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-06socket.7: Add some SO_TIMESTAMPNS details.Michael Kerrisk1-1/+8
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-06socket.7: Document SO_TIMESTAMPNSAlejandro Colomar1-8/+25
=========== 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-03-30path_resolution.7: srcfix: semantic newlinesMichael Kerrisk1-1/+2
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-03-30path_resolution.7: Update to mention openat2(2) featuresAleksa Sarai1-18/+38
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-03-29signal.7: wfixMichael Kerrisk1-1/+1
Reported-by: Pablo M. Ronchi <pmronchi@yahoo.com.ar> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-03-26units.7: tfixJakub Wilk1-10/+10
Escape hyphens. Signed-off-by: Jakub Wilk <jwilk@jwilk.net> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-03-14vsock.7: srcfix: semantic newlinesMichael Kerrisk1-1/+3
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-03-14vsock.7: Minor tweaks to Stefano Garzarella's patchMichael Kerrisk1-2/+2
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-03-14vsock.7: Add VMADDR_CID_LOCAL descriptionStefano Garzarella1-2/+16
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-12socket.7: tfixJakub Wilk1-1/+1
Signed-off-by: Jakub Wilk <jwilk@jwilk.net> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-28socket.7: Add more details on SO_SELECT_ERR_QUEUEMichael Kerrisk1-15/+29
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-28socket.7: srcfixMichael Kerrisk1-2/+2
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-28socket.7: Add description of SO_SELECT_ERR_QUEUERicardo Biehl Pasquali1-4/+22
Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-25sysvipc.7: Rewrite this page as just a summary of the sysvipc APIsMichael Kerrisk1-279/+47
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-24man7/namespaces.7: srcfix: Make the number of .RS/.RE macros equalBjarni Ingi Gislason1-0/+1
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-23cgroups.7: Update list of cgroups v2 controllersMichael Kerrisk1-0/+27
Update the list of cgroups v2 controllers (several controllers were missing). Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-23cgroups.7: Put list of v2 controllers in alphabetical orderMichael Kerrisk1-17/+17
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-23cgroups.7: Document the cgroups v2 'memory_localevents' mount optionMichael Kerrisk1-0/+21
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-23cgroups.7: Add a subsection on cgroup v2 mount options and include 'nsdelegate'Michael Kerrisk1-0/+9
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-23cgroups.7: SEE ALSO: add Documentation/admin-guide/cgroup-v2.rstMichael Kerrisk1-0/+3
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-23getent.1, localedef.1, clock_nanosleep.2, fcntl.2, getitimer.2, ↵Michael Kerrisk7-14/+14
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-23epoll.7: ffixMichael Kerrisk1-6/+2
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-23epoll.7: ffixMichael Kerrisk1-5/+5
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-23epoll.7: wfix: break a sentence up, for clarityMichael Kerrisk1-1/+2
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-09_exit.2, capget.2, fcntl.2, futex.2, listen.2, memfd_create.2, modify_ldt.2, ↵Michael Kerrisk7-7/+7
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-07tcp.7: tcp_low_latency is ignored since Linux 4.14Michael Kerrisk1-1/+5
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-02-05unix.7: The PID sent with SCM_CREDENTIALS must match an existing processMichael Kerrisk1-1/+7
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-01-21inotify.7: Merge late perror() into fprintf()Nick Shipp1-2/+2
fprintf() may have overridden errno before perror() could print it in this example. Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-01-21keyrings.7: ffixJakub Wilk1-1/+1
Signed-off-by: Jakub Wilk <jwilk@jwilk.net> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-01-21epoll.7: wfixMichael Kerrisk1-1/+1
Reported-by: John Jones <jmjatlanta@gmail.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-01-21uts_namespaces.7: wfixMichael Kerrisk1-1/+1
Reported-by: Sam Varshavchik <mrsam@courier-mta.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-01-21ipc_namespaces.7: wfixMichael Kerrisk1-1/+1
Reported-by: Sam Varshavchik <mrsam@courier-mta.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-01-21fanotify.7: srcfixMichael Kerrisk1-2/+0
Reported-by: Sam Varshavchik <mrsam@courier-mta.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-01-06sched.7: tfixMichael Kerrisk1-1/+1
Reported-by: Will <cassis@tricolore.lu> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-12-30netlink.7: Fix alignment issue in exampleAntonin Décimo1-2/+3
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-30rtnetlink.7: ifa_index is an unsigned intAntonin Décimo1-1/+1
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-30capabilities.7: Minor clarification of historical behaviorMichael Kerrisk1-1/+3
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-12-30capabilities.7: wfixMichael Kerrisk1-3/+7
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-12-12packet.7: Add comment noting when 'tp_vlan_tpid' field appearedMichael Kerrisk1-1/+3
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-12-12packet.7: Add missing tpacket_auxdata field (tp_vlan_tpid)kevin sztern1-1/+1
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-12inotify.7: wfixBrennan Vincent1-1/+1
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-29cgroups.7: Improve the discussion of the advantages of v2 release notificationMichael Kerrisk1-7/+11
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-29cgroups.7: Describe the cgroup.events "frozen" keyMichael Kerrisk1-0/+6
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-29cgroups.7: Split discussion of cgroups.events file and v2 release notificationMichael Kerrisk1-29/+47
In preparation for adding a description of the "frozen" key. Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-29cgroups.7: The v2 freezer controller was added in Linux 5.2Michael Kerrisk1-0/+6
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-21vsock.7: Show size of svm_zero field in sockaddr_vm structureMichael Kerrisk1-1/+5
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-21vsock.7: Minor tweaks to Mikhail Golubev's patchMichael Kerrisk1-1/+1
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-21vsock.7: Add missing structure elementMikhail Golubev1-0/+3
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-19Removed trailing white space at end of linesMichael Kerrisk1-5/+5
2019-11-19bpf-helpers.7: tfixMichael Kerrisk1-1/+1
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-19clone.2, fallocate.2, ioctl_iflags.2, ioctl_list.2, pidfd_open.2, ↵Michael Kerrisk3-3/+3
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-19bpf-helpers.7: Fix .TH lineMichael Kerrisk1-1/+1
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-19bpf-helpers.7: srcfixMichael Kerrisk1-29/+0
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-19bpf-helpers.7: Refresh against kernel v5.4-rc7Michael Kerrisk1-125/+626
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-09uts_namespaces.7: Add a little more detail on scope of UTS namespacesMichael Kerrisk1-0/+3
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-05signal-safety.7: ffixMichael Kerrisk1-0/+1
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-11-05netdevice.7: Small wording fix in description of SIOCGIFCONFMichael Kerrisk1-1/+1
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-10-31netlink.7: tfixJakub Wilk1-1/+1
Signed-off-by: Jakub Wilk <jwilk@jwilk.net> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-10-31unix.7: tfixTorin Carey1-1/+1
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-31unix.7: tfixTorin Carey1-1/+1
Signed-off-by: Torin Carey <torin@tcarey.uk> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-10-28cgroups.7: Switch to "considerate language"Michael Kerrisk1-1/+1
Thanks-to: https://twitter.com/expensivestevie Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-10-11mount_namespaces.7: tfixJakub Wilk1-1/+1
Remove duplicated word. Signed-off-by: Jakub Wilk <jwilk@jwilk.net> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-10-11localedef.1, close.2, copy_file_range.2, execve.2, get_robust_list.2, ↵Michael Kerrisk6-6/+6
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-10signal.7: SEE ALSO: add pidfd_send_signal(2)Michael Kerrisk1-0/+1
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-10-09namespaces.7: Include manual page references in the summary table of ↵Michael Kerrisk1-58/+36
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-09mount_namespaces.7: tfixMichael Kerrisk1-1/+1
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-10-08mount_namespaces.7: Tweak discussion of "less privileged" mount namespaceMichael Kerrisk1-4/+5
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-08mount_namespaces.7: Explain how a namespace's mount point list is initializedMichael Kerrisk1-4/+15
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-08mount_namespaces.7: tfixMichael Kerrisk1-1/+1
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-10-08mount_namespaces.7: Clarify description of "less privileged" mount namespacesMichael Kerrisk1-4/+7
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-07mount_namespaces.7: It may be desirable to disable propagation after ↵Michael Kerrisk1-0/+20
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-05pthreads.7: Minor tweaks to Carlos O'Donell's patchMichael Kerrisk2-2/+1
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-10-05pthread_setcancelstate.3, pthreads.7: srcfix: wrap source lines at sentence ↵Michael Kerrisk1-2/+4
boundaries Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-10-05pthread_setcancelstate.3, pthreads.7, signal-safety.7: Describe issues with ↵Carlos O'Donell2-0/+14
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-09-27sched_setparam.2, pthread_mutexattr_init.3, pthread_mutexattr_setrobust.3, ↵Michael Kerrisk2-2/+2
pthread_mutex_consistent.3, strtol.3, sched.7, uts_namespaces.7: SEE ALSO: correct list order Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-09-27veth.4, persistent-keyring.7, process-keyring.7, session-keyring.7, ↵Michael Kerrisk6-6/+6
thread-keyring.7, user-keyring.7, user-session-keyring.7: srcfix Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-09-23mount_namespaces.7: SEE ALSO: refer to example in pivot_root(2)Michael Kerrisk1-0/+3
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-09-22operator.7: Prefix and postfix ++/-- have different precedencesMichael Kerrisk1-5/+16
Harbison and Steele also agree on this. Reported-by: Rick Stanley <rstanley@rsiny.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-09-13man-pages.7: Relocate and enhance the text on semantic newlinesMichael Kerrisk1-4/+10
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-09-13man-pages.7: Paragraphs should not be separated by blank linesMichael Kerrisk1-0/+9
Reported-by: Paul Wise <pabs3@bonedaddy.net> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-09-10fanotify.7: tfixJakub Wilk1-13/+13
Signed-off-by: Jakub Wilk <jwilk@jwilk.net> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-08-28signal.7: tfixMichael Kerrisk1-1/+1
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-08-26cgroups.7: tfixEric Biggers1-1/+1
Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-08-26capabilities.7: tfixMarko Myllynen1-1/+1
Hi Michael, it's been a while but few simple patches today.. Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-08-26user_namespaces.7: tfixMarko Myllynen1-1/+1
This and the previous were the only ones grep found. Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-08-26uts_namespaces.7: SEE ALSO: add gethostname(2), getdomainname(2), uname(2)Michael Kerrisk1-0/+3
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-08-26namespaces.7: Remove content migrated to uts_namespaces(7)Michael Kerrisk1-25/+3
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-08-26uts_namespaces.7: New page with content migrated from namespaces(7)Michael Kerrisk1-0/+61
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-08-26mq_overview.7: wfixMichael Kerrisk1-1/+1
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-08-26mq_overview.7, sysvipc.7: Adjust references to namespaces(7) to ↵Michael Kerrisk2-3/+3
ipc_namespaces(7) Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-08-26namespaces.7: Remove content migrated to new ipc_namespaces(7) pageMichael Kerrisk1-48/+3
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-08-26ipc_namespaces.7: New page with content migrated from namespaces(7)Michael Kerrisk1-0/+86
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-08-26signal.7: Enhance the text on process-directed and thread-directed signalsMichael Kerrisk1-11/+22
clone(2) has a good description of these concepts; borrow from it liberally. Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-08-26signal.7: tfixMichael Kerrisk1-1/+1
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-08-20user_namespaces.7: Improve explanation of meaning of ownership of nonuser ↵Michael Kerrisk1-2/+3
namespaces Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-08-02capabilities.7: CAP_SYS_ADMIN allows modifying autogroup nice valuesMichael Kerrisk1-0/+5
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-08-02pldd.1, bpf.2, chdir.2, clone.2, fanotify_init.2, fanotify_mark.2, intro.2, ↵Michael Kerrisk13-13/+13
ipc.2, mount.2, mprotect.2, msgctl.2, msgget.2, msgop.2, pivot_root.2, pkey_alloc.2, poll.2, prctl.2, semctl.2, semget.2, semop.2, setxattr.2, shmctl.2, shmget.2, shmop.2, tkill.2, dlopen.3, exec.3, ftok.3, getutent.3, on_exit.3, strcat.3, cpuid.4, proc.5, capabilities.7, cgroup_namespaces.7, credentials.7, fanotify.7, mount_namespaces.7, namespaces.7, sched.7, signal.7, socket.7, unix.7, user_namespaces.7, vdso.7, xattr.7, ld.so.8: tstamp Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-07-30mount_namespaces.7: ffixMichael Kerrisk1-5/+25
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-07-30sched.7: SEE ALSO: add pthread_getschedparam(3)Michael Kerrisk1-0/+1
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-07-28capabilities.7: Add pivot_root(2) to CAP_SYS_ADMIN listMichael Kerrisk1-0/+1
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-07-24mount_namespaces.7: Clarify implications for other NS if mount point is ↵Michael Kerrisk1-2/+11
removed in one NS If a mount point is deleted or renamed or removed in one mount namespace, this will cause an object that is mounted at that location in another mount namespace to be unmounted (as verified by experiment). This was implied by the existing text, but it is better to make this detail explicit. Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-07-23namespaces.7: srcfixMichael Kerrisk1-1/+1
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-07-22mount_namespaces.7: SEE ALSO: add pivot_root(2), pivot_root(8)Michael Kerrisk1-1/+3
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-07-20namespaces.7: Note initial values of hostname and domainname in a new UTS ↵Michael Kerrisk1-0/+10
namespace Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-07-17capabilities.7: Add a note about using strace on binaries that have capabilitiesMichael Kerrisk1-0/+14
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-07-13signal.7: Minor text reworkMichael Kerrisk1-2/+3
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-07-13signal.7: Some reworking of Michal Sekletar's textMichael Kerrisk1-4/+7
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-07-13signal.7: Relocate Michal Sekletar's textMichael Kerrisk1-5/+5
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-07-13signal.7: Clarify that siginfo_t isn't changed on coalescingMichal Sekletar1-0/+5
Confirmed by experiment by mtk: $ cat siginfo_nonqueuing.c } while (0) static void grimReaper(int sig, siginfo_t *si, void *ucontext) { printf("caught signal %d\n", sig); printf(" si_pid=%ld, si_uid=%ld, si_status=%d\n", (long) si->si_pid, (long) si->si_uid, si->si_status); } static void child(int sleepTime, uid_t uid, int status) { switch (fork()) { case -1: errExit("fork"); case 0: sleep(sleepTime); if (geteuid() == 0) setuid(uid); printf("Child %ld with UID %ld exiting with status %d\n", (long) getpid(),(long) getuid(), status); exit(status); default: return; } } int main(int argc, char *argv[]) { struct sigaction sa; sigset_t blocking; sa.sa_sigaction = grimReaper; sa.sa_flags = SA_SIGINFO; sigemptyset(&sa.sa_mask); if (sigaction(SIGCHLD, &sa, NULL) == -1) errExit("sigaction"); sigemptyset(&blocking); sigaddset(&blocking, SIGCHLD); if (sigprocmask(SIG_BLOCK, &blocking, NULL) == -1) errExit("sigprocmask"); child(2, 20000, 20); child(3, 30000, 30); child(1, 10000, 10); sleep(5); if (sigprocmask(SIG_UNBLOCK, &blocking, NULL) == -1) errExit("sigprocmask"); exit(EXIT_SUCCESS); } $ ./siginfo_nonqueuing Child 4042 with UID 1000 exiting with status 10 Child 4040 with UID 1000 exiting with status 20 Child 4041 with UID 1000 exiting with status 30 caught signal 17 si_pid=4042, si_uid=1000, si_status=10 Cc: Oleg Nesterov <oleg@redhat.com> Cc: Lennart Poettering <lennart@poettering.net> Acked-by: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Michal Sekletar <msekleta@redhat.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-07-13signal.7: Add subsection on queuing and delivery semantics for standard signalsMichael Kerrisk1-0/+10
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-07-10credentials.7: Note that /proc/PID/status shows a process's credentialsMichael Kerrisk1-0/+7
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-07-10signal.7: Various fields in /proc/PID/status show signal-related informationMichael Kerrisk1-0/+23
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-07-02user_namespaces.7: Minor rewordings of recently added textMichael Kerrisk1-2/+3
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-07-02user_namespaces.7: Minor wording fix to recently added textMichael Kerrisk1-2/+2
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-07-01user_namespaces.7: Describe the effect of file-related capabilities inside ↵Michael Kerrisk1-0/+36
use namespaces Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-07-01user_namespaces.7: Describe how kernel treats UIDs/GIDs when a process ↵Michael Kerrisk1-0/+11
access to files Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-07-01capabilities.7: CAP_FOWNER also allows modifying user xattrs on sticky ↵Michael Kerrisk1-0/+4
directories See fs/xattr.c::xattr_permission()" /* * In the user.* namespace, only regular files and directories can have * extended attributes. For sticky directories, only the owner and * privileged users can write attributes. */ if (!strncmp(name, XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN)) { if (!S_ISREG(inode->i_mode) && !S_ISDIR(inode->i_mode)) return (mask & MAY_WRITE) ? -EPERM : -ENODATA; if (S_ISDIR(inode->i_mode) && (inode->i_mode & S_ISVTX) && (mask & MAY_WRITE) && !inode_owner_or_capable(inode)) return -EPERM; } Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-07-01xattr.7: s/extended system attributes/system extended attributes/Michael Kerrisk1-2/+2
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-07-01xattr.7: wfix: s/extended user attributes/user extended attributes/Michael Kerrisk1-5/+5
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-06-29unix.7: Note SCM_RIGHTS interaction with RLIMIT_NOFILEMichael Kerrisk1-0/+8
If the file descriptors received in SCM_RIGHTS would cause the process to its exceed RLIMIT_NOFILE limit, the excess FDs are discarded. Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-06-25svipc.7: Add old name of sysvipc(7) page as a linkMichael Kerrisk1-0/+1
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-06-25clone.2, intro.2, ipc.2, msgctl.2, msgget.2, msgop.2, semctl.2, semget.2, ↵Michael Kerrisk1-1/+1
semop.2, shmctl.2, shmget.2, shmop.2, ftok.3, proc.5, namespaces.7: Change reference to svipc(7) to sysvipc(7) Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-06-25sysvipc.7: Minor fixes for page renamingMichael Kerrisk1-2/+2
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-06-25sysvipc.7: Rename svipc.7 to sysvipc.7Michael Kerrisk1-0/+0
The name sysvipc is a bit more natural, and is the name used in /proc/sysvipc. Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-06-24pid_namespaces.7: tfixMichael Kerrisk1-1/+1
Reported-by: Guillaume Laporte <guillaume.laporte.adm@gmail.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-06-18credentials.7: SEE ALSO: add tcgetsid(3)Michael Kerrisk1-0/+1
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-06-13vdso.7: Mention removal of Blackfin portTobias Klauser1-1/+1
The Blackfin port was removed in Linux 4.17. Mention this in the section concerning Blackfin vDSO functions. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-06-12fanotify.7: wfixMichael Kerrisk1-1/+1
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-06-12fanotify.7: Reword FAN_REPORT_FID data structure inclusion semanticsMatthew Bobrowski1-4/+4
Improved the readability of a sentence that describes the use of FAN_REPORT_FID and how this particular flag influences what data structures a listening application could expect to receive when describing an event. Signed-off-by: Matthew Bobrowski <mbobrowski@mbobrowski.org> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-06-12vdso.7: Document vDSO for RISCVTobias Klauser1-0/+22
Document the symbols exported by the RISCV vDSO which is present from kernel 4.15 onwards. See kernel source files in arch/riscv/kernel/vdso. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Reviewed-by: Palmer Dabbelt <palmer@sifive.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-06-10fanotify.7: Minor fixes after feedback from Matthew BobrowskiMichael Kerrisk1-5/+5
Reported-by: Matthew Bobrowski <mbobrowski@mbobrowski.org> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-06-08fanotify.7: Reorder text in EXAMPLEMichael Kerrisk1-65/+69
Group each example shell session together with each example program. Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-06-08fanotify.7: ffix: boldface user commands in shell sessionsMichael Kerrisk1-5/+5
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-06-08fanotify.7: tfixMichael Kerrisk1-1/+1
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-06-08fanotify.7: Reformat program output to fit in 80 columnsMichael Kerrisk1-5/+7
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-06-08fanotify.7: Clarify logic in ESTALE checkMichael Kerrisk1-7/+9
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-06-08fanotify.7: Minor code consistency clean-upsMichael Kerrisk1-4/+6
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-06-08fanotify.7: tfixMichael Kerrisk1-1/+1
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-06-08fanotify.7: Minor code typesetting fix-upsMichael Kerrisk1-21/+22
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-06-08fanotify.7: Minor fix: format comments consistentlyMichael Kerrisk1-9/+14
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-06-08fanotify.7: tfixMichael Kerrisk1-1/+1
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-06-08fanotify_init.2, fanotify_mark.2, fanotify.7: Minor tweak: ↵Michael Kerrisk1-1/+2
s/object/filesystem object/ Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>