Commit Graph

21060 Commits

Author SHA1 Message Date
Michael Kerrisk ec4acd91e8 Ready for 5.07 2020-06-09 14:45:54 +02:00
Michael Kerrisk 9fa55db0af Changes: whitespace cleanups 2020-06-09 14:45:44 +02:00
Michael Kerrisk 144a1d6c8c 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:43:54 +02:00
Michael Kerrisk 8e454c19e2 Changes: Ready for 5.07
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-06-09 14:42:10 +02:00
Michael Kerrisk 7289930f20 prctl.2: Fixes to Dave Martin's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-06-09 13:33:23 +02:00
Dave Martin 8165500d4c prctl.2: Add PR_PAC_RESET_KEYS (arm64)
Add documentation for the PR_PAC_RESET_KEYS ioctl added in Linux
5.0 for arm64.

Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Amit Daniel Kachhap <amit.kachhap@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-06-09 13:30:57 +02:00
Michael Kerrisk c3a523e07d prctl.2: Add reference to proc(5) for /proc/self/task/[tid]/comm
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-06-09 12:39:17 +02:00
Michael Kerrisk b65e24c34a proc.5: Add a detail to /proc/[pid]/comm
Note the connection to the "%e" specifier in
/proc/sys/kernel/core_pattern.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-06-09 12:39:17 +02:00
Michael Kerrisk b463b03fd5 proc.5: TASK_COMM_LEN limit includes the terminating '\0'
Clarify this detail in the discussion of /proc/[pid]/comm.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-06-09 12:39:17 +02:00
Michael Kerrisk 6a7093c3f3 core.5: minor tweaks
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-06-09 12:39:17 +02:00
Michael Kerrisk 8d85a961ac core.5: Explain that core_pattern %e is process/thread 'comm' value
The 'comm' value is typically the same as the (possibly
truncated) executable name, but may be something different.

Reported-by: Jonny Grant <jg@jguk.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-06-09 12:08:39 +02:00
Michael Kerrisk 492a8b724f connect.2: Minor tweaks to Stefan Puiu's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-06-09 10:17:34 +02:00
Stefan Puiu 375c65a9c2 connect.2: Can return EACCES because of SELinux
Recently I had to troubleshoot a problem where a connect() call
was returning EACCES:

17648 socket(AF_INET, SOCK_STREAM, IPPROTO_IP) = 37
17648 connect(37, {sa_family=AF_INET, sin_port=htons(8081),
sin_addr=inet_addr("10.12.1.201")}, 16) = -1 EACCES (Permission
denied)

I've traced this to SELinux policy denying the connection. This is
on a Fedora 23 VM:

$ cat /etc/redhat-release
Fedora release 23 (Twenty Three)
$ uname -a
Linux mako-fedora-01 4.8.13-100.fc23.x86_64 #1 SMP Fri Dec 9 14:51:40
UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

The manpage says this can happen when connecting to a broadcast
address, or when a local firewall rule blocks the connection.
However, the address above is unicast, and using 'wget' from
another account to access the URL works fine.

