Commit Graph

16305 Commits

Author SHA1 Message Date
Michael Kerrisk 1a4f7d5908 cgroups.7: Remove some redundant text on /proc files
The /proc files were mentioned in two different places.
Once is enough.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-10-07 23:01:34 +02:00
Mike Frysinger 89f929055e proc(5): ffix 2016-10-07 22:49:38 +02:00
Michael Kerrisk 750653a812 getrusage.2, madvise.2, memfd_create.2, mlock.2, mount.2, getauxval.3, core.5, capabilities.7, pid_namespaces.7, symlink.7, user_namespaces.7: Consistently use /proc/[pid] (not /proc/PID)
Reported-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-10-07 22:47:23 +02:00
Nikola Forró 85976da34f adjtimex.2: Fix kernel version references
ADJ_SETOFFSET mode was added in 2.6.39:
$ git tag --contains 094aa1881fdc1b8889b442eb3511b31f3ec2b762 | head -n 1
v2.6.39

ADJ_MICRO and ADJ_NANO modes were added in 2.6.26:
$ git tag --contains eea83d896e318bda54be2d2770d2c5d6668d11db | head -n 1
v2.6.26

Signed-off-by: Nikola Forró <nforro@redhat.com>
2016-10-07 16:37:53 +02:00
Michael Kerrisk 4c58028a28 proc.5: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-10-07 14:30:54 +02:00
Michael Kerrisk 4389c7abff core.5: Tweaks to Mike Frysinger's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-10-07 11:17:01 +02:00
Mike Frysinger 5c3ce796e7 core(5): Add more details for output paths and the crash handler
People sometimes assume that the crash handler runs in the same context
as the crashing process.  They would be incorrect :).

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2016-10-07 11:17:01 +02:00
Michael Kerrisk 15869389bf proc.5: Document /proc/PID/seccomp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-10-07 11:17:01 +02:00
Michael Kerrisk 3ed7270ea2 proc.5: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-10-07 11:17:01 +02:00
Michael Kerrisk a77efd582f proc.5: Expand discussion of /proc/[pid]/root
Add a shell example showing that /proc/[pid]/root is more
than a symlink. Based on an example provided by Mike Frysinger
in an earlier commit message.

Cowritten-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-10-07 11:17:01 +02:00
Michael Kerrisk 948f0ff4fe proc.5: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-10-07 11:17:01 +02:00
Mike Frysinger 2b3122418d proc(5): Clarify the root symlink and mount namespaces
If the target process is in a different mount namespace, the root
symlink actually shows that view of the filesystem.  As an example:

    /* Terminal 1 */
    $ unshare -Urnm
    # mount -t tmpfs tmpfs /etc
    # mount --bind /bin /dev
    # echo $$
    17168

    /* Terminal 2 */
    # ls /etc                       # Normal view of /etc files.
    # ls /proc/17168/root/etc       # Empty view of the tmpfs.
    # ls /dev                       # Normal view of /dev files.
    # ls /proc/17168/root/dev       # Contents of /bin files.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2016-10-07 11:17:01 +02:00
Michael Kerrisk fdcc06eeb1 wcstombs.3: wcsrtombs() does not provide thread-safe interface to same functionality
As noted in the Debian bug:

In "man wcstombs" the words

    The function wcsrtombs(3) provides a thread safe interface to
    the same functionality.

should be changed to

    The function wcsrtombs(3) provides a better interface to
    the same functionality.

Because

1) wcsrtombs is not thread safe if "ps" is NULL (see "ATTRIBUTES"
   in "man wcsrtombs")

2) wcstombs *is* thread safe (see "ATTRIBUTES" in "man wcstombs")

3) "man mbstowcs" says "The function mbsrtowcs(3) provides a
   better interface to the same functionality." in the same
   NOTES section.

See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=741360

Reported-by: Igor Liferenko <igor.liferenko@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-10-07 09:13:58 +02:00
Michael Kerrisk 49d2adfabd wcsrtombs.3: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-10-07 09:13:58 +02:00
Michael Kerrisk db59590e7d wcstombs.3: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-10-07 09:13:58 +02:00
Michael Kerrisk 760b892c1b nanosleep.2: wfix: rework some text around historical behavior
Referring to "current" Linux 2.4 kernels is strange...

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-10-07 09:13:58 +02:00
Michael Kerrisk bdcb70566a nanosleep.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-10-07 09:13:58 +02:00
Michael Kerrisk 3a03cb85b0 getunwind.2: Simplify text referring to vdso(7)
The detail given here is redundant, since this info is also
in vdso(7).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-10-07 09:13:58 +02:00
Michael Kerrisk fb22911618 getumask.3: Point to umask(2) for a thread-safe way to discover process's umask
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-10-07 09:13:58 +02:00
Michael Kerrisk 48523e3415 getumask.3: f
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-10-07 09:13:58 +02:00
Michael Kerrisk 8268760d77 getumask.3: Note that getumask() is still unavailable in glibc 2.24
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-10-07 09:13:58 +02:00
Bill Pemberton 175b0eec24 semctl.2: wfix: CONFORMING TO: change a POSIX.1-2001 to POSIX.1-2008
The section had POSIX.1-2001 listed twice in a row instead of
POSIX.1-2001 and POSIX.1-2008

Signed-off-by: Bill Pemberton <wfp5p@worldbroken.com>
2016-10-07 09:13:58 +02:00
Michael Kerrisk 589bae9d7d Changes.old: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-10-07 09:13:58 +02:00
Michael Kerrisk bd79a35ae9 open.2: F2FS support for O_TMPFILE was added in Linux 3.16
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-10-07 09:13:57 +02:00
Eugene Syromyatnikov 8ec6a2110b keyctl.2: updates regarding command usage, return values and error codes
Hello.

