Commit Graph

20087 Commits

Author SHA1 Message Date
Michael Kerrisk d837569d1e uname.2: Replace reference to namespaces(7) with reference to uts_namespaces(7)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-08-26 23:14:49 +02:00
Michael Kerrisk 16ea6936c7 getdomainname.2: Add mention of UTS namespaces
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-08-26 23:14:49 +02:00
Michael Kerrisk 252bba449e uts_namespaces.7: SEE ALSO: add gethostname(2), getdomainname(2), uname(2)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-08-26 23:14:49 +02:00
Michael Kerrisk 79ea68831f gethostname.2: Mention UTS namespaces
Reported-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-08-26 23:14:49 +02:00
Michael Kerrisk 30e022e516 namespaces.7: Remove content migrated to uts_namespaces(7)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-08-26 23:14:49 +02:00
Michael Kerrisk 57829a0e87 uts_namespaces.7: New page with content migrated from namespaces(7)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-08-26 23:14:49 +02:00
Michael Kerrisk ab1dc74922 mq_overview.7: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-08-26 23:14:49 +02:00
Michael Kerrisk c4279d2660 mq_overview.7, sysvipc.7: Adjust references to namespaces(7) to ipc_namespaces(7)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-08-26 23:14:49 +02:00
Michael Kerrisk 25e96f04bc namespaces.7: Remove content migrated to new ipc_namespaces(7) page
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-08-26 23:14:49 +02:00
Michael Kerrisk 1d36b4e17b ipc_namespaces.7: New page with content migrated from namespaces(7)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-08-26 23:14:49 +02:00
Jakub Wilk 872e676db5 ld.so.8: tfix
Escape hyphens.

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-08-26 23:14:49 +02:00
Michael Kerrisk 3b9d44099f signal.7: Enhance the text on process-directed and thread-directed signals
clone(2) has a good description of these concepts; borrow
from it liberally.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-08-26 23:14:42 +02:00
Michael Kerrisk ed4f87f0c8 clone.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-08-26 21:54:16 +02:00
Michael Kerrisk 96e472175c signal.7: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-08-26 21:45:13 +02:00
Michael Kerrisk 18b028be2d user_namespaces.7: Improve explanation of meaning of ownership of nonuser namespaces
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-08-20 09:56:33 +02:00
Michael Kerrisk c031ffcc56 statx.2: Clarify details of a case where an invalid 'mask' value may be rejected
As reported by Simone:

    I was looking at version from 2017-09-15 but it's the same
    on: http://man7.org/linux/man-pages/man2/statx.2.html
    (2019-03-06)

    There is reported (about the mask argument) after the list
    of constants:

    > Note that the kernel does not reject values in mask other
    > than the above.  Instead, it simply informs the caller which
    > values are sup‐ ported by this kernel and filesystem via the
    > statx.stx_mask field.

    But as reported in the error values, there can be EINVAL if
    mask has a reserved valued, and I found a check against
    STATX__RESERVED in fs/stat.c for this. So if you use a that
    bit (0x80000000U) the kernel will reject the value.

    Probably is better to say that the kernel do not enforce the
    use of only the listed values, but there are anyway reserved
    values so and so you cannot put whatever you want on mask
    (that apply to more values than UINT_MAX).