The context is that we're building an OS image, and this involves
downloading RPMs through a proxy. The proxy (polipo) is labelled
by SELinux, and I guess there is some sort of policy that says
"proxy can only connect to HTTP ports". When trying to connect to
a server listening on a port that is not labeled as an HTTP server
port, I guess SELinux steps in. With 'setenforce 0', the build
works fine. In the kernel sources I see connect() calls
security_socket_connect() (see
https://elixir.bootlin.com/linux/latest/source/net/socket.c#L1855),
which calls whatever security hooks are registered. I see the
SELinux hook getting registered at
https://elixir.bootlin.com/linux/latest/source/security/selinux/hooks.c#L7047,
and setting a perf probe on the call proves that the
selinux_socket_connect function gets called (while
tcp_v4_connect() is not).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-06-09 10:09:55 +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
Michael Kerrisk 599e0cef94 ioctl.2: Remove mentions of ioctl_list(2)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-06-09 09:40:08 +02:00
Michael Kerrisk 3de87d4684 ioctl_list.2: Remove this page
This page was first added more than 20 years ago. Since
that time it has seen hardly any update, and is by now
very much out of date, as reported by Heinrich Schuchardt
and confirmed by Eugene Syromyatnikov.

As Heinrich says:

    Man-pages like netdevices.7 or ioctl_fat.2 are what is
    needed to help a user who does not want to read through the
    kernel code.

    If ioctl_list.2 has not been reasonably maintained since
    Linux 1.3.27 and hence is not a reliable source of
    information, shouldn't it be dropped?

My answer is, yes (but let's move a little info into ioctl(2)).

Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reported-by: Eugene Syromyatnikov <evgsyr@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-06-09 09:40:08 +02:00
Michael Kerrisk 91b00e53b3 ioctl.2: Move subsection on "ioctl structure" from ioctl_list(2) to ioctl(2)
In preparation for removing ioctl_list(2), let's preserve
some useful text that was added to ioctl_list(2)
by Andries Brouwer.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-06-09 09:40:08 +02:00
Michael Kerrisk 02e701cde3 syscall.2: Minor wording tweaks
Reported-by: Jonny Grant <jg@jguk.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-06-08 23:09:36 +02:00
Michael Kerrisk c5f7febc4f random.3: wfix: no need to mention INT32_MAX
Reported-by: walter harms <wharms@bfs.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-06-08 23:09:36 +02:00
John Marshall 2de361c8e9 random.3: Change "RAND_MAX" tp "2^31-1"
RAND_MAX is for rand(3).  POSIX fixes random()'s range at 2^31-1;
RAND_MAX may be smaller on some platforms (even though with glibc
or musl on Linux they are the same).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-06-08 23:09:36 +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 e5a800c135 fanotify_init.2: Move out of place entry FAN_REPORT_FID
It was inserted in the middle of the FAN_CLASS_ multi flags bit
and broke the multi flag documentation.

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:40 +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 2f0e61aec2 core.5: Note that not dumping core of an unreadable binary is a security measure
Reported-by: Jonny Grant <jg@jguk.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-06-08 18:16:53 +02:00
Michael Kerrisk b665474b29 core.5: wfix
Reported-by: Jonny Grant <jg@jguk.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-06-08 18:06:10 +02:00
Jakub Wilk 4ad5b7a575 proc.5: ffix
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-06-08 17:41:12 +02:00
Michael Kerrisk 7ced1a6529 err.3: EXAMPLES: use EXIT_FAILURE rather than 1 as exit status
By way of good example, use the an EXIT_* symbolic constant,
rather than a hard-coded number.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-06-03 22:52:36 +02:00
Michael Kerrisk bd1686486f clock_getres.2, fsync.2, mlock.2, mmap.2, msync.2, INFINITY.3, cexp2.3, clog2.3, flockfile.3: Remove AVAILABILITY section heading
In the few pages where this heading (which is "nonstandard" within
man-pages) is used, it always immediately follows CONFORMING TO
and generally contains information related to standards. Remove
the section heading, thus incorporating AVAILABILITY into
CONFORMING TO.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-31 10:45:27 +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 24581849d9 core.5: tfix
Reported-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-28 11:37:38 +02:00
Michael Kerrisk 8626fdd2de core.5: Mention 'sysctl -w' as a way of changing core_pattern setting
Reported-by: Jonny Grant <jg@jguk.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-28 11:37:32 +02:00
Michael Kerrisk 94c50673e6 core.5: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-28 09:52:09 +02:00
Dave Martin 4f65a89721 prctl.2: ffix: use literal hyphens when referencing kernel docs
There is one case of a cross-reference to a kernel documentation
filename that uses unescaped hyphens.

To avoid misrendering, escape these as \- similarly to other
instances.

Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-28 08:17:50 +02:00
Michael Kerrisk db4d540044 prctl.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-28 08:17:50 +02:00
Dave Martin 734439ca9e prctl.2: Add PR_SPEC_DISABLE_NOEXEC for SPECULATION_CTRL prctls
Add the PR_SPEC_DISABLE_NOEXEC mode added in Linux 5.1
for the PR_SPEC_STORE_BYPASS "misfeature" of
PR_SET_SPECULATION_CTRL and PR_GET_SPECULATION_CTRL.

Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Cc: Waiman Long <longman@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-28 08:17:50 +02:00
Michael Kerrisk 68b4922bf5 prctl.2: Minor tweaks to "prctl.2: Add PR_SPEC_INDIRECT_BRANCH for SPECULATION_CTRL prctls" patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-28 08:17:50 +02:00
Dave Martin 277d7d6d04 prctl.2: Add PR_SPEC_INDIRECT_BRANCH for SPECULATION_CTRL prctls
Add the PR_SPEC_INDIRECT_BRANCH "misfeature" added in Linux 4.20
for PR_SET_SPECULATION_CTRL and PR_GET_SPECULATION_CTRL.

Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Cc: Tim Chen <tim.c.chen@linux.intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-28 08:17:50 +02:00
Michael Kerrisk 7ef5957484 core.5: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-27 15:26:45 +02:00
Michael Kerrisk 259ce44eeb ctime.3: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-26 13:25:54 +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 b710e16161 close.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-26 13:25:54 +02:00
Michael Kerrisk e50b1125e1 tzset.3: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-26 13:25:54 +02:00
Michael Kerrisk fcf486714c getnameinfo.3: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-26 13:25:54 +02:00
Michael Kerrisk 3e4c47dde2 dlopen.3: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-26 13:25:54 +02:00