Commit Graph

5168 Commits

Author SHA1 Message Date
Andreas Gruenbacher 5d817eb475 umask.2, open.2, mknod.2, mkdir.2: Explain what default ACLs do
Explain the effect that default ACLs have (instead of the umask)
in umask.2.  Mention that default ACLs can have an affect in
open.2, mknod.2, and mkdir.2.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-21 14:37:09 +02:00
Michael Kerrisk ed948c28b3 chown.2, execve.2, prctl.2, truncate.2, proc.5, capabilities.7, ld.so.8: Tighter wording: 'mode bit' rather than 'permission bit'
For sticky, set-UID, and set-GID mode bits (as used in POSIX).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-21 14:36:59 +02:00
Michael Kerrisk 7901c9c3cd stat.2: Tighten wording: use 'mode bit' rather than 'permission bit'
According to POSIX, the the 9 UGO*RWX bits are permissions, and
'mode' is used to refer to collectively to those bits plus sticky,
set-UID, and set_GID bits.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-21 14:27:41 +02:00
Andreas Gruenbacher b0c5363f3e stat.2: Improve description of some mode constants
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-21 14:27:29 +02:00
Michael Kerrisk cd358be37a Removed trailing white space at end of lines 2015-04-19 11:21:53 +02:00
Michael Kerrisk c73595c249 getent.1, fallocate.2, getrlimit.2, llseek.2, madvise.2, mount.2, poll.2, posix_fadvise.2, pread.2, stat.2, symlink.2, timer_create.2, timerfd_create.2, unshare.2, acos.3, acosh.3, asin.3, asinh.3, asprintf.3, atan.3, atan2.3, atanh.3, cabs.3, cacos.3, cacosh.3, carg.3, casin.3, casinh.3, catan.3, catanh.3, cbrt.3, ccos.3, ccosh.3, ceil.3, cexp.3, cimag.3, clog.3, conj.3, copysign.3, cos.3, cosh.3, cpow.3, cproj.3, creal.3, csin.3, csinh.3, csqrt.3, ctan.3, ctanh.3, ctime.3, erf.3, erfc.3, exec.3, exp.3, exp2.3, expm1.3, fabs.3, fdim.3, floor.3, fma.3, fmax.3, fmin.3, fmod.3, frexp.3, ftw.3, get_nprocs_conf.3, getcwd.3, gethostbyname.3, getnetent.3, getutent.3, glob.3, ilogb.3, insque.3, j0.3, ldexp.3, lgamma.3, log.3, log10.3, log1p.3, log2.3, logb.3, login.3, lrint.3, lround.3, lseek64.3, malloc.3, mbsnrtowcs.3, mbsrtowcs.3, modf.3, mq_notify.3, mq_open.3, nan.3, nextafter.3, openpty.3, perror.3, posix_memalign.3, pow.3, printf.3, qsort.3, realpath.3, remainder.3, remquo.3, rint.3, round.3, scalbln.3, scandir.3, scanf.3, setnetgrent.3, significand.3, sin.3, sinh.3, sqrt.3, strcasecmp.3, tan.3, tanh.3, tgamma.3, trunc.3, unlocked_stdio.3, updwtmp.3, wcrtomb.3, wcsnrtombs.3, wcsrtombs.3, wordexp.3, wprintf.3, y0.3, epoll.7, icmp.7, nptl.7: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-19 11:20:58 +02:00
Michael Kerrisk 04855535d3 posix_fadvise.2: Remove obsolete FIXME
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-19 09:56:28 +02:00
Michael Kerrisk 915b52efa4 madvise.2: SEE ALSO: add posix_madvise(2)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-19 09:56:28 +02:00
Michael Kerrisk cdd14e51bf mount.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-19 09:51:49 +02:00
Michael Kerrisk 9b24956272 mount.2: Fix version number for MS_LAZYTIME
Reported-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-19 09:51:49 +02:00
Michael Kerrisk 5eab76af77 mount.2: Tweak MS_LAZYTIME text
Reported-by: Omar Sandoval <osandov@osandov.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-19 09:43:01 +02:00
Michael Kerrisk 9cdabfa62a mount.2: Enhancements to MS_LAZYTIME description
Cowritten-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-19 09:43:01 +02:00
Michael Kerrisk 42a8e396cf mount.2: Document MS_LAZYTIME
Based on Ted T'so's commit message 0ae45f63d4e

Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Cowritten-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-19 09:43:01 +02:00
Michael Kerrisk 1a7e5113c6 seccomp.2: Note that seccomp_data is read-only
Reported-by: Pierre Chifflier <pollux@debian.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-19 09:33:38 +02:00
Michael Kerrisk adf507a373 fallocate.2: Note that SMB3 added FALLOC_FL_ZERO_RANGE support in Linux 3.17
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-19 09:25:20 +02:00
Michael Kerrisk 4a401602a7 fallocate.2: Fix kernel version number for FALLOC_FL_ZERO_RANGE
FALLOC_FL_ZERO_RANGE as added in 3.15, not 3.14.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-19 08:16:40 +02:00
Nikos Mavrogiannopoulos 24e9c95d2d ioctl_list.2: SIOCADDRT accepts in6_rtmsg in INET6 protocol
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-18 23:06:22 +02:00
Michael Kerrisk 144d1a361f sched_setaffinity.2: tfix
Reported-by: cdlscpmv <cdlscpmv@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-18 23:03:11 +02:00
Heinrich Schuchardt 9537fb3c51 ioctl_list.2: TFD_IOC_SET_TICKS
timerfd_create.2 mentions TFD_IOC_SET_TICKS. We should add it to
ioctl_list.2, too.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-18 20:39:15 +02:00
Michael Kerrisk 9755c034f7 poll.2: SEE ALSO: add epoll(7)
Reported-by: Andreas Baak <andreas.baak@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-18 13:20:39 +02:00
Michael Kerrisk 40f6b649da timerfd_create.2: Note kernel version for TFD_IOC_SET_TICKS
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-18 13:20:39 +02:00
Michael Kerrisk 80d27367ab timerfd_create.2: Tweaks to Cyrill Gorcunov's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-18 13:20:39 +02:00
Cyrill Gorcunov 5a3eb9cd35 timerfd_create.2: Document TFD_IOC_SET_TICKS ioctl() operation
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-18 13:20:39 +02:00
Michael Kerrisk 32b262a163 symlink.2: ERRORS: add linkpath=="" case for ENOENT
Reported-by: Jonny Grant <jg@jguk.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-12 09:58:24 +02:00
Michael Kerrisk bc5e71f562 symlink.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-12 09:58:24 +02:00
Michael Kerrisk d01c52164e getdents.2: Update timestamp
Really just a marker to record the reporters of bugs
that stemmed from the fact that the page did not
document getdents64(). I'll fix things up in the changelog.