Reported-by: Simone Piccardi <piccardi@truelite.it>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-08-20 09:29:49 +02:00
Jakub Wilk 8d839a5673 proc.5: tfix
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-08-03 13:59:35 +02:00
Ingo Schwarze 8bfbac5d14 proc.5: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-08-02 14:35:07 +02:00
Michael Kerrisk 7e7e8de32e capabilities.7: CAP_SYS_ADMIN allows modifying autogroup nice values
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-08-02 13:57:10 +02:00
Michael Kerrisk 2af31be94a Changes.old: Fixes to 5.02 log
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-08-02 11:26:00 +02:00
Michael Kerrisk 22cacdfc94 Start of man-pages-5.03: updating Changes and Changes.old 2019-08-02 10:31:40 +02:00
Michael Kerrisk c8581488a4 Start of man-pages-5.03: updating .Announce and .lsm files 2019-08-02 10:31:40 +02:00
Michael Kerrisk 2c3fb83708 Start of man-pages-5.03: renaming .Announce and .lsm files 2019-08-02 10:31:40 +02:00
Michael Kerrisk 157de0be21 Ready for 5.02 2019-08-02 08:47:19 +02:00
Michael Kerrisk adb5263fcc proc.5: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-08-02 08:37:26 +02:00
Michael Kerrisk 0b9a799587 prctl.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-08-02 08:35:43 +02:00
Michael Kerrisk 63121bd499 pldd.1, bpf.2, chdir.2, clone.2, fanotify_init.2, fanotify_mark.2, intro.2, ipc.2, mount.2, mprotect.2, msgctl.2, msgget.2, msgop.2, pivot_root.2, pkey_alloc.2, poll.2, prctl.2, semctl.2, semget.2, semop.2, setxattr.2, shmctl.2, shmget.2, shmop.2, tkill.2, dlopen.3, exec.3, ftok.3, getutent.3, on_exit.3, strcat.3, cpuid.4, proc.5, capabilities.7, cgroup_namespaces.7, credentials.7, fanotify.7, mount_namespaces.7, namespaces.7, sched.7, signal.7, socket.7, unix.7, user_namespaces.7, vdso.7, xattr.7, ld.so.8: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-08-02 08:34:32 +02:00
Michael Kerrisk 962708055e Changes: Ready for 5.02
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-08-02 08:32:54 +02:00
Michael Kerrisk 8d7dde9f9c setxattr.2: Place new ERANGE error in correct alphabetical order
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-08-01 19:33:38 +02:00
Michael Kerrisk cada754ad1 setxattr.2: Tweaks to Finn O'Leary's text
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-08-01 19:33:38 +02:00
Finn O'Leary acea950099 setxattr.2: Add ERANGE to 'ERRORS' section
Hi,

Both the Ext2 filesystem handler and the Ext4 filesystem handler will
return the ERANGE error code. Ext2 will return it if the name or value is
too long to be able to be stored, Ext4 will return it if the name is too
long. For reference, the relevant files/lines (with excerpts) are:

fs/ext2/xattr.c: lines 394 to 396 in ext2_xattr_set
>  394         name_len = strlen(name);
>  395         if (name_len > 255 || value_len > sb->s_blocksize)
>  396                 return -ERANGE;

fs/ext4/xattr.c: lines 2317 to 2318 in ext4_xattr_set_handle
> 2317         if (strlen(name) > 255)
> 2318                 return -ERANGE;

Other filesystems also return this code:

xfs/libxfs/xfs_attr.h: lines 53 to 55
> * The maximum size (into the kernel or returned from the kernel) of an
> * attribute value or the buffer used for an attr_list() call.  Larger
> * sizes will result in an ERANGE return code.

