Commit Graph

7092 Commits

Author SHA1 Message Date
NeilBrown 97a45d02e6 open.2: Improve O_PATH documentation
- fstatfs is now permitted.
- ioctl isn't, and is worth listing explicitly
- O_PATH allows an automount point to be opened with
  triggering the mount.

All tested

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-12 22:11:18 +02:00
Michael Kerrisk 2f2ab7445f umount.2: Minor tweaks to NeilBrown's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-12 22:06:32 +02:00
Michael Kerrisk 76218efa25 umount.2: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-12 22:04:19 +02:00
NeilBrown 23779c0533 umount.2: Restore mention of data loss with MNT_FORCE
Recent patch to description of MNT_FORCE incorrectly
dropped the mention of possible data loss.  Restore it.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-12 22:00:49 +02:00
NeilBrown 7045e43809 umount.2: Revise MNT_FORCE description
MNT_FORCE does not allow a busy filesystem to be unmounted.  Only
MNT_DETACH allows that.  MNT_FORCE only tries to abort pending
transactions, in the hope that might help umount not to block,

Also, other filesystems than NFS support MNT_FORCE.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-12 22:00:37 +02:00
Elliott Hughes 0f86e5b1be set_tid_address.2: Note that there's no glibc wrapper for set_tid_address()
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-12 21:53:47 +02:00
Michael Kerrisk a568844159 select_tut.2: Clarify an ambiguity with respect to select() and EAGAIN
See https://bugzilla.kernel.org/show_bug.cgi?id=196345

Reported-by: Sergey Z. <zhurxx@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-07-22 09:44:17 +02:00
Douglas Caetano dos Santos 8f66cfd74a bpf.2: ffix
'\' must be escaped.

Signed-off-by: Douglas Caetano dos Santos <douglascs@taghos.com.br>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-07-22 09:19:54 +02:00
Michael Kerrisk f55a6d598d Changes, ldd.1, chown.2, epoll_wait.2, get_mempolicy.2, ioctl_getfsmap.2, madvise.2, membarrier.2, mount.2, pipe.2, readv.2, seccomp.2, sigaltstack.2, splice.2, tee.2, timer_create.2, vmsplice.2, acosh.3, asinh.3, atanh.3, bsd_signal.3, dl_iterate_phdr.3, dlsym.3, flockfile.3, fpathconf.3, ftw.3, getaddrinfo.3, getcontext.3, getgrent.3, if_nametoindex.3, malloc.3, nl_langinfo.3, posix_madvise.3, ptsname.3, rand.3, resolver.3, sigpause.3, sigwait.3, strtol.3, sysconf.3, ttyslot.3, unlocked_stdio.3, unlockpt.3, capabilities.7, cgroup_namespaces.7, inode.7, man.7, pipe.7, sigevent.7: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-07-13 14:22:45 +02:00
Michael Kerrisk e0ccee7f67 getpid.2: srcfix: add FIXME
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-07-13 07:45:13 +02:00
Michael Kerrisk abcf3b1db9 clone.2: Update BUGS to reflect fact that PID caching was removed in glibc 2.25
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-07-13 07:45:05 +02:00
Michael Kerrisk 9338d37b76 getpid.2: More tidy-ups in discussion of removal of getpid() PID caching
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-07-13 07:05:28 +02:00
Michael Kerrisk cd065c7aec getpid.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-07-12 21:23:01 +02:00
Michael Kerrisk 995865aa06 getpid.2: Minor tweaks to Carlos's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-07-12 21:22:24 +02:00
Carlos O'Donell 7693d1e5c0 getpid.2: Note that PID caching is removed as of glibc 2.25
Since glibc 2.25 the PID cache is removed.

Rationale given in the release notes:
https://sourceware.org/glibc/wiki/Release/2.25#pid_cache_removal
~~~
3.2.3. Calls to getpid are no longer cached

The PID cache used by glibc has been removed. In certain scenarios
the cache was not 100% reliable and because of that it was deemed
safer to remove the cache than to potentially return a wrong
answer.

Applications performing getpid() calls in a loop will see the
worst case performance degradation as the library call will
perform a system call at each invocation. Such application uses
were known to exist at least in OpenSSL (fork()-based PRNG
invalidation), but supporting the performance of that specific
invalidation mechanism was not judged to have sufficient value
against immediate and long-term benefits of removing the cache.

