Commit Graph

5350 Commits

Author SHA1 Message Date
Michael Kerrisk dde6d764a3 sched_setaffinity.2: Rework text about dealing with systems with more than 1024 CPUs
After comments from Florian Weimer, who pointed out various
confusions in the earlier text.

Reported-by: Florian Weimer <fweimer@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-07-23 14:36:54 +02:00
Michael Kerrisk abbbace718 sched_setaffinity.2: Explain how to deal with 1024-CPU limitation of glibc's cpu_set_t type
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-07-23 14:36:53 +02:00
Julian Orth c3529e3b3a sched_setattr.2: Remove a const attribute
The attr argument of sched_setattr was documented as const but the
kernel will modify the size field of this struct if it contains an
invalid value. See the documentation of the size field for details.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-07-23 09:38:36 +02:00
Vince Weaver e38fb93eea perf_event_open.2: Exclude_host/exclude_guest clarification
This patch relates to the exclude_host and exclude_guest bits added
by the following commit:

   exclude_host, exclude_guest; Linux 3.2
        commit a240f76165e6255384d4bdb8139895fac7988799
        Author: Joerg Roedel <joerg.roedel@amd.com>
        Date:   Wed Oct 5 14:01:16 2011 +0200

            perf, core: Introduce attrs to count in either host or guest mode

The updated manpage text clarifies that the "exclude_host" and
"exclude_guest" perf_event_open() attr bits only apply in the
context of a KVM environment and are currently x86 only.

Signed-off-by: Vince Weaver <vincent.weaver@maine.edu>
Acked-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-07-22 20:51:26 +02:00
Vince Weaver f5281dfdd8 perf_event_open.2: Document PERF_SAMPLE_REGS_INTR
This patch relates to the addition of PERF_SAMPLE_REGS_INTR
support added in the following commit:

    perf_sample_regs_intr; Linux 3.19
	commit 60e2364e60e86e81bc6377f49779779e6120977f
	Author: Stephane Eranian <eranian@google.com>

            perf: Add ability to sample machine state on interrupt

The primary difference between PERF_SAMPLE_REGS_INTR and the
existing PERF_SAMPLE_REGS_USER is that the new support will
return kernel register values.  Also if precise_ip is
set higher than 0 then the PEBS register state will be returned
rather than the saved interrupt state.

This patch incorporates feedback from Stephane Eranian and
Andi Kleen.

Signed-off-by: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-07-22 20:45:19 +02:00
Michael Kerrisk 4607213d6b mprotect.2: Note ENOMEM error that can occur when we reach limit on maximum VMAs
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-07-22 09:18:26 +02:00
Michael Kerrisk c0b897882c mmap.2: ERRORS: point out that ENOMEM can occur even for munmap()
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-07-22 09:13:00 +02:00
Michael Kerrisk 74309bedf2 mmap.2: Minor wording fix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-07-22 09:09:12 +02:00
Michael Kerrisk 911f1c7ace mmap.2: Minor wording fixes
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-07-22 09:08:19 +02:00
Michael Kerrisk 88b001ffe8 mmap.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-07-22 09:04:55 +02:00
Michael Kerrisk 555c445244 mlock.2: Document another ENOME error case
ENOMEM can occur if locking/unlocking in the middle of a region
would increase the number of VMAs beyond the system limit (64k).

Reported-by: Mehdi Aqadjani Memar <m.aqadjanimemar@student.vu.nl>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-07-21 20:47:17 +02:00
Michael Kerrisk bb2f758044 fallocate.2: Since Linux 4.2, ext4 supports FALLOC_FL_INSERT_RANGE
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-07-21 08:38:07 +02:00
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
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