It's possible that more filesystem handlers do this, a cursory grep shows
that most of the filesystem xattr handler files mention ERANGE in some
form. A suggested patch is below (I'm not 100% sure on the wording through).

Thanks

--
- Finn

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-08-01 19:33:38 +02:00
Michael Kerrisk fd6307c47f mount_namespaces.7: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-07-30 08:25:37 +02:00
Yang Xu c14f79303f prctl.2: Correct some details for PR_SET_TIMERSLACK
In kernel/sys.c, arg2 is an unsigned long value and it will never
less than 0. Also, since kernel commit id da8b44d5a9f8 (Linux
4.6), timer_slack_ns and default timer_slack_ns have been
converted into u64, the return value of PR_GET_TIMERSLACK has been
limited under ULONG_MAX.

The timer slack value also can be inherited by a child created via
fork(2).

Reviewed-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-07-30 08:25:37 +02:00
Michael Kerrisk 2f368cc328 sched.7: SEE ALSO: add pthread_getschedparam(3)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-07-30 08:25:37 +02:00
Michael Kerrisk 0bdda5d08e poll.2: Note that poll() equivalent code for ppoll() is not quite equivalent
As reported by Alan Stern:

Here are two extracts from the man page for ppoll(2):

     Specifying a negative value in timeout means an infinite
     timeout.

     Other than the difference in the precision of the timeout
     argument, the following ppoll() call:

       ready = ppoll(&fds, nfds, tmo_p, &sigmask);

     is equivalent to atomically executing the following calls:

       sigset_t origmask;
       int timeout;

       timeout = (tmo_p == NULL) ? -1 :
                 (tmo_p->tv_sec * 1000 + tmo_p->tv_nsec / 1000000);
       pthread_sigmask(SIG_SETMASK, &sigmask, &origmask);
       ready = poll(&fds, nfds, timeout);
       pthread_sigmask(SIG_SETMASK, &origmask, NULL);

But if tmo_p->tv_sec is negative, the ppoll() call is not
equivalent to the corresponding poll() call.  The kernel rejects
negative values of tv_sec with an EINVAL error; it does not
interpret the value as meaning an infinite timeout.

(Yes, the kernel interprets tmo_p == NULL as an infinite timeout,
but the man page is still wrong for the case tmo_p->tv_sec < 0.)

Suggested fix: Following the end of the second extract above, add:

    except that negative time values in tmo_p are not
    interpreted as an infinite timeout.

Also, in the ERRORS section, change the text for EINVAL to:

    EINVAL The nfds value exceeds the RLIMIT_NOFILE value or
    *tmo_p contains an invalid (negative) time value.

Reported-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-07-30 08:25:27 +02:00
Michael Kerrisk 40ca38806d capabilities.7: Add pivot_root(2) to CAP_SYS_ADMIN list
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-07-28 13:34:28 +02:00
Michael Kerrisk 6f4a00d62f mount.2: ERRORS: Add a couple of EINVAL errors for MS_MOVE
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-07-28 09:17:06 +02:00
Michael Kerrisk 0610c6f1f8 mount.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-07-26 23:28:08 +02:00
Michael Kerrisk a68bb0b38d mount.2: SEE ALSO: add chroot(2) and pivot_root(2)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-07-26 23:27:18 +02:00
Michael Kerrisk a39e880f67 pivot_root.2: 'put_old' can't be a mount point with MS_SHARED propagation
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-07-26 23:22:59 +02:00
Michael Kerrisk 34a0f19c76 pivot_root.2: SEE ALSO: add mount(2)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-07-26 17:10:58 +02:00
Michael Kerrisk 1a0b1fd76b pivot_root.2: ERRORS: EINVAL occurs if 'new_root' or its parent has shared propagation
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-07-26 17:10:06 +02:00
Michael Kerrisk 37704bfc8f pivot_root.2: 'new_root' must be a mount point
It appears that 'new_root' may not have needed to be a mount
point on ancient kernels, but already in Linux 2.4.5, there
was the diff shown below. Verified also by testing.

@@ -1631,8 +1605,9 @@
  *  - we don't move root/cwd if they are not at the root (reason: if something
  *    cared enough to change them, it's probably wrong to force them elsewhere)
  *  - it's okay to pick a root that isn't the root of a file system, e.g.
- *    /nfs/my_root where /nfs is the mount point. Better avoid creating
- *    unreachable mount points this way, though.
+ *    /nfs/my_root where /nfs is the mount point. It must be a mountpoint,
+ *    though, so you may need to say mount --bind /nfs/my_root /nfs/my_root
+ *    first.
  */

 asmlinkage long sys_pivot_root(const char *new_root, const char *put_old)
@@ -1640,7 +1615,7 @@
        struct dentry *root;
        struct vfsmount *root_mnt;
        struct vfsmount *tmp;
-       struct nameidata new_nd, old_nd;
+       struct nameidata new_nd, old_nd, parent_nd, root_parent;
        char *name;
        int error;

@@ -1688,6 +1663,10 @@
        if (new_nd.mnt == root_mnt || old_nd.mnt == root_mnt)
                goto out2; /* loop */
        error = -EINVAL;
+       if (root_mnt->mnt_root != root)
+               goto out2;
+       if (new_nd.mnt->mnt_root != new_nd.dentry)
+               goto out2; /* not a mountpoint */
        tmp = old_nd.mnt; /* make sure we can reach put_old from new_root */
        spin_lock(&dcache_lock);
        if (tmp != new_nd.mnt) {

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-07-26 16:54:16 +02:00
Michael Kerrisk dc95a3a39f mount_namespaces.7: Clarify implications for other NS if mount point is removed in one NS
If a mount point is deleted or renamed or removed in one mount
namespace, this will cause an object that is mounted at that
location in another mount namespace to be unmounted (as verified
by experiment). This was implied by the existing text, but it is
better to make this detail explicit.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-07-24 07:11:35 +02:00
Michael Kerrisk 930e2ffac4 namespaces.7: srcfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-07-23 21:42:58 +02:00
Michael Kerrisk e70abf48ff mount_namespaces.7: SEE ALSO: add pivot_root(2), pivot_root(8)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-07-22 20:59:38 +02:00
Michael Kerrisk ae4452ab98 namespaces.7: Note initial values of hostname and domainname in a new UTS namespace
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-07-20 23:50:50 +02:00
Michael Kerrisk ed9e645a84 getutent.3: Fix missing include file in EXAMPLE
See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=932382

Reported-by: Thorsten Glaser <tg@mirbsd.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-07-20 15:56:34 +02:00
Michael Kerrisk 3b13efed75 capabilities.7: Add a note about using strace on binaries that have capabilities
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-07-17 04:19:01 +02:00
Michael Kerrisk 4d4708bfd2 getgroups.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-07-16 13:50:05 +02:00