Functional reasons exist for the PID cache removal including
problems with PID namespaces, interoperability with raw system
calls (BZ#17214, Chrome: Issue 800183004), and improvements to
spawn (BZ#19957). Performance is actually increased in
pthread_create() with the removal of the cache since the
implementation no longer needs to perform an invalidation step.

Applications performing getpid() in a loop that need to do some
level of fork()-based invalidation can instead use
pthread_atfork() to register handlers to handle the invalidation.
There is work-in-progress to make pthread_atfork() available to
applications that do not link against libpthread.so (Provide
pthread_atfork() without libpthread.so).

Other kinds of invalidation are not supported and the glibc
community will actively look at a kernel assisted mechanism for
state management across fork(), vfork(), clone() and other
interfaces which can benefit from such semantics. It is the same
type of solution required for crypto PRNG reset across such API
calls.
~~~

Signed-off-by: Carlos O'Donell <carlos@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-07-12 21:18:06 +02:00
sulit c83ad1ade0 bpf.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-07-05 10:50:08 +02:00
Michael Kerrisk baaf65e88a seccomp.2: Minor tweaks to Mike's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-07-05 10:46:44 +02:00
Mike Frysinger 089761d56d seccomp(2): Expand SECCOMP_RET_KILL documentation
First clarify that the process cannot catch this SIGSYS signal.
While the text currently says that, it's easy (IMO) to read
ambiguously and that it's referring to default behavior (no
handler -> process exits).

Then add details regarding coredump behavior.  Before Linux 4.11,
there was no way to get coredumps from such crashes.  Now we can
at least get crashes from single threaded processes.

Signed-off-by: Mike Frysinger <vapier@chromium.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-07-05 10:41:53 +02:00
Eric Biggers b2210694c0 execve.2: tfix
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-07-05 10:40:29 +02:00
Michael Kerrisk a79107aefe madvise.2: Remove bogus text re POSIX_MADV_NOREUSE
There is a POSIX_FADV_NOREUSE for posix_fadvise(),
but no POSIX_MADV_NOREUSE for any API in POSIX.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-07-05 10:27:38 +02:00
Janne Snabb 3e3c1e2364 getrandom.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-07-05 10:20:04 +02:00
Michael Kerrisk 941d289252 open.2: Note some further advantages of the *at() APIs
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-06-27 08:54:09 +02:00
Michael Kerrisk 4084e9b949 request_key.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-06-25 12:12:49 +02:00
Michael Kerrisk 32f5f04482 readv.2: glibc 2.26 adds library support for preadv2() and pwritev2()
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-06-19 15:35:06 +02:00
Michael Kerrisk 9b601b66a9 readv.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-06-19 15:34:47 +02:00
Michael Kerrisk cef01dbc3a ioctl.2: SEE ALSO: add ioctl_getfsmap(2)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-06-16 11:46:17 +02:00
Michael Kerrisk f17fab191b ioctl_getfsmap.2: ERRORS: order alphabetically
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-06-16 11:46:17 +02:00
Michael Kerrisk 47692d77fb ioctl_getfsmap.2: add VERSIONS section
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-06-16 11:46:17 +02:00
Michael Kerrisk 427245197d ioctl_getfsmap.2: Fix ordering of sections
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-06-16 11:46:17 +02:00
Michael Kerrisk 194721a4cf ioctl_getfsmap.2: Minor fixes to Darrick Wong's page
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-06-16 11:46:16 +02:00
Darrick J. Wong f0efd47a49 ioctl_getfsmap.2: Document the GETFSMAP ioctl
Document the new GETFSMAP ioctl that returns the physical layout of a
(disk-based) filesystem.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-06-16 11:46:16 +02:00
Michael Kerrisk 6a43458b0a wait.2: Note glibc 2.26 changes to feature test macro requirements for waitid()
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-06-16 11:42:45 +02:00
Michael Kerrisk d4afcdb42d chmod.2: Note glibc 2.24 feature test macro requirements changes for fchmod()
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-06-16 11:42:44 +02:00
Michael Kerrisk 7d34a794ee chmod.2: Put fchmod() feature test macro requirements in a more readable format
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-06-16 11:42:44 +02:00
Michael Kerrisk 6470bd2ae2 sigaction.2: Note feature test macro requirements for 'si_code' constants
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-06-16 11:42:36 +02:00
Michael Kerrisk 6210b7e977 sigaction.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-06-16 11:42:36 +02:00
Michael Kerrisk 6b94000d63 sigaction.2: Add a subheading for the description of 'si_code'
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-06-16 11:42:31 +02:00
Michael Kerrisk 8d4b857991 sigaction.2: TRAP_BRANCH and TRAP_HWBKPT are present only on IA64
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-06-16 08:03:30 +02:00
Michael Kerrisk 6c97eb40aa splice.2, tee.2, vmsplice.2: SEE ALSO: add pipe(7)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-06-14 13:23:20 +02:00
Michael Kerrisk d766983819 pipe.2: SEE ALSO: add tee(2) and vmsplice(2)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-06-14 13:21:04 +02:00
Michael Kerrisk be338b52ec splice.2: ERRORS: add EINVAL for case where both descriptors refer to same pipe
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-06-14 12:59:13 +02:00
Michael Kerrisk be050b69a0 splice.2: ERRORS: split EINVAL error cases
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-06-14 12:56:30 +02:00
Michael Kerrisk 94be92bfe7 epoll_wait.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-06-03 20:03:54 +02:00
Michael Kerrisk 11f57f4476 epoll_wait.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-06-03 20:03:04 +02:00
Michael Kerrisk 7e086953f6 syscalls.2: tfix
Reported-by: 石井大貴 <hiroki.ishii@miraclelinux.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-06-03 18:42:22 +02:00
Michael Kerrisk 2d5f2098a4 get_mempolicy.2: SYNOPSIS: fix return type of get_mempolicy()
See https://bugzilla.kernel.org/show_bug.cgi?id=97051

Reported-by: Nadav Har'El <nyh@math.technion.ac.il>
Reported-by: Andi Kleen <andi-bz.firstfloor.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-05-30 05:05:42 +02:00
Michael Kerrisk b758a50ab8 mmap.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-05-26 14:37:23 +02:00
Michael Kerrisk f1008f5f1d ioctl_userfaultfd.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-05-26 14:35:11 +02:00
Michael Kerrisk e710f10c36 sigaltstack.2: Note that specifying SS_ONSTACK in ss.ss_falgs decreases portability
In the Illumos source (which presumably mirrors its Solaris
ancestry), there is this check in the sigaltstack()
implementation:

               if (ss.ss_flags & ~SS_DISABLE)
                        return (set_errno(EINVAL));

And in the FreeBSD source we find similar:

                if ((ss->ss_flags & ~SS_DISABLE) != 0)
                        return (EINVAL);

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-05-23 15:22:33 +02:00
Michael Kerrisk 1f5002208f sigaltstack.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-05-23 15:21:09 +02:00