Commit Graph

37 Commits

Author SHA1 Message Date
Michael Kerrisk 3fde8c2e45 memusage.1, pldd.1, sprof.1, add_key.2, bind.2, bpf.2, clone.2, dup.2, epoll_ctl.2, eventfd.2, fanotify_init.2, fanotify_mark.2, futex.2, getdents.2, getpid.2, getrlimit.2, intro.2, ioctl_fat.2, ioctl_ns.2, kcmp.2, keyctl.2, membarrier.2, memfd_create.2, mprotect.2, msgctl.2, msgop.2, nfsservctl.2, open.2, open_by_handle_at.2, openat2.2, outb.2, perf_event_open.2, pivot_root.2, recv.2, recvmmsg.2, request_key.2, sched_setaffinity.2, sched_setattr.2, seccomp.2, select.2, send.2, signalfd.2, spu_run.2, sysctl.2, timer_create.2, userfaultfd.2, wait.2, CPU_SET.3, abs.3, argz_add.3, backtrace.3, bsearch.3, bswap.3, clock_getcpuclockid.3, cmsg.3, dl_iterate_phdr.3, dlinfo.3, dlopen.3, drand48.3, drand48_r.3, duplocale.3, encrypt.3, endian.3, envz_add.3, errno.3, ffs.3, fopencookie.3, get_phys_pages.3, getaddrinfo.3, getaddrinfo_a.3, getdate.3, getgrent_r.3, getgrouplist.3, getifaddrs.3, getline.3, getprotoent_r.3, getpwent_r.3, getpwnam.3, getservent_r.3, hsearch.3, insque.3, intro.3, lrint.3, lround.3, lseek64.3, mallinfo.3, malloc_hook.3, malloc_info.3, mbsinit.3, mbstowcs.3, mtrace.3, newlocale.3, ntp_gettime.3, offsetof.3, perror.3, posix_fallocate.3, posix_spawn.3, printf.3, psignal.3, pthread_attr_init.3, pthread_create.3, pthread_getattr_np.3, pthread_getcpuclockid.3, pthread_setaffinity_np.3, pthread_setname_np.3, pthread_sigmask.3, qsort.3, rand.3, random.3, rpc.3, rtnetlink.3, scalbln.3, shm_open.3, stdarg.3, strcat.3, strerror.3, strfmon.3, strptime.3, strsignal.3, strtod.3, strtok.3, strtol.3, strtoul.3, tsearch.3, wordexp.3, loop.4, vcs.4, veth.4, core.5, locale.5, slabinfo.5, cgroup_namespaces.7, cpuset.7, credentials.7, fanotify.7, feature_test_macros.7, inotify.7, ip.7, kernel_lockdown.7, man.7, mount_namespaces.7, namespaces.7, pid_namespaces.7, rtld-audit.7, sigevent.7, sock_diag.7, standards.7, unix.7, user_namespaces.7: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-11-01 21:56:08 +01:00
Alejandro Colomar 23a74bd771 openat.2: SYNOPSIS: return long
The Linux kernel uses long as the return type for this syscall.
As glibc provides no wrapper, use the same type the kernel uses.

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-11-01 19:04:11 +01:00
Michael Kerrisk 11fd5e7c2a membarrier.2, openat2.2, insque.3, proc.5, tzfile.5, hier.7: Minor grammar fix
Don't hyphenate after adjective ending in "ly". See, for example:
https://www.dragoman.ist/compound-modifiers-with-words-ending-in-ly/
https://www.merriam-webster.com/words-at-play/6-common-hypercorrections-and-how-to-avoid-them/between-you-and-i

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-25 13:12:57 +01:00
Alejandro Colomar 6280809fb8 openat2.2, loop.4: tfix: s/non-zero/nonzero/
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-10-22 23:06:02 +02:00
Aleksa Sarai bbed82c069 openat2.2: tfix: fix minor reference typo
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-09-30 21:45:57 +02:00
Michael Kerrisk 0e0984fc38 openat2.2: ffix
Reported-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-06-12 21:54:55 +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 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 2932c4aa7e openat2.2: A few more fixes after feedback from Aleksa Sarai
Reported-by: Aleksa Sarai <cyphar@cyphar.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-14 22:07:39 +02:00
Michael Kerrisk d31cdf430e openat2.2: Various changes after feedback from Aleksa Sarai
Reported-by: Aleksa Sarai <cyphar@cyphar.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-13 09:21:20 +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 372b58573a openat2.2: srcfix: remove a FIXME
Aleksa Sarai is okay with my text changes.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-01 08:36:49 +02:00
Michael Kerrisk 08ba10a6d5 openat2.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-01 08:18:45 +02:00
Michael Kerrisk b4e1568256 openat2.2: Improve text describing caveat for use of RESOLVE_NO_XDEV
From email discussions with Aleksa Sarai:

> .\" FIXME I find the "previously-functional systems" in the previous
> .\" sentence a little odd (since openat2() ia new sysycall), so I would
> .\" like to clarify a little...
> .\" Are you referring to the scenario where someone might take an
> .\" existing application that uses openat() and replaces the uses
> .\" of openat() with openat2()? In which case, is it correct to
> .\" understand that you mean that one should not just indiscriminately
> .\" add the RESOLVE_NO_XDEV flag to all of the openat2() calls?
> .\" If I'm not on the right track, could you point me in the right
> .\" direction please.

This is mostly meant as a warning to hopefully avoid applications
because the developer didn't realise that system paths may contain
symlinks or bind-mounts. For an application which has switched to
openat2() and then uses RESOLVE_NO_SYMLINKS for a non-security reason,
it's possible that on some distributions (or future versions of a
distribution) that their application will stop working because a system
path suddenly contains a symlink or is a bind-mount.

This was a concern which was brought up on LWN some time ago. If you can
think of a phrasing that makes this more clear, I'd appreciate it.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-01 08:16:40 +02:00
Michael Kerrisk c85ebb3c94 openat2.2: Various tweaks to the dicussion of 'resolve' flags
Some tweaks inspired by https://lwn.net/Articles/796868/

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-03-31 09:50:48 +02:00
Michael Kerrisk e31d5bfd36 openat2.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-03-31 09:11:20 +02:00
Michael Kerrisk 193f7fb272 openat2.2: Place 'resolve' flags in alphabetical order
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-03-31 09:10:05 +02:00
Michael Kerrisk 1f4cf8e85e openat2.2: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-03-30 22:41:25 +02:00
Michael Kerrisk 7a18f60e4d openat2.2: Minor tweaks to the text
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-03-30 22:26:50 +02:00
Michael Kerrisk 552f379960 openat2.2: Further tweaks to the RESOLVE_IN_ROOT text
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-03-30 21:52:32 +02:00
Michael Kerrisk 9e0168b018 openat2.2: Minor tweaks to RESOLVE_IN_ROOT text
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-03-30 21:41:47 +02:00
Michael Kerrisk 75cd77e3c1 openat2.2: Minor change: reword a sentence
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-03-30 21:20:41 +02:00
Michael Kerrisk 39bfd04683 openat2.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-03-30 21:17:52 +02:00
Michael Kerrisk a424f7c064 openat2.2: srcfix: Disfavor multiargument .BR and .IR usage
For me, source lines such as:

    .BR perf_setattr "(2), " perf_event_open "(2), and " clone3 (2).

is harder to read than:

    .BR perf_setattr (2),
    .BR perf_event_open (2),
    and
    .BR clone3 (2).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-03-30 14:52:47 +02:00
Michael Kerrisk d144dc36b8 openat2.2: Rework RESOLVE_IN_ROOT text
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-03-30 14:52:44 +02:00
Michael Kerrisk 36c9d56de6 openat2.2: Reorganize and rework introductory text a little
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-03-30 14:52:40 +02:00
Michael Kerrisk 6c6945d461 openat2.2: Remove one of the forward references to the "Extensibility" subsection
There are currently three of these forward references (two in
DESCRIPTION, one in ERRORS). This is a little redundant.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-03-30 14:44:59 +02:00
Michael Kerrisk 4ec6d407a9 openat2.2: Various wording improvements to Aleksa Sarai's text
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-03-30 14:44:59 +02:00
Michael Kerrisk 7b7aad695b openat2.2: wfix: explicitly qualify fields of 'how' argument with "how."
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-03-30 12:32:07 +02:00
Michael Kerrisk 3fcaeb806a openat2.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-03-30 12:32:07 +02:00
Michael Kerrisk 03625dc12d openat2.2: Place ERRORS in alphabetical order
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-03-30 12:32:07 +02:00
Michael Kerrisk 0105739e8b openat2.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-03-30 10:20:06 +02:00
Michael Kerrisk 0389373e6e openat2.2: ffix (mainly: replace blank lines by .IP or .PP)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-03-30 10:19:20 +02:00
Michael Kerrisk 669403e99e openat2.2: spfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-03-30 10:19:20 +02:00
Michael Kerrisk 2d82152f53 openat2.2: srcfix: eliminate redundant blank lines
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-03-30 10:19:20 +02:00
Michael Kerrisk 2359744f97 openat2.2: srcfix: semantic newlines and rewrap some long source lines
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-03-30 10:19:20 +02:00
Aleksa Sarai 89de505522 openat2.2: Document new openat2(2) syscall
Rather than trying to merge the new syscall documentation into
open.2 (which would probably result in the man-page being
incomprehensible), instead the new syscall gets its own dedicated
page with links between open(2) and openat2(2) to avoid
duplicating information such as the list of O_* flags or common
errors.

In addition to describing all of the key flags, information about
the extensibility design is provided so that users can better
understand why they need to pass sizeof(struct open_how) and how
their programs will work across kernels. After some discussions
with David Laight, I also included explicit instructions to zero
the structure to avoid issues when recompiling with new headers.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-03-30 08:34:45 +02:00