Commit Graph

5350 Commits

Author SHA1 Message Date
Michael Kerrisk 9a12dd5031 pread.2: Rewrite RETURN VALUE section
(Also drop the text on pwrite() returning zero; that seems bogus.)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-12 07:07:21 +02:00
Michael Kerrisk 7b0d1eaa6d readv.2: Remove BUGS heading
The text on mixinf I/O syscalls and stdio is a general point
of behavior. It's not a bug as such.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-12 07:03:02 +02:00
Michael Kerrisk 0b4ac98897 execve.2: srcfix: Add FIXME
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-11 12:14:54 +02:00
Michael Kerrisk 9f629381c9 open.2, read.2, write.2: Clarify that O_NONBLOCK is a no-op for regular files and block devices
Reported-by: Mike Hayward <hayward@loup.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-11 12:03:43 +02:00
Michael Kerrisk eee5da1663 read.2: Minor fixes
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-11 11:39:38 +02:00
Michael Kerrisk 403b78f89e open.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-11 11:30:00 +02:00
Michael Kerrisk 02906043a4 ioprio_set.2: Document meaning of ioprio==0
Reported-by: Jens Axboe <axboe@fb.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-11 10:09:05 +02:00
Michael Kerrisk a311ffd05b ioprio_set.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-11 09:39:49 +02:00
Michael Kerrisk 8ebf2cfb42 ioprio_set.2: Minor fix: change 'hda' to 'sda' in examples
These days, we're more likely to see 'sd' than 'hd' disk devices.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-11 09:32:42 +02:00
Michael Kerrisk 7e5d08eb08 ioprio_set.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-11 09:31:25 +02:00
Michael Kerrisk 4965810a6b ioprio_set.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-11 09:26:41 +02:00
Michael Kerrisk eb24aedc69 execve.2: Elaborate on envp/argv as NULL behavior
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-11 09:10:19 +02:00
Michael Kerrisk 097547580e execve.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-11 09:10:09 +02:00
Michael Kerrisk ef5a2800f7 seccomp.2: srcfix
Reported-by: Sam Varshavchik <mrsam@courier-mta.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-08 16:13:42 +02:00
Michael Kerrisk cc5ba920e1 getrandom.2: srcfix
Reported-by: Sam Varshavchik <mrsam@courier-mta.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-08 16:13:02 +02:00
Michael Kerrisk 0722a578ed _exit.2, access.2, brk.2, chmod.2, clone.2, epoll_wait.2, eventfd.2, fork.2, getgroups.2, gethostname.2, getpid.2, getpriority.2, killpg.2, mmap.2, poll.2, posix_fadvise.2, pread.2, ptrace.2, readv.2, sched_setaffinity.2, select.2, seteuid.2, setgid.2, setresuid.2, setreuid.2, setuid.2, sigaction.2, signalfd.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, stat.2, timer_create.2, uname.2, wait.2, wait4.2, mq_notify.3, mq_open.3, sigqueue.3, man-pages.7: Remove "ABI" from "C library/kernel ABI differences" subheadings
The "ABI" doesn't really convey anything significant in
the title. These subsections are about describing differences
between the kernel and (g)libc interfaces.

Reported-by: Andries E. Brouwer <Andries.Brouwer@cwi.nl>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-08 13:10:04 +02:00
Michael Kerrisk 8d0418afd0 access.2: tfix + wfix
Reported-by: Andries E. Brouwer <Andries.Brouwer@cwi.nl>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-08 11:54:36 +02:00
Michael Kerrisk 86dbf1bbb1 rename.2: srcfix: add Linux kernel commit for RENAME_WHITEOUT
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-07 13:49:05 +02:00
Michael Kerrisk 2236e65b29 sched_setaffinity.2: Add an example program
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-07 10:37:37 +02:00
Michael Kerrisk d35b5dd343 rename.2: Note that RENAME_NOREPLACE can't be employed with RENAME_EXCHANGE
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-07 10:36:39 +02:00
Michael Kerrisk 0ebe7b93fc rename.2: Document RENAME_WHITEOUT
Heavily based on text by Miklos Szeredi.