See https://bugzilla.kernel.org/show_bug.cgi?id=14795

Reported-by: Dima Tisnek <dimaqq@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-12 09:58:24 +02:00
Michael Kerrisk 31f7afcddf getdents.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-12 07:42:45 +02:00
Michael Kerrisk 51fe959a97 getdents.2: Document getdents64()
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-12 07:42:45 +02:00
Michael Kerrisk 063fd85422 getdents.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-12 07:42:45 +02:00
Michael Kerrisk 77cbbd07eb getdents.2: wfix (off-by-one kernel version)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-12 07:42:45 +02:00
Michael Kerrisk 9497142004 stat.2: Add some details on various "stat" versions
Three versions of "stat" appeared on 32-bit systems,
dealing with structures of different (increasing) sizes.
Explain some of the details, and also note that the
situation is simpler on modern 64-bit architectures.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-11 08:46:27 +02:00
Michael Kerrisk a54afa1e7b llseek.2: llseek() exists on 32-bit platforms to support seeking to large offsets
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-11 08:46:27 +02:00
Michael Kerrisk 6cfd51e74c llseek.2: Advise reader to use lseek(2) instead
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-11 08:46:27 +02:00
Michael Kerrisk d3c49afa7e syscalls.2: Add some details about the "multiple versions of system calls"
The multiple-system-call-version phenomenon is particular a
feature of older 32-bit platforms. Hint at that fact in the text.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-11 08:46:26 +02:00
Michael Kerrisk a39f2f4dc8 stat.2: Add a little more detail on history of three versions of *stat()
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-11 08:46:26 +02:00
Michael Kerrisk 470e30318d syscalls.2: Minor fix: use truncate64() rather than ftrucante64()
In the discussion of the new *64() system calls added in
Linux 2.4, use truncate64() father than ftruncate64(),
since the text goes on to say "and their analogs that work with
file descriptors or symbolic links".

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-11 08:46:26 +02:00
Michael Kerrisk a7fa598074 newfstatat.2: New link to fstatat64.2
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-11 08:46:26 +02:00
Michael Kerrisk cad6df3299 stat.2: Add mention of newfstatat()
The underlying system call for fstatat() is newfstatat()
on some architectures.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-11 08:46:26 +02:00
Michael Kerrisk 609203f3f7 pread.2: Add "C library/kernel ABI differences" subsection
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-11 08:46:26 +02:00
Michael Kerrisk 33a8247aab prlimit64.2: New link to getrlimit.2
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-11 08:46:26 +02:00
Michael Kerrisk 7d1a441bc6 syscalls.2: Remove prlimit()
There really is only the prlimit64() system call.
See also commit 7b08c45b7d.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-11 08:46:26 +02:00
Michael Kerrisk 2863377036 getrlimit.2: Note that the underlying system call for prlimit() is prlimit64()
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-11 08:46:26 +02:00
Michael Kerrisk abb3258def getrlimit.2: Remove "_FILE_OFFSET_BITS == 64" from prlimit() FTM requirements
"_FILE_OFFSET_BITS == 64" is not needed to get the prlimit()
declaration.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-11 08:46:26 +02:00
Michael Kerrisk a97b707895 posix_fadvise.2: Add "C library/kernel ABI differences" subsection
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-11 08:46:26 +02:00
Michael Kerrisk 0582770c52 seccomp.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-11 08:46:26 +02:00
Michael Kerrisk 4c33c15ad3 timer_create.2: Add some details to C library/kernel ABI differences
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-06 16:13:54 +02:00
Michael Kerrisk 318f2dce07 timer_create.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-06 16:13:54 +02:00
Gleb Fotengauer-Malinovskiy b4bd5a5c94 umount.2: tfix
Signed-off-by: Gleb Fotengauer-Malinovskiy <glebfm@altlinux.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-06 16:13:54 +02:00
David Rientjes 31ddc55d25 madvise.2: Specify MADV_REMOVE returns EINVAL for hugetlbfs
madvise(2) actually returns with error EINVAL for MADV_REMOVE
when used for hugetlb VMAs, not EOPNOTSUPP, and this has been
the case since MADV_REMOVE was introduced in commit f6b3ec238d12
("madvise(MADV_REMOVE): remove pages from tmpfs shm backing
store").

Specify the exact behavior.

Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-06 16:13:54 +02:00
Michael Kerrisk 1024e8ffb9 unshare.2: Remove mention of "System V" from discussion of CLONE_NEWIPC
These days, CLONE_NEWIPC also affects POSIX message queues.

Reported-by: Fabien Pichot <fpichot@bouledef.eu>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-06 16:12:22 +02:00
Michael Kerrisk 458abbe629 Removed trailing white space at end of lines 2015-03-29 22:31:35 +02:00
Michael Kerrisk 1e64c86bbf intro.1, ldd.1, clone.2, getgroups.2, getpid.2, getsockopt.2, ioctl_list.2, msgop.2, open.2, seccomp.2, setgid.2, setresuid.2, setreuid.2, setuid.2, sigaction.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, socket.2, syscall.2, syscalls.2, umount.2, clock.3, dlopen.3, fmemopen.3, fpathconf.3, fputwc.3, fputws.3, fseek.3, fseeko.3, gcvt.3, getline.3, getwchar.3, hypot.3, if_nameindex.3, initgroups.3, popen.3, resolver.3, strcoll.3, strdup.3, tzset.3, ulimit.3, wcstombs.3, wctob.3, xdr.3, console_codes.4, random.4, filesystems.5, host.conf.5, hosts.5, proc.5, resolv.conf.5, securetty.5, credentials.7, feature_test_macros.7, hier.7, ipv6.7, packet.7, pthreads.7, raw.7, signal.7, tcp.7, user_namespaces.7, ld.so.8, ldconfig.8: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-29 22:30:09 +02:00
Michael Kerrisk 661824b409 syscall.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-29 22:30:09 +02:00
Michael Kerrisk 1e941e8ce8 syscall.2: Minor edtis to Jann Horn's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-29 18:09:56 +02:00
Jann Horn 9ccd62fc42 syscall.2: Add x32 ABI
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-29 18:09:56 +02:00
Michael Kerrisk 37daa840af seccomp.2: Minor edits to Jann Horn's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-29 18:09:56 +02:00
Jann Horn b44088b44f seccomp.2: Explain blacklisting problems, expand example
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-29 17:52:09 +02:00
Michael Kerrisk ee053db874 sigaction.2: Note treatment of signals used internally by NPTL
The glibc wrapper gives an EINVAL error on attempts to change the
disposition of either of the two real-time signals used by NPTL.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-28 23:58:04 +01:00
Michael Kerrisk 3699b15436 sigprocmask.2: Note treatment of signals used internally by NPTL
The glibc wrapper silently ignores attempts to block the two
real-time signals used by NPTL.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-28 23:58:04 +01:00
Michael Kerrisk 363308860d sigwaitinfo.2: Note treatment of signals used internally by NPTL
The glibc wrappers silently ignore attempts to wait for
signals used by NPTL.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-28 23:58:04 +01:00
Michael Kerrisk 84cb494f8d setuid.2: Add discussion of NPTL credential-changing mechanism
At the kernel level, credentials (UIDs and GIDs) are a per-thread
attribute. NPTL uses a signal-based mechanism to ensure that
when one thread changes its credentials, all other threads change
credentials to the same values. By this means, the NPTL
implementation conforms to the POSIX requirement that the threads
in a process share credentials.

Reported-by: Shawn Landden <shawn@churchofgit.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-28 23:58:04 +01:00
Michael Kerrisk 38883d9578 setreuid.2: Add discussion of NPTL credential-changing mechanism
At the kernel level, credentials (UIDs and GIDs) are a per-thread
attribute. NPTL uses a signal-based mechanism to ensure that
when one thread changes its credentials, all other threads change
credentials to the same values. By this means, the NPTL
implementation conforms to the POSIX requirement that the threads
in a process share credentials.

Reported-by: Shawn Landden <shawn@churchofgit.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-28 23:58:04 +01:00
Michael Kerrisk ab09119b65 setresuid.2: Add discussion of NPTL credential-changing mechanism
At the kernel level, credentials (UIDs and GIDs) are a per-thread
attribute. NPTL uses a signal-based mechanism to ensure that
when one thread changes its credentials, all other threads change
credentials to the same values. By this means, the NPTL
implementation conforms to the POSIX requirement that the threads
in a process share credentials.

Reported-by: Shawn Landden <shawn@churchofgit.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-28 23:58:04 +01:00
Michael Kerrisk 716db1bafe setgid.2: Add discussion of NPTL credential-changing mechanism
At the kernel level, credentials (UIDs and GIDs) are a per-thread
attribute. NPTL uses a signal-based mechanism to ensure that
when one thread changes its credentials, all other threads change
credentials to the same values. By this means, the NPTL
implementation conforms to the POSIX requirement that the threads
in a process share credentials.

Reported-by: Shawn Landden <shawn@churchofgit.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-28 23:58:04 +01:00
Michael Kerrisk 405930725b getgroups.2: Add discussion of NPTL credential-changing mechanism
At the kernel level, credentials (UIDs and GIDs) are a per-thread
attribute. NPTL uses a signal-based mechanism to ensure that
when one thread changes its credentials, all other threads change
credentials to the same values. By this means, the NPTL
implementation conforms to the POSIX requirement that the threads
in a process share credentials.

Reported-by: Shawn Landden <shawn@churchofgit.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-28 23:58:04 +01:00
Michael Kerrisk da83e8a237 getpid.2: Note that getppid() returns 0 if parent is in different PID namespace
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-26 09:09:16 +01:00
Michael Kerrisk 65be1b46fb seccomp.2: Minor fixes to Jann Horn's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-22 20:25:10 +01:00
Jann Horn bec56ee2bb seccomp.2: Add note about alarm(2) not being sufficient to limit runtime
On Wed, Mar 11, 2015 at 10:43:50PM +0100, Mikael Pettersson wrote:
> Jann Horn writes:
>  > Or should I throw this patch away and write a patch
>  > for the prctl() manpage instead that documents that
>  > being able to call sigreturn() implies being able to
>  > effectively call sigprocmask(), at least on some
>  > architectures like X86?
>
> Well, that is the semantics of sigreturn().  It is essentially
> setcontext() [which includes the actions of sigprocmask()], but
> with restrictions on parameter placement (at least on x86).
>
> You could introduce some setting to restrict that aspect for
> seccomp processes, but you can't change this for normal processes
> without breaking things.

Then I think it's probably better and easier to just document the
existing behavior? If a new setting would have to be introduced
and developers would need to be aware of that, it's probably
easier to just tell everyone to use SIGKILL.

Acked-by: Kees Cook <keescook@chromium.org>
Acked-by: Mikael Pettersson <mikpelinux@gmail.com>
Acked-by: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-22 20:25:03 +01:00
Stéphane Aulery d5317e87c5 ioctl_list.2: srcfix
Fix a warning of groff: line 527: warning [p 6, 2.3i]: cannot adjust line

Signed-off-by: Stéphane Aulery <saulery@free.fr>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-22 20:20:58 +01:00
Stéphane Aulery d5cacf0711 syscall.2: ffix
Fix a warning of groff: line 192: warning [p 2, 4.7i]: cannot adjust line

Signed-off-by: Stéphane Aulery <saulery@free.fr>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-22 20:20:58 +01:00
Michael Kerrisk 75295d40e4 setreuid.2: Minor wording fixes
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-22 19:25:22 +01:00
Michael Kerrisk 8554dd0324 seteuid.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-22 19:25:22 +01:00
Michael Kerrisk 14c6baebf2 setgid.2: Clarify that setgid() changes all GIDs when caller has CAP_SETGID
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-22 19:25:22 +01:00
Michael Kerrisk 599226abb6 setuid.2: Clarify that setuid() changes all UIDs when caller has CAP_SETUID
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-22 19:25:22 +01:00
Michael Kerrisk d231b918d9 sigaction.2: grfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-22 19:25:22 +01:00
Heinrich Schuchardt c1d0454aff socket.2: SEE ALSO close(2)
The description mentions close(2). Hence it should also be referenced
in the SEE ALSO section.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-22 19:25:22 +01:00
Stéphane Aulery 409b02780a stat.2: tfix
Signed-off-by: Stéphane Aulery <saulery@free.fr>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-22 19:25:22 +01:00
Stéphane Aulery 8e6ee8f387 setpgid.2: tfix
Signed-off-by: Stéphane Aulery <saulery@free.fr>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-22 19:25:22 +01:00
Michael Kerrisk 1bdc161dbb open.2: Mention blocking semantics for FIFO opens
See https://bugzilla.kernel.org/show_bug.cgi?id=95191

Reported-by: Jason Vas Dias <jason.vas.dias@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-22 19:25:22 +01:00
Michael Kerrisk 7d1ce2d437 setreuid.2: SEE ALSO: add credentials(7)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-22 19:25:21 +01:00
Michael Kerrisk 46cac4c1c4 sigwaitinfo.2: Add discussion of rt_sigtimedwait(2)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-22 19:25:21 +01:00
Michael Kerrisk 1edfe5acea sigsuspend.2: Add discussion of rt_sigsuspend(2)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-22 19:25:21 +01:00
Michael Kerrisk d893db6462 sigreturn.2: Add discussion of rt_sigreturn(2)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-22 19:25:21 +01:00
Michael Kerrisk 166b65db90 sigprocmask.2: Add discussion of rt_sigprocmask(2)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-22 19:23:55 +01:00
Michael Kerrisk 78898dc791 sigpending.2: Add discussion of rt_sigpending(2)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-22 11:18:17 +01:00
Michael Kerrisk 1545ed9567 sigaction.2: Add discussion of rt_sigaction(2)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-22 11:18:17 +01:00
Michael Kerrisk f37759b1a0 open.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-22 08:24:07 +01:00
Michael Kerrisk aea38298b3 seccomp.2: Add mention of libseccomp
Reported-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-15 09:51:44 +01:00
Michael Kerrisk 71bb61ecf6 seccomp.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-10 10:47:22 +01:00
Bill Pemberton 6ffef7012e msgop.2: Remove EAGAIN as msgrcv() errno
The list of errnos for msgrcv() lists both EAGAIN and ENOMSG as
the errno for no message available with the IPC_NOWAIT flag.
ENOMSG is the errno that will be set.

Signed-off-by: Bill Pemberton <wfp5p@worldbroken.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-09 14:33:03 +01:00
Michael Kerrisk a98b2e1b98 msgop.2: Minor tweaks to Bill Pemberton's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-09 08:30:16 +01:00
Bill Pemberton b60093ff6a msgop.2: Add an example program
Signed-off-by: Bill Pemberton <wfp5p@worldbroken.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-09 08:27:41 +01:00
Michael Kerrisk 416d987671 posix_fadvise.2: wfix
Reported-by: Chris Delozier <c.s.delozier@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-08 09:52:13 +01:00
Stéphane Aulery d282bb247b iconv.1, localedef.1, access.2, execveat.2, fanotify_init.2, futex.2, ioctl_fat.2, mount.2, ftw.3, sd.4, tty_ioctl.4, fanotify.7, futex.7, posixoptions.7, iconvconfig.8: srcfix: Remove useless quotes from .SS and .SH sections
Signed-off-by: Stéphane Aulery <saulery@free.fr>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-08 08:55:03 +01:00
Michael Kerrisk a1d4cbf4f8 getgroups.2: Refer reader to user_namespaces(7) for discussion of /proc/PID/setgroups
The discussion of /proc/PID/setgroups has moved from
proc(5) to user_namespaces(7).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-04 15:11:02 +01:00
Michael Kerrisk 4e2683f9a3 getgroups.2: Note kernel version for EPERM /proc/PID/setgroups error case
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-04 15:11:02 +01:00
Michael Kerrisk c06e4b9664 getgroups.2: ERRORS: add EPERM for the case where /proc/PID/setgroups is "deny"
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-03 15:49:39 +01:00
Michael Kerrisk 925b92395b getgroups.2: Note capability associated with EPERM error for setgroups(2)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-03 15:49:39 +01:00
Michael Kerrisk 430a1677d2 umount.2: Move "shared mount + umount" text to a subsection in MOTTES
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-03 15:49:39 +01:00
Michael Kerrisk 50a4b0aafc umount.2: Tweak's to Eric Biederman's "shared subtrees on umount" patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-03 15:49:39 +01:00
Eric W. Biederman 6d47504df1 umount.2: Document the effect of shared subtrees on umount(2)
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-03 15:49:39 +01:00
Eric W. Biederman f131122173 umount.2: Correct the description of MNT_DETACH
I recently realized that I had been reasoning improperly about
what umount(MNT_DETACH) did based on an insufficient description
in the umount.2 man page, that matched my intuition but not the
implementation.

When there are no submounts, MNT_DETACH is essentially harmless to
applications.  Where there are submounts, MNT_DETACH changes what
is visible to applications using the detach directories.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-03 15:49:38 +01:00
Michael Kerrisk c9b0afde95 setns.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-03 09:50:24 +01:00
Michael Kerrisk 0f0daf7d99 ioctl_list.2: srcfix: remove unneeded "changelog" text
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-03 08:33:01 +01:00
Heinrich Schuchardt a44ffc6491 ioctl_list.2: include/linux/ext2_fs.h
Include linux/ext2_fs.h does not contain any ioctl definitions
anymore.

Request codes EXT2_IOC* have been replaced by FS_IOC* in
linux/fs.h.

Some definitions of FS_IOC_* use long* but the actual code expects
int* (see fs/ext2/ioctl.c).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-03 08:30:03 +01:00
Michael Kerrisk 1533d24295 clone.2: Small rewording of explanation of clone() wrt threads
Clone has so many effects that it's an oversimplification to say
that the *main* use of clone is to create a thread.  (In fact,
the use of clone() to create new processes may well be more
common, since glibc's fork() is a wrapper that calls clone().)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-02 17:25:57 +01:00
Michael Kerrisk bc9e70fad6 mount.2: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-02 17:25:57 +01:00
Michael Kerrisk 9316cc647e syscalls.2: Update for Linux 4.0
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-02 17:25:57 +01:00
Michael Kerrisk 28b44abc49 clone.2: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-02 17:25:56 +01:00
Josh Triplett 3dd889d9c1 clone.2: Document that clone silently ignores CLONE_PID and CLONE_STOPPED
Normally, system calls return EINVAL for flags they don't support.
Explicitly document that clone does *not* produce an error for these two
obsolete flags.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-02 17:25:56 +01:00
Stéphane Aulery 1288e3ebaa intro.2: tfix
Signed-off-by: Stéphane Aulery <saulery@free.fr>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-02 17:25:56 +01:00
Michael Kerrisk f8b553ce14 getsockopt.2: Minor fixes to Konstantim Shemyak's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-02 17:22:26 +01:00
Konstantin Shemyak eb048645b6 getsockopt.2: Note RETURN VALUE details when netfilter is involved
From email conversation with Konstantin:

> * Are you saying there are case where successful
>   setsockopt() via nf_register_sockopt() might return a
>   value other zero?

Yes - it happens when the option is served by a custom
netfilter hook (this is how I bumped into this). Example:

Userspace code:

===================  cut here ================================

int main(void) {
   int sock;

   if ((sock = socket(AF_INET, SOCK_RAW, IPPROTO_RAW)) < 0)
     return -1;

   return setsockopt(sock, IPPROTO_IP, TEST_SETSOCKOPT_RETURN, NULL, 0);
}
===================  cut here ================================

Kernel module, handling the option 400 "TEST_SETSOCKOPT_RETURN":

===================  cut here ================================

/* Random value - just should not be already used by the running
system: */

static int test_sock_set_so(struct sock *sk, int cmd, void *param,
unsigned len) {
         return 42;
}

static struct nf_sockopt_ops test_sock_ops = {
         list:       {NULL, NULL},
         pf:         PF_INET,
         set_optmin: TEST_SETSOCKOPT_RETURN,
         set_optmax: (TEST_SETSOCKOPT_RETURN + 1),
         set:        test_sock_set_so,
         get_optmin: 0,
         get_optmax: 0,
         get:        NULL
};

static int test_sock_init(void) {
         return nf_register_sockopt(&test_sock_ops);  /* sanity check
skipped */
}

static void test_sock_exit(void) {
         nf_unregister_sockopt(&test_sock_ops);
}

module_init(test_sock_init);
module_exit(test_sock_exit);
===================  cut here ================================

After successful loading of the module, the executable returns 42,
and as I understand, that is the intention of netfilter authors.
Netfilter code calls the registered handle and just returns back to
user what it receives from it.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-02 17:22:26 +01:00
Heinrich Schuchardt 60dd142120 ioctl_list.2: SEE ALSO ioctl_fat.2
add FAT_IOCTL_GET_VOLUME_ID
SEE ALSO ioctl_fat.2

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-02 17:22:25 +01:00
Bill Pemberton 553deb4145 memfd_create.2: spfix
Change "behaviour" to American spelling "behavior".

Signed-off-by: Bill Pemberton <wfp5p@worldbroken.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-02 17:22:25 +01:00
Bill Pemberton 266df08333 cacheflush.2: spfix
Signed-off-by: Bill Pemberton <wfp5p@worldbroken.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-02 17:22:25 +01:00
Dmitry Deshevoy 146740934e fcntl.2: tfix
Signed-off-by: Dmitry Deshevoy <mityada@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-02 17:22:25 +01:00
Michael Kerrisk fe0fefbff3 mmap.2, a64l.3, abort.3, abs.3, acos.3, acosh.3, addseverity.3, adjtime.3, aio_cancel.3, aio_error.3, aio_fsync.3, aio_read.3, aio_return.3, aio_suspend.3, aio_write.3, alloca.3, argz_add.3, asin.3, asinh.3, assert.3, assert_perror.3, atan.3, atan2.3, atanh.3, atof.3, atoi.3, backtrace.3, basename.3, bcmp.3, bcopy.3, bindresvport.3, bsd_signal.3, btowc.3, byteorder.3, bzero.3, cabs.3, cacos.3, cacosh.3, canonicalize_file_name.3, carg.3, casin.3, casinh.3, catan.3, catanh.3, catgets.3, catopen.3, cbrt.3, ceil.3, cfree.3, cimag.3, clock_getcpuclockid.3, clog.3, clog10.3, closedir.3, confstr.3, conj.3, copysign.3, cos.3, cosh.3, cpow.3, cproj.3, creal.3, crypt.3, ctermid.3, daemon.3, des_crypt.3, difftime.3, dirfd.3, div.3, drand48.3, drand48_r.3, dysize.3, ecvt.3, ecvt_r.3, envz_add.3, erf.3, erfc.3, euidaccess.3, exec.3, exit.3, exp.3, exp10.3, exp2.3, expm1.3, fabs.3, fclose.3, fcloseall.3, fdim.3, fenv.3, ferror.3, fflush.3, ffs.3, fgetc.3, fgetwc.3, fgetws.3, finite.3, flockfile.3, floor.3, fma.3, fmax.3, fmin.3, fmod.3, fmtmsg.3, fnmatch.3, fopen.3, fopencookie.3, fpclassify.3, fread.3, frexp.3, ftime.3, ftok.3, futimes.3, gamma.3, getauxval.3, getcontext.3, getcwd.3, getdate.3, getdirentries.3, getdtablesize.3, getenv.3, getfsent.3, getgrent.3, getgrnam.3, getgrouplist.3, getloadavg.3, getlogin.3, getopt.3, getpass.3, getpt.3, getpwent.3, getpwnam.3, gets.3, getsubopt.3, getttyent.3, getusershell.3, getutmp.3, getw.3, gnu_get_libc_version.3, grantpt.3, hsearch.3, iconv.3, iconv_open.3, if_nametoindex.3, ilogb.3, index.3, inet.3, inet_pton.3, isalpha.3, isatty.3, isgreater.3, iswalnum.3, iswalpha.3, iswblank.3, iswcntrl.3, iswctype.3, iswdigit.3, iswgraph.3, iswlower.3, iswprint.3, iswpunct.3, iswspace.3, iswupper.3, iswxdigit.3, j0.3, ldexp.3, lio_listio.3, localeconv.3, lockf.3, log.3, log10.3, log1p.3, log2.3, logb.3, lrint.3, lround.3, lseek64.3, makecontext.3, makedev.3, malloc.3, malloc_usable_size.3, matherr.3, mblen.3, mbrlen.3, mbrtowc.3, mbsinit.3, mbstowcs.3, mbtowc.3, memccpy.3, memchr.3, memcmp.3, memcpy.3, memfrob.3, memmem.3, memmove.3, mempcpy.3, memset.3, mkdtemp.3, mkfifo.3, mkstemp.3, modf.3, mq_close.3, mq_getattr.3, mq_open.3, mq_receive.3, mq_send.3, mq_unlink.3, mtrace.3, nan.3, nextafter.3, nl_langinfo.3, opendir.3, posix_fallocate.3, posix_openpt.3, pow.3, pow10.3, pthread_attr_setdetachstate.3, pthread_attr_setguardsize.3, pthread_attr_setinheritsched.3, pthread_attr_setschedpolicy.3, pthread_attr_setscope.3, pthread_attr_setstack.3, pthread_attr_setstackaddr.3, pthread_attr_setstacksize.3, pthread_equal.3, pthread_exit.3, pthread_getcpuclockid.3, pthread_kill.3, pthread_kill_other_threads_np.3, pthread_self.3, pthread_setaffinity_np.3, pthread_setcancelstate.3, pthread_setconcurrency.3, pthread_setschedparam.3, pthread_setschedprio.3, pthread_sigmask.3, pthread_sigqueue.3, pthread_testcancel.3, pthread_yield.3, ptsname.3, putenv.3, puts.3, putwchar.3, qecvt.3, raise.3, rand.3, random.3, random_r.3, re_comp.3, readdir.3, realpath.3, regex.3, remainder.3, remove.3, remquo.3, rewinddir.3, rexec.3, rint.3, round.3, rtime.3, scalb.3, scalbln.3, sched_getcpu.3, seekdir.3, sem_destroy.3, sem_getvalue.3, sem_init.3, sem_post.3, sem_unlink.3, sem_wait.3, setbuf.3, setenv.3, siginterrupt.3, signbit.3, sigpause.3, sigqueue.3, sigset.3, sigsetops.3, sigvec.3, sigwait.3, sin.3, sincos.3, sinh.3, sockatmark.3, sqrt.3, stdarg.3, stdio_ext.3, stpcpy.3, stpncpy.3, strcasecmp.3, strcat.3, strchr.3, strcmp.3, strcpy.3, strerror.3, strfmon.3, strfry.3, strftime.3, strlen.3, strnlen.3, strpbrk.3, strptime.3, strsep.3, strspn.3, strstr.3, strtod.3, strtoimax.3, strtok.3, strtol.3, strtoul.3, strverscmp.3, strxfrm.3, swab.3, system.3, sysv_signal.3, tan.3, tanh.3, tcgetpgrp.3, tcgetsid.3, telldir.3, tempnam.3, termios.3, tgamma.3, timegm.3, tmpfile.3, tmpnam.3, toascii.3, toupper.3, towctrans.3, towlower.3, towupper.3, trunc.3, tsearch.3, ttyname.3, ttyslot.3, ualarm.3, ungetwc.3, unlockpt.3, usleep.3, wcpcpy.3, wcpncpy.3, wcscasecmp.3, wcscat.3, wcschr.3, wcscmp.3, wcscpy.3, wcscspn.3, wcsdup.3, wcslen.3, wcsncasecmp.3, wcsncat.3, wcsncmp.3, wcsncpy.3, wcsnlen.3, wcspbrk.3, wcsrchr.3, wcsspn.3, wcsstr.3, wcstoimax.3, wcstok.3, wcswidth.3, wctomb.3, wctrans.3, wctype.3, wcwidth.3, wmemchr.3, wmemcmp.3, wmemcpy.3, wmemmove.3, wmemset.3, y0.3, attributes.7, man-pages.7, standards.7: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-03-02 16:12:18 +01:00
Ma Shimiao 8fddf95ad5 mmap.2: ATTRIBUTES: Note functions that are thread-safe
The function mmap() and munmap() are thread safe.

Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-27 14:07:56 +01:00
Michael Kerrisk 5d28ea3e45 Removed trailing white space at end of lines 2015-02-21 12:14:39 +01:00
Michael Kerrisk 6d322d5fc7 time.1, access.2, arch_prctl.2, cacheflush.2, capget.2, clone.2, execve.2, fcntl.2, fork.2, getpid.2, getxattr.2, ioctl.2, ioctl_fat.2, killpg.2, listxattr.2, madvise.2, migrate_pages.2, modify_ldt.2, mprotect.2, msgget.2, msgop.2, perf_event_open.2, ptrace.2, sched_setattr.2, semget.2, semop.2, sendfile.2, set_thread_area.2, setxattr.2, stat.2, statfs.2, wait.2, wait4.2, encrypt.3, mktemp.3, pthread_attr_setschedparam.3, resolver.3, statvfs.3, syslog.3, tzset.3, core.5, host.conf.5, intro.5, proc.5, resolv.conf.5, pthreads.7, socket.7, unix.7, ld.so.8, ldconfig.8: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 09:26:52 +01:00
Michael Kerrisk db49aa3ea6 statfs.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:16 +01:00
Michael Kerrisk dba3f0dd25 statfs.2: Add a note on the __fsword_t type
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:16 +01:00
Michael Kerrisk 35c69c1e34 statfs.2: Use __fsword_t in statfs structure definition
This more closely matches modern glibc reality.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:16 +01:00
Michael Kerrisk 8645dc8689 statfs.2: Reinstate 'f_spare' but more vaguely
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:16 +01:00
Tao Ma c7c843be54 statfs.2: Add OCFS2_SUPER_MAGIC
Signed-off-by: Tao Ma <tao.ma@oracle.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:16 +01:00
Michael Kerrisk 1d6523633e statfs.2: Document the 'f_flags' field added in Linux 2.6.36
Reported-by: Jan Chaloupka <jchaloup@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:15 +01:00
Michael Kerrisk 22795e81bb statfs.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:15 +01:00
Michael Kerrisk d85ddcc5b5 statfs.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:15 +01:00
Michael Kerrisk 580ef86409 statfs.2: Minor wording and formatting fixes in structure definition
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:15 +01:00
Michael Kerrisk 8add428555 statfs.2: Clarify that 'statfs' structure has some padding bytes
The number of padding bytes has changed over tyme, as some
bytes are used, so describe this aspect of the structure
less explicitly.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:15 +01:00
Michael Kerrisk 36e5bc92ed madvise.2: Add mention of VM_PFNMAP in discussion of MADV_DONTNEED and MADV_REMOVE
Reported-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:15 +01:00
Michael Kerrisk d5e9c9bb50 madvise.2: Improve MADV_DONTNEED description
Cowritten-by: Michal Hocko <mhocko@suse.cz>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:15 +01:00
Michael Kerrisk 8bdce466c4 madvise.2: Drop sentence saying that kernel may ignore 'advice'
The sentence creates misunderstandings, and does not really
add information.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:15 +01:00
Michael Kerrisk cd15218ee1 madvise.2: Clarifications for MADV_DONTNEED
Reported-by: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:15 +01:00
Michael Kerrisk 711c9c034f madvise.2: NOTES: Remove crufty text about "command" versus "advice"
The point made in this fairly ancient text is more or less evident
from the DESCRIPTION, and it's not clear what "standard" is being
referred to.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:15 +01:00
Michael Kerrisk fb2bb886b8 madvise.2: Note that some Linux-specific 'advice' change memory-access semantics
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:15 +01:00
Michael Kerrisk 95467f1d34 madvise.2: Minor fixes: miscellaneous wfix/tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:15 +01:00
Michael Kerrisk a727d7cc36 madvise.2: Minor fixups
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:15 +01:00
Michael Kerrisk 5575818dbf madvise.2: Minor change: reorder some paragraphs
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:15 +01:00
Michael Kerrisk deb9964960 madvise.2: Tweaks to Jan Chaloupka's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:15 +01:00
Jan Chaloupka f7282b7bbf madvise.2: Starting with Linux 3.5, more file systems support MADV_REMOVE
As from upstream commit:

commit 3f31d07571eeea18a7d34db9af21d2285b807a17
Author: Hugh Dickins <hughd@google.com>
Date:   Tue May 29 15:06:40 2012 -0700

     mm/fs: route MADV_REMOVE to FALLOC_FL_PUNCH_HOLE

     Now tmpfs supports hole-punching via fallocate(), switch madvise_remove()
     to use do_fallocate() instead of vmtruncate_range(): which extends
     madvise(,,MADV_REMOVE) support from tmpfs to ext4, ocfs2 and xfs.

madvise(,,MADV_REMOVE) support was extended by ext4, ocfs2 and xfs.

bug report: https://bugzilla.redhat.com/show_bug.cgi?id=1120294

Justification from Rafael Aquini:
Well, that code is committed in kernel since v3.5 (2012) and it
surely is the expected behaviour since. It seems to me that
madvise(2) man page text for MADV_REMOVE just got out-of-date in
that regard.

This patch mentions this support in madvise.2 man page.

Reworded and corrected by Michael Kerrisk and Hugh Dickins. Thank you.

Signed-off-by: Jan Chaloupka <jchaloup@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:15 +01:00
Michael Kerrisk bc6eb5efef madvise.2: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:15 +01:00
Michael Kerrisk 49170db521 madvise.2: Explain MADV_REMOVE in terms of file hole punching
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:14 +01:00
Michael Kerrisk c73c7130f7 madvise.2: Note that madvise() is nonstandard, but widespread
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:14 +01:00
Michael Kerrisk 35187e77e7 madvise.2: srcfix: remove FIXME
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:14 +01:00
Michael Kerrisk 96d4e25250 madvise.2: Clarify that MADV_DONTNEED has effect on pages only if it succeeds
Reported-by: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:14 +01:00
Michael Kerrisk 9c0b66ebde madvise.2: ERRORS: add EPERM error case for MADV_HWPOISON
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:14 +01:00
Michael Kerrisk 7208ad0a3d madvise.2: MADV_REMOVE can be applied only to shared writable mappings
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:14 +01:00
Michael Kerrisk 4335648dd1 madvise.2: MADV_REMOVE cannot be applied to locked or Huge TLB pages
See mm/madvise.c::madvise_remove()

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:14 +01:00