Commit Graph

5188 Commits

Author SHA1 Message Date
Michael Kerrisk fe56ce1c5f seccomp.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-07-13 14:06:24 +02:00
Michael Kerrisk 81f3ee482d uselib.2: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-07-10 20:00:22 +02:00
Michael Kerrisk ccc357f7c6 fcntl.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-07-03 12:40:48 +02:00
Michael Kerrisk 3c5ab7703e seccomp.2: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-07-03 12:40:48 +02:00
Michael Kerrisk 85fbef7408 prctl.2, seccomp.2: Clarify that SECCOMP_SET_MODE_STRICT disallows exit_group(2)
These days, glibc implements _exit() as a wrapper around
exit_group(2). (When seccomp was originally introduced, this was
not the case.) Give the reader a clue that, despite what glibc is
doing, what SECCOMP_SET_MODE_STRICT permits is the true _exit(2)
system call, and not exit_group(2).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-07-03 12:40:16 +02:00
Michael Kerrisk 7a79bb301a seccomp.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-06-30 13:29:23 +02:00
Michael Kerrisk e9855ef2f7 seccomp.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-06-30 13:29:00 +02:00
Michael Kerrisk 65cfc71220 seccomp.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-06-30 13:28:10 +02:00
Michael Kerrisk 29218e62cc truncate.2: ERRORS: ftruncate() can fail if the file descriptor is not writable
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-06-30 11:57:40 +02:00
Michael Kerrisk d726280aaf sched_setaffinity.2: Mention the use of the 'isolcpus' kernel boot option
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-06-26 11:07:43 +02:00
Michael Kerrisk b0ce4533dc getpriority.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-06-26 11:07:43 +02:00
Tobias Stoeckmann 4621e4e772 setsid.2: tfix
it -> its

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-06-18 08:43:56 +02:00
Michael Kerrisk ba9aa794c8 chroot.2: Minor fixes
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-06-16 13:20:47 +02:00
Stephan Mueller 3c4dfb62a5 socket.2: Update documentation reference for AF_ALG
Signed-off-by: Stephan Mueller <stephan.mueller@atsec.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-06-16 10:07:00 +02:00
Jann Horn 614e269a80 chroot.2: chroot() is not intended for security; document attack
It is unfortunate that this discourages this use of chroot(2)
without pointing out alternative solutions - for example,
OpenSSH and vsftpd both still rely on chroot(2) for security.

Bind mounts should theoretically be usable as a replacement, but
currently, they have a similar problem (CVE-2015-2925) that hasn't
been fixed in ~6 months, so I'd rather not add it to the manpage
as a solution before a fix lands.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-06-16 10:00:14 +02:00
Jann Horn 7353fc544c listxattr.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-06-12 20:16:16 +02:00
Michael Kerrisk c93b25f996 gettid.2: s/getpid()/gettid()/
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-06-12 19:01:14 +02:00
Julian Orth c838fc75c7 capget.2: Clarify that hdrp->pid==0 is equivalent gettid() not getpid()
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-06-12 18:58:24 +02:00
Michael Kerrisk 4a8f718576 gettid.2: Note that for a thread group leader, gettid() == getpid()
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-06-12 18:56:24 +02:00
Michael Kerrisk 29c4533cd3 _exit.2: Open stdio frames are not flushed, temporary files are deleted
Many years ago, text was added to the page saying that it is
implementation-dependent whether stdio streams are flushed and
whether temporary are removed. In part, this change appears to
be because POSIX.1-2001 added text related to this point.
However, that seems to have been an error in POSIX, and the
text was subsequently removed for POSIX.1-2008. See
https://collaboration.opengroup.org/austin/interps/documents/9984/AI-085.txt
Austin Group Interpretation reference 1003.1-2001 #085

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-06-10 12:55:49 +02:00
Michael Kerrisk 1290b94b1c llseek.2: tfix
Reported-by: Namhyung Kim <namhyung@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-27 10:16:59 +02:00
Michael Kerrisk 728aff57dd fcntl.2: OFD locks are proposed for inclusion in the next POSIX revision
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-20 16:38:09 +02:00
Zeng Linggang 47f06c7567 utimensat.2: ATTRIBUTES: Note functions that are thread-safe
After research, We think utimensat() and futimens() are thread-safe.
But, there are not markings of utimensat() and futimens() in glibc
document.

Signed-off-by: Zeng Linggang <zenglg.jy@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-20 16:13:32 +02:00
Zeng Linggang 288c1a09dd eventfd.2: ATTRIBUTES: Note function that is thread-safe
After research, We think eventfd() is thread-safe. But, there
is not marking of eventfd() in glibc document.