Cowritten-by: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-07 10:36:38 +02:00
Michael Kerrisk de332fe886 rename.2: Minor text reworking for EINVAL errors
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-07 10:36:38 +02:00
Michael Kerrisk c9c7821b89 rename.2: Place list of renameat() flags in alphabetical order
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-07 10:36:38 +02:00
Michael Kerrisk ec9a2be0f9 fallocate.2: Tweaks to Namjae Jeon's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-07 10:24:32 +02:00
Namjae Jeon 7da70a01c7 fallocate.2: Document FALLOC_FL_INSERT_RANGE
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Ashish Sangwan <a.sangwan@samsung.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-07 09:14:47 +02:00
Michael Kerrisk 5ffdc2fda9 Removed trailing white space at end of lines 2015-05-07 08:30:26 +02:00
Michael Kerrisk 67d2c6873c add_key.2, chown.2, epoll_ctl.2, epoll_wait.2, execve.2, fcntl.2, get_mempolicy.2, getxattr.2, ioctl.2, keyctl.2, listxattr.2, mkdir.2, mknod.2, mmap.2, msync.2, nfsservctl.2, open.2, prctl.2, removexattr.2, request_key.2, sendfile.2, set_mempolicy.2, setxattr.2, shmget.2, shutdown.2, sigaction.2, syslog.2, truncate.2, umask.2, CPU_SET.3, atexit.3, bsearch.3, cmsg.3, err.3, gethostid.3, getmntent.3, getopt.3, iconv_close.3, inet_ntop.3, longjmp.3, lsearch.3, mcheck.3, on_exit.3, putpwent.3, regex.3, resolver.3, setbuf.3, setjmp.3, setlocale.3, setlogmask.3, sleep.3, strsignal.3, sysconf.3, undocumented.3, tty_ioctl.4, proc.5, resolv.conf.5, tzfile.5, aio.7, bootparam.7, capabilities.7, fanotify.7, inotify.7, ip.7, packet.7, pthreads.7, raw.7, signal.7, socket.7, unix.7, ld.so.8, nscd.8: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-07 08:26:32 +02:00
Brice Goglin 856778162b get_mempolicy.2, set_mempolicy: Policy is per thread, not per process
set/get_mempolicy manpages say that the memory allocation
policy is per process while reading the code and testing shows
that it's actually per thread.  Here's a quick fix, which may
need to be improved to better explain that we're allocating
in the context of a thread within a process address space.

Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-06 20:37:34 +02:00
Michael Kerrisk 320f8a8ec9 open.2: BUGS: O_CREAT | O_DIRECTORY succeeds if pathname does not exist
See http://www.openwall.com/lists/oss-security/2014/11/26/10
and http://thread.gmane.org/gmane.linux.file-systems/90997
    Subject: O_CREAT|O_DIRECTORY on nonexisting file with ext4
             not posix-compliant
    Newsgroups: gmane.linux.file-systems
    Date: 2014-12-15 17:39:09 GMT
and https://lkml.org/lkml/2005/9/23/80
    Subject: [PATCH] open: O_DIRECTORY and O_CREAT together should fail
    From:    Miklos Szeredi <>
    Date:    Fri, 23 Sep 2005 16:45:04 +0200

Reported-by: NeilBrown <neilb@suse.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-06 18:31:49 +02:00
Michael Kerrisk 70b53bc047 stat.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-06 17:58:39 +02:00
Michael Kerrisk 97d5b76276 open.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-06 17:57:32 +02:00
Michael Kerrisk 6ca52c17a9 shmget.2: Document SHM_HUGE_2MB, SHM_HUGE_1GB, and SHM_HUGE_SHIFT
Reported-by: Andi Kleen <andi@firstfloor.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-06 17:41:21 +02:00
Michael Kerrisk 5d2038b6a8 mmap.2: Document MAP_HUGE_2MB, MAP_HUGE_1GB, and MAP_HUGE_SHIFT
Reported-by: Andi Kleen <andi@firstfloor.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-06 17:41:21 +02:00
Michael Kerrisk d3c203f1a2 keyctl.2: srcfix: add FIXMES
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-06 09:44:03 +02:00
Michael Kerrisk 3739cdd4f8 prctl.2: Note that "parent" for purposes of PR_SET_DEATHSIG is a *thread*
See https://bugzilla.kernel.org/show_bug.cgi?id=43300