I've drafted some updates to the keyctl.2 man page while preparing test
for strace syscall decoder. It is focused mostly on description of argument
format used in various commands and return values/error codes.
Information is based on Documentation/security/keys.txt,
include/uapi/linux/keyctl.h, and source code and comments in
security/keys/ (mostly comments from security/keys/keyctl.c).
Hope you find it useful.
2016-10-07 09:13:57 +02:00
Michael Kerrisk 2a15a76bba clone.2: Document raw syscall interfaces on various other architectures
Reported-by: Josh Triplett <josh@joshtriplett.org>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-10-07 09:13:57 +02:00
Michael Kerrisk fda554706b clone.2: Change types for 'ptid' and 'ctid' in syscall prototypes
These types changed from 'void *' to 'int *' back in Linux 3.8.
The new types are closer to reality, so just update the page
without discussing the history.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-10-07 09:13:44 +02:00
Keno Fischer dd6d3d2e5f clone.2: Adjust syscall prototype and expand CLONE_SETTLS description
The prototype for the system call was added in kernel commit
81f10dad, but looking at the kernel's fork.c, I believe the
relevant definition is

SYSCALL_DEFINE5(clone, unsigned long, clone_flags,
                unsigned long, newsp,
                int __user *, parent_tidptr,
                int __user *, child_tidptr,
                unsigned long, tls)

so the last argument is the tls argument, not a pt_regs argument.
I stumbled upon this while trying to understand CLONE_SETTLS, so
I expanded that description a little to cover other architectures.

Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2016-09-25 21:00:52 +02:00
Michael Kerrisk 2293a55f93 pipe.7: Document FIONREAD
Reported-by: Patrick McLean <patrickm@gaikai.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-09-25 12:09:09 +02:00
Michael Kerrisk 8512495a12 namespaces.7: tfix
Reported-by: Nikola Forró <nforro@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-09-23 13:56:31 +02:00
Michael Kerrisk cf0588ad39 execve.2: Note that real UID, real GID, and supplementary GIDs are unchanged
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-09-22 10:52:37 +02:00
Michael Kerrisk a9eb4a803e fork.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-09-22 10:47:03 +02:00
Michael Kerrisk 5a1fa66f9e fork.2: PID of new process also does not match any existing session ID
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-09-22 10:45:04 +02:00
Michael Kerrisk 869c706fbf quotactl.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-09-22 08:58:34 +02:00
Michael Kerrisk d38f98b6c2 quotactl.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-09-22 08:49:57 +02:00
Michael Kerrisk 093b6f2026 quotactl.2: Tweaks to Eugene Syromyatnikov's patches
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-09-21 15:40:56 +02:00
Eugene Syromyatnikov 955ea4e7e1 quotactl.2: wfix 2016-09-21 14:56:03 +02:00
Eugene Syromyatnikov 90d79b64c8 quotactl.2: Updated information regarding XFS-specific quotactl subcommands
Added information regarding structure definitions used for
XFS-specific subcommands, updated flag constants, added
information regarding ignored syscall arguments, added notes on
usage of kernel UAPI header.
2016-09-21 14:55:30 +02:00
Eugene Syromyatnikov 2219bd3f59 quotactl.2: Updated information regarding disk quota flags
Added information regarding DQF_SYS_FILE flag; updated definition
of V1_DQF_RSQUASH, which has been defined privately and defined
publicly as DQF_ROOT_SQUASH.
2016-09-21 14:54:52 +02:00
Eugene Syromyatnikov b5b42cc585 quotactl.2: Additions regarding project quotas
Added information regarding presence of project quotas.
2016-09-21 14:54:37 +02:00
Michael Kerrisk 348348b1d2 dlopen.3: dlmopen() is still broken in glibc 2.24
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-09-21 12:46:10 +02:00
Michael Kerrisk a644bc4824 prctl.2: Simplify list of cases where "dumpable" attribute is reset
Simplify list of cases that cause dumpable attribute to
reset to suid_dumpable: there were two lists that together
in effect had many duplicates.

Also some minor rewordings.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-09-21 12:46:10 +02:00
Michael Kerrisk 161946a262 prctl.2: Refer to proc(5) for effects of dumpability on ownership of /proc/PID/*
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-09-21 12:46:09 +02:00
Michael Kerrisk 982d8cf740 prctl.2: Minor fix: add a reference to ptrace(2) for PR_SET_DUMPABLE
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-09-21 12:46:09 +02:00
Michael Kerrisk f1a5d77ac3 proc.5: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-09-21 12:46:09 +02:00
Michael Kerrisk 5681553cb8 proc.5: Note that 'suid_dumpable' mode 1 is insecure
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-09-21 11:48:32 +02:00
Michael Kerrisk c3c64ee6e3 proc.5: Add reference to core(5) in discussion of 'suid_dumpable'
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-09-21 11:48:32 +02:00
Michael Kerrisk 8a71b4bb86 proc.5: Refer to ptrace(2) for info on effect of suid_dumpable on ptraceability
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-09-21 11:48:32 +02:00
Michael Kerrisk 3bdb8ec5e8 proc.5: Explain rules determining ownership of /proc/PID/* files
Describe the effect of the "dumpable" attribute on ownership
of /proc/PID files.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-09-21 11:48:32 +02:00
Michael Kerrisk 1e6a8e2f4f proc.5: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-09-21 11:48:32 +02:00