Signed-off-by: Zeng Linggang <zenglg.jy@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-20 16:12:43 +02:00
Zeng Linggang 546e17cef9 clock_getres.2: ATTRIBUTES: Note functions that are thread-safe
After research, We think clock_getres(), clock_gettime() and
clock_settime() are thread-safe. But, there are not markings of
clock_getres(), clock_gettime() and clock_settime() in glibc document.

Signed-off-by: Zeng Linggang <zenglg.jy@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-20 16:12:36 +02:00
Michael Kerrisk 7626d2ce34 prctl.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-19 09:51:24 +02:00
Michael Kerrisk 6b693d86d3 write.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-15 15:42:10 +02:00
Michal Hocko bbebbb6d56 mmap2: Clarify MAP_POPULATE
David Rientjes has noticed that MAP_POPULATE wording might promise
much more than the kernel actually provides and intend to provide.
The primary usage of the flag is to pre-fault the range. There is
no guarantee that no major faults will happen later on. The pages
might have been reclaimed by the time the process tries to access
them.

Reviewed-by: Eric B Munson <emunson@akamai.com>
Signed-off-by: Michal Hocko <mhocko@suse.cz>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-14 15:34:06 +02:00
Michal Hocko 7e3786bcdc mmap.2: Clarify MAP_LOCKED semantics
MAP_LOCKED had a subtly different semantic from mmap(2)+mlock(2)
since it has been introduced.
mlock(2) fails if the memory range cannot get populated to
guarantee that no future major faults will happen on the range.
mmap(MAP_LOCKED) on the other hand silently succeeds even if
the range was populated only partially.

Fixing this subtle difference in the kernel is rather awkward
because the memory population happens after mm locks have been
dropped and so the cleanup before returning failure (munlock)
could operate on something else than the originally mapped area.

E.g. speculative userspace page fault handler catching SEGV and
doing mmap(fault_addr, MAP_FIXED|MAP_LOCKED) might discard portion
of a racing mmap and lead to lost data. Although it is not clear
whether such a usage would be valid, mmap page doesn't explicitly
describe requirements for threaded applications so we cannot
exclude this possibility.

This patch makes the semantic of MAP_LOCKED explicit and suggests
using mmap + mlock as the only way to guarantee no later major
page faults.

Reviewed-by: Eric B Munson <emunson@akamai.com>
Signed-off-by: Michal Hocko <mhocko@suse.cz>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-14 15:31:11 +02:00
Zeng Linggang 8d53768435 sigaltstack.2: ATTRIBUTES: Note function that is thread-safe
The marking matches glibc marking.
The marking of functions in glibc is:
- sigaltstack: MT-Safe

Signed-off-by: Zeng Linggang <zenglg.jy@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-13 17:15:43 +02:00
Zeng Linggang 47e94221ff getrusage.2: ATTRIBUTES: Note function that is thread-safe
The marking matches glibc marking.
The marking of functions in glibc is:
- getrusage: MT-Safe

Signed-off-by: Zeng Linggang <zenglg.jy@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-13 17:15:11 +02:00
Zeng Linggang 57ba9747f4 getrlimit.2: ATTRIBUTES: Note functions that are thread-safe
After research, We think prlimit() is thread-safe. But, there
is not marking of prlimit() in glibc document.
getrlimit() and setrlimit() match glibc markings.
- getrlimit: MT-Safe
- setrlimit: MT-Safe
- prlimit:   MT-Safe

Signed-off-by: Zeng Linggang <zenglg.jy@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-13 17:15:06 +02:00
Michael Kerrisk d3b019c1b0 send.2: Expand on subtleties of MSG_NOSIGNAL versus ignoring SIGPIPE
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-13 13:21:44 +02:00
Michael Kerrisk 19aecb7eb0 send.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-13 13:21:44 +02:00
Michael Kerrisk 630b4cac33 recv.2, send.2: Explain some subtleties of MSG_DONTWAIT versus O_NONBLOCK
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-13 13:21:44 +02:00
Michael Kerrisk b6c261c4db iopl.2: Remove some historical libc5 and glibc 1 details
These details are ancient, and long ago ceased to be relevant.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-12 21:11:17 +02:00
Michael Kerrisk 55bd9495b2 ptrace.2: PTRACE_O_TRACEEXIT clarification
Reported-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-12 12:43:48 +02:00
Michael Kerrisk 77548009f5 pread.2, read.2, readv.2, sendfile.2, write.2: Clarify that Linux limits transfers to a maximum of 0x7ffff000 bytes
See https://bugs.debian.org/629994 and
https://bugs.debian.org/630029.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-05-12 07:07:21 +02:00
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