Reported-by: David Wilcox <davidvsthegiant@gmail.com>
Reported-by: Filipe Brandenburger <filbranden@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-05 18:00:26 +02:00
Gleb Fotengauer-Malinovskiy 4a38acf273 sendfile.2: tfix
Signed-off-by: Gleb Fotengauer-Malinovskiy <glebfm@altlinux.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-05 18:00:26 +02:00
Michael Kerrisk 3f4ed032f4 sendfile.2: RETURN VALUE: note the possibility of "short sends"
See https://bugzilla.kernel.org/show_bug.cgi?id=97491

Reported-by: Gregor Jasny <igjasny@googlemail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-05 16:03:55 +02:00
Michael Kerrisk 2a342fcf75 sendfile.2: Note that sendfile does not support O_APPEND for 'out_fd'
See https://bugzilla.kernel.org/show_bug.cgi?id=82841
Reported-by: Jason Newton <nevion@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-05 16:03:55 +02:00
Michael Kerrisk a27867c25e sendfile.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-05 16:03:55 +02:00
Michael Kerrisk 9e8a61e6ac sendfile.2: Clarify text on 'out_fd' and regular files in Linux 2.4
See https://bugzilla.kernel.org/show_bug.cgi?id=86001

Reported-by: Askar Safin <safinaskar@mail.ru>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-05 12:01:40 +02:00
Michael Kerrisk 15784e0ada unshare.2: Give the reader a hint that unshare() works on processes or threads
See https://bugzilla.kernel.org/show_bug.cgi?id=59281

Reported-by: Florian Weimer <fweimer@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-05 12:01:40 +02:00
Michael Kerrisk 8ef021ea00 clone.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-05 12:01:40 +02:00
Michael Kerrisk 72e8bdae36 mmap.2: Remove text that implies that munmap() syncs MAP_SHARED mapping to file
The existing text in this page:

       MAP_SHARED Share  this  mapping.   Updates to the mapping
                  are visible to other processes that  map  this
                  file,  and are carried through to the underly‐
                  ing  file.   The  file  may  not  actually  be
                  updated until msync(2) or munmap() is called.

implies that munmap() will sync the mapping to the underlying
file. POSIX doesn't require this, and some light reading of the
code and some light testing (fsync() after munmap() of a large
file) also indicates that Linux doesn't do this.

See also this mail thread:

    Subject: munmap, msync: synchronization
    Newsgroups: gmane.linux.man
    Date: 2014-04-20 10:28:40 GMT
    http://thread.gmane.org/gmane.linux.man/5548

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-04 20:04:33 +02:00
Michael Kerrisk 80691a91ce mmap.2: Minor reworking of RETURN VALUE text
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-04 16:43:25 +02:00
Michael Kerrisk 71c4b4b389 nfsservctl.2: Note that nfsservctl() was replaced by files in nfsd filesystem
Reported-by: J. Bruce Fields <bfields@fieldses.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-04 13:57:42 +02:00
Michael Kerrisk caf997afa0 fcntl.2: Note an F_SETSIG corner case
Reported-by: Vegard Nossum <vegard.nossum@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-04 13:48:39 +02:00
Michael Kerrisk 9a06730f49 fcntl.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-04 13:08:51 +02:00
Michael Kerrisk 94e66ffdb0 ptrace.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-04 13:08:24 +02:00
Michael Kerrisk 6f7b566c55 fcntl.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-04 13:07:18 +02:00
Michael Kerrisk b1f91dc142 sigaction.2: Refer the reader to fcntl(2) F_SETSIG for further details on si_fd
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-04 13:05:18 +02:00
Michael Kerrisk 31f0e8c81a msync.2: Rework text of DESCRIPTION
Rewrite the text somewhat, for easier comprehension.
No (intentional) changes to factual content

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-04 10:09:56 +02:00
Michael Kerrisk 44a484110a msync.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-04 10:09:56 +02:00
Michael Kerrisk e64aace436 dup.2: srcfix: remove FIXME
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-02 10:11:19 +02:00
Michael Kerrisk ea735ea85e epoll_ctl.2: After EPOLLHUP, EOF will be seen only after all data has been consumed
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-02 09:26:41 +02:00
Michael Kerrisk 7e8924ba6a poll.2: After POLLHUP, EOF will be seen only after all data has been consumed
Reported-by: Sam Varshavchik <mrsam@courier-mta.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-02 09:20:13 +02:00
Michael Kerrisk b09322c487 poll.2: Make it clearer which bits are ignored in 'events'
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-02 09:14:51 +02:00
Michael Kerrisk f855dc3c87 epoll_wait.2: Clarify that signal mask treatment in epoll_pwait() is per-thread
s/sigprocmask()/pthread_sigmask()/

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-02 09:02:15 +02:00
Michael Kerrisk 74083180e3 poll.2: Clarify that signal mask treatment in ppoll() is per-thread
s/sigprocmask()/pthread_sigmask()/

Reported-by: Ian Pilcher <arequipeno@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-02 09:02:12 +02:00
Michael Kerrisk b2d8f37d72 ioctl.2: SEE ALSO: add console_ioctl(2) and tty_ioctl(2)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-01 23:11:58 +02:00
Michael Kerrisk 57713dcad5 sigprocmask.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-01 12:47:44 +02:00
Michael Kerrisk f5f05a7bb5 sendfile.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-29 10:23:18 +02:00
Michael Kerrisk c0665cd7ba syslog.2: SEE ALSO: add dmesg(1)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-24 13:46:02 +02:00
Michael Kerrisk 92b1a2ccf9 listxattr.2, xattr.7: Describe listxattr(2) E2BIG error and document it as a BUG
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-22 15:01:19 +02:00
Michael Kerrisk 89fabe2e91 getxattr.2, listxattr.2, removexattr.2, setxattr.2, capabilities.7: Adjust "attr(5)" references to "xattr(7)"
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-22 14:40:38 +02:00
Michael Kerrisk 86cfb3ca59 add_key.2, request_key.2: SEE ALSO: add keyctl(3)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-22 14:38:56 +02:00
Michael Kerrisk 32fc240749 add_key.2, keyctl.2, request_key.2: SEE ALSO: add keyrings(7)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-22 14:38:56 +02:00
Michael Kerrisk 28d01ac409 mprotect.2: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-22 12:04:26 +02:00
Michael Kerrisk 44b1f5a0c2 stat.2: Minor fixes
Reported-by: Andreas Grünbacher <andreas.gruenbacher@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-21 16:50:34 +02:00
Michael Kerrisk bba094e3f9 stat.2: Remove excessive leading zeros on some constants
Reported-by: Andreas Grünbacher <andreas.gruenbacher@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-21 16:35:23 +02:00
Michael Kerrisk addfd6c39c stat.2: Wording tweaks to Jann Horn's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-21 15:56:15 +02:00
Michael Kerrisk 5ec64a3abd mkdir.2: Further tweaks to text on S_ISVTX and 'mode' argument
Reported-by: Andreas Grünbacher <andreas.gruenbacher@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-21 15:50:05 +02:00
Michael Kerrisk 1dab8564e2 stat.2: Add text on POSIX terms "file mode bits" and "file permission bits"
Recent changes to various pages employ this distinction.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-21 15:42:40 +02:00
Michael Kerrisk 3a9c5a29b6 open.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-21 15:42:40 +02:00
Michael Kerrisk 7e64d33c18 shutdown.2: BUGS: UNIX domain sockets now detect invalid 'how' values
Bug fixed in Linux 3.7.
See https://bugzilla.kernel.org/show_bug.cgi?id=47111

Reported-by: Stéphane Aulery <saulery@free.fr>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-21 15:42:31 +02:00
Michael Kerrisk 64639e9aa6 stat.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-21 14:44:20 +02:00
Jann Horn f240296dee stat.2: Add note about stat() being racy
The same thing was fixed for execve() in kernel commit
8b01fc86b9f425899f8a3a8fc1c47d73c2c20543, but for performance
reasons, that simple patch won't work for stat().

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-21 14:40:39 +02:00
Michael Kerrisk 9e1d8950a2 open.2: open() honors the S_ISVTX, S_ISUID, and S_ISGID bits in 'mode'
Reported-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-21 14:37:15 +02:00
Michael Kerrisk 10ef5a5549 mkdir.2: Fix a small error added by Andreas's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-21 14:37:15 +02:00
Michael Kerrisk 2fc8395c2b mkdir.2: Wording fixes + point reader at stat(2) for explanation of file mode
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-21 14:37:09 +02:00
Michael Kerrisk 9fcca5a033 mknod.2: Rewordings + point reader at stat(2) for details of mode bits
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-21 14:37:09 +02:00
Michael Kerrisk 58222012f8 open.2: Tighten wording: use 'mode bit' rather than 'permission bit'
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-21 14:37:09 +02:00
Michael Kerrisk a57c98a000 mkdir.2, mknod.2, open.2, umask.2: Tweaks to Andreas's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-04-21 14:37:09 +02:00
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
Michael Kerrisk aeb0944caa madvise.2: MADV_DONTNEED cannot be applied to Huge TLB or locked pages
See mm/madvise.c::madvise_dontneed()

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:14 +01:00
Michael Kerrisk a0c69e52d5 madvise.2: Note Huge TLB as a cause of EINVAL for MADV_DONTNEED
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 5c5df6bf9b madvise.2: Remove mention of "shared pages" as a cause of EINVAL for MADV_DONTNEED
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 ac95034e8a madvise.2: Split EINVAL error into separate cases
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:14 +01:00
Michael Kerrisk 845c8bea2d madvise.2: Recast discussion of 'advice' into two groups of values
madvise() is one of those system calls that has congealed over
time, as has the man page. It's helpful to split the discussion
of 'advice' into those flags into two groups:

* Those flags that are (1) widespread across implementations;
  (2) have counterparts in posix_madvise(3); and (3) were present
  in the initial Linux madvise implementation.
* The rest, which are values that (1) may not have counterparts
  in other implementations; (2) have no counterparts in
  posix_madvise(3); and (3) were added to Linux in more recent
  times.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:14 +01:00
Michael Kerrisk bdfe6b8f8e madvise.2: Remove "POSIX.1b" from CONFORMING TO
I can find no evidence that madvise() was in POSIX.1b.
Certainly, it's not mentioned in Bill Gallmeister's
POSIX.4 book (O'Reilly).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:14 +01:00
Michael Kerrisk c608a033d9 madvise.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:14 +01:00
Michael Kerrisk b4c1dae966 madvise.2: Move mention of posix_fadvise() from CONFORMING TO to SEE ALSO
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:14 +01:00
Michael Kerrisk 05fde7dd42 madvise.2: Mention POSIX.1-2008 addition of POSIX_MADV_NOREUSE
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:14 +01:00
Michael Kerrisk 90f406fb12 madvise.2: ffix: Add some paragraph breaks in descriptions of 'advice'
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:14 +01:00
Michael Kerrisk b7bc9bfd17 madvise.2: Explicitly list the five flags provided by posix_fadvise()
Over time, bit rot has afflicted this page. Since the original
text was written many new Linux-specific flags have been added.
So, now it's better to explicitly list the flags that
correspond to the POSIX analog of madvise().

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:14 +01:00
Michael Kerrisk 498f9213f3 madvise.2: srcfix: add commit hashes for various flags
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:14 +01:00
Michael Kerrisk d4e320965d ioctl_fat.2: Minor fixes
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:14 +01:00
Heinrich Schuchardt 432cdf0d7c ioctl_fat.2: d_ino, d_off, return value explained
The fields d_ino and d_off of structure __fat_dirent are explained.

The different return values of VFAT_IOCTL_READDIR_BOTH and
VFAT_IOCTL_READDIR_SHORT are explained.

The usage of the return value in the example is corrected.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:14 +01:00
Michael Kerrisk 3b4f95709f ioctl_fat.2: Use "exit()" rather than "return" to terminate main()
For consistency with other pages.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:14 +01:00
Michael Kerrisk 3a6b94457d ioctl_fat.2: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:14 +01:00
Michael Kerrisk 11a86b155d ioctl_fat.2: Tweak some pieces in EXAMPLE
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:14 +01:00
Michael Kerrisk 3289445e96 ioctl_fat.2: Add kernel version numbers for some ioctl() commands
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-02-21 08:32:14 +01:00