Commit Graph

265 Commits

Author SHA1 Message Date
Michael Kerrisk 97caa19c41 prctl.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-24 21:53:10 +02:00
Jakub Wilk 3076b3d996 prctl.2: tfix
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-22 13:12:46 +02:00
Michael Kerrisk d4492caac0 prctl.2: Minor wording fix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-21 14:01:01 +02:00
Michael Kerrisk e8426ca2b4 getent.1, localedef.1, accept.2, arch_prctl.2, clock_getres.2, clock_nanosleep.2, connect.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, execve.2, getitimer.2, getsockopt.2, gettid.2, inotify_add_watch.2, inotify_init.2, io_submit.2, ioctl.2, lseek.2, madvise.2, mlock.2, mmap.2, mprotect.2, msgctl.2, msgop.2, open_by_handle_at.2, openat2.2, pidfd_open.2, poll.2, prctl.2, quotactl.2, s390_sthyi.2, select.2, select_tut.2, semctl.2, semget.2, semop.2, setns.2, shmctl.2, shmget.2, shmop.2, sigaction.2, stat.2, statx.2, syscalls.2, timer_create.2, timerfd_create.2, unshare.2, wait.2, CPU_SET.3, aio_init.3, atoi.3, des_crypt.3, dirfd.3, fmemopen.3, fopencookie.3, ftok.3, fts.3, getaddrinfo.3, getifaddrs.3, getrpcent.3, gsignal.3, lio_listio.3, nl_langinfo.3, posix_memalign.3, posix_openpt.3, posix_spawn.3, scanf.3, sem_init.3, sem_post.3, shm_open.3, strcmp.3, strftime.3, st.4, elf.5, group.5, proc.5, services.5, aio.7, cgroups.7, feature_test_macros.7, keyrings.7, man-pages.7, namespaces.7, path_resolution.7, sigevent.7, signal.7, socket.7, sysvipc.7, time.7, udp.7: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-11 22:07:24 +02:00
Michael Kerrisk f3c29937e6 prctl.2: Note semantics of IO_FLUSHER state with respect to fork(2) and execve(2)
Reported-by: Mike Christie <mchristi@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-06 10:07:04 +02:00
Michael Kerrisk b5b0b2882e prctl.2: Reword description of PR_GET_IO_FLUSHER
Reported-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-02 14:13:51 +02:00
Michael Kerrisk 3872a3d621 prctl.2: Unused args must be zero for PR_GET_IO_FLUSHER and PR_SET_IO_FLUSHER
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-02 14:08:39 +02:00
Michael Kerrisk 4222606d2a prctl.2: f
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-02 14:07:12 +02:00
Michael Kerrisk 91e015066f prctl.2: Minor tweaks to Mike Christie's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-02 14:06:28 +02:00
Mike Christie 308eb2f636 prctl.2: Document PR_SETIO_FLUSHER/GET_IO_FLUSHER
This patch documents the PR_SET_IO_FLUSHER and PR_GET_IO_FLUSHER
prctl commands added to the linux kernel for 5.6 in commit:

    commit 8d19f1c8e1937baf74e1962aae9f90fa3aeab463
    Author: Mike Christie <mchristi@redhat.com>
    Date:   Mon Nov 11 18:19:00 2019 -0600

        prctl: PR_{G,S}ET_IO_FLUSHER to support controlling memory reclaim

Reviewed-by: Michal Hocko <mhocko@kernel.org>
Signed-off-by: Mike Christie <mchristi@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-04-02 13:59:05 +02:00
Michael Kerrisk 1ff5960b23 prctl.2: Clarify that PR_MCE_KILL_GET returns value via function result
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-10-02 07:20:45 +03:00
Michael Kerrisk 035a7bf179 prctl.2: wfix (for consistency)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-10-02 07:19:53 +03:00
Michael Kerrisk 7f5d84426c prctl.2: RETURN VALUE: add some missing entries
Note success return for PR_GET_SPECULATION_CTRL and PR_GET_FP_MODE.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-10-02 07:09:38 +03:00
Michael Kerrisk 1cea09b38b prctl.2: Clarify that PR_GET_SPECULATION_CTRL returns value as function result
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-10-02 06:56:50 +03:00
Michael Kerrisk f1bb579885 prctl.2: grfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-10-02 06:11:02 +03:00
Michael Kerrisk f1ba3ad272 prctl.2: wfix (for consistency with usage in rest of this page)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-10-02 06:07:52 +03:00
Michael Kerrisk 3946602978 prctl.2: Clarify that PR_GET_FP_MODE returns value as function result
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-10-02 06:05:50 +03:00
Michael Kerrisk 549597a85f close.2, execve.2, io_submit.2, prctl.2, write.2: Remove section number from references to function in its own page
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-09-27 14:18:46 +02:00
Michael Kerrisk 49a2a1052b copy_file_range.2, fanotify_mark.2, inotify_add_watch.2, ioctl_fideduperange.2, kcmp.2, prctl.2, get_robust_list.2, tkill.2, ttyname.3: ERRORS: correct alphabetical order
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-09-27 14:18:08 +02:00
Michael Kerrisk b6088873ae prctl.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-08-27 13:56:13 +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
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 cb7c96bfdd prctl.2: tfix
Reported-by: Tomas Skäre <tomas.skare@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-05-16 12:22:32 -05:00
Michael Kerrisk 9ba0180298 getent.1, iconv.1, ldd.1, locale.1, localedef.1, memusage.1, memusagestat.1, pldd.1, sprof.1, time.1, _syscall.2, accept.2, add_key.2, adjtimex.2, bind.2, bpf.2, capget.2, chown.2, chroot.2, clock_getres.2, clone.2, connect.2, copy_file_range.2, epoll_ctl.2, epoll_wait.2, eventfd.2, fanotify_init.2, fanotify_mark.2, fcntl.2, fsync.2, futex.2, getcpu.2, getdents.2, getgid.2, getgroups.2, getpid.2, gettid.2, gettimeofday.2, getuid.2, getxattr.2, inotify_add_watch.2, inotify_init.2, ioctl_fat.2, ioctl_ns.2, ioctl_userfaultfd.2, ioprio_set.2, kcmp.2, kexec_load.2, keyctl.2, listxattr.2, lseek.2, madvise.2, memfd_create.2, migrate_pages.2, mount.2, mprotect.2, mremap.2, msgctl.2, msgop.2, nfsservctl.2, open_by_handle_at.2, perf_event_open.2, pipe.2, pivot_root.2, pkey_alloc.2, poll.2, posix_fadvise.2, prctl.2, readahead.2, readdir.2, readlink.2, reboot.2, recvmmsg.2, removexattr.2, rename.2, request_key.2, s390_guarded_storage.2, s390_runtime_instr.2, s390_sthyi.2, sched_setaffinity.2, sched_setattr.2, sched_setparam.2, seccomp.2, select.2, select_tut.2, semctl.2, sendmmsg.2, set_thread_area.2, setgid.2, setns.2, setuid.2, setxattr.2, shmctl.2, sigaction.2, signalfd.2, sigsuspend.2, socket.2, socketpair.2, spu_run.2, stat.2, statx.2, subpage_prot.2, syscalls.2, sysctl.2, tee.2, timer_create.2, timerfd_create.2, truncate.2, uname.2, unshare.2, userfaultfd.2, ustat.2, vmsplice.2, write.2, CPU_SET.3, __ppc_get_timebase.3, alloca.3, argz_add.3, asprintf.3, backtrace.3, basename.3, bsd_signal.3, bstring.3, bswap.3, bzero.3, cacos.3, cacosh.3, catan.3, catanh.3, catgets.3, clock_getcpuclockid.3, cmsg.3, confstr.3, ctermid.3, ctime.3, des_crypt.3, dl_iterate_phdr.3, dlinfo.3, dlsym.3, duplocale.3, end.3, endian.3, errno.3, exec.3, exit.3, ferror.3, fgetws.3, fmemopen.3, fnmatch.3, fopencookie.3, fputws.3, frexp.3, ftw.3, get_nprocs_conf.3, get_phys_pages.3, getaddrinfo.3, getaddrinfo_a.3, getdate.3, getgrouplist.3, getifaddrs.3, getline.3, getlogin.3, getmntent.3, getnameinfo.3, getopt.3, getpass.3, getprotoent_r.3, getpwnam.3, getservent_r.3, getsubopt.3, glob.3, gnu_get_libc_version.3, hsearch.3, if_nameindex.3, index.3, inet.3, inet_net_pton.3, inet_pton.3, insque.3, isatty.3, iswblank.3, iswspace.3, lockf.3, makecontext.3, mallinfo.3, malloc.3, malloc_hook.3, malloc_info.3, mallopt.3, matherr.3, mbrtowc.3, mbsnrtowcs.3, mbsrtowcs.3, mbstowcs.3, mbtowc.3, mcheck.3, memchr.3, mq_getattr.3, mq_notify.3, newlocale.3, nl_langinfo.3, offsetof.3, perror.3, posix_spawn.3, printf.3, pthread_attr_init.3, pthread_cancel.3, pthread_cleanup_push.3, pthread_getattr_default_np.3, pthread_getattr_np.3, pthread_getcpuclockid.3, pthread_mutexattr_setrobust.3, pthread_rwlockattr_setkind_np.3, pthread_setaffinity_np.3, pthread_setname_np.3, pthread_setschedparam.3, pthread_sigmask.3, putenv.3, qsort.3, rand.3, random.3, readdir.3, regex.3, resolver.3, rpmatch.3, rtime.3, scanf.3, sem_wait.3, setaliasent.3, setbuf.3, stpcpy.3, stpncpy.3, strcat.3, strchr.3, strcmp.3, strcpy.3, strdup.3, strerror.3, strfromd.3, strfry.3, strftime.3, string.3, strlen.3, strnlen.3, strsep.3, strstr.3, strtok.3, strtol.3, strtoul.3, strverscmp.3, strxfrm.3, system.3, termios.3, trunc.3, wcpcpy.3, wcpncpy.3, wcrtomb.3, wcscat.3, wcscpy.3, wcslen.3, wcsncat.3, wcsncmp.3, wcsncpy.3, wcsnlen.3, wcsnrtombs.3, wcsrtombs.3, wcsstr.3, wcstok.3, wcstombs.3, wcwidth.3, wprintf.3, xcrypt.3, console_codes.4, dsp56k.4, full.4, initrd.4, lirc.4, loop.4, st.4, tty.4, vcs.4, charmap.5, core.5, host.conf.5, locale.5, proc.5, repertoiremap.5, resolv.conf.5, termcap.5, tmpfs.5, tzfile.5, aio.7, capabilities.7, cgroup_namespaces.7, cgroups.7, charsets.7, complex.7, epoll.7, fanotify.7, feature_test_macros.7, inotify.7, ip.7, locale.7, man-pages.7, man.7, namespaces.7, pid_namespaces.7, pkeys.7, pthreads.7, rtld-audit.7, sched.7, signal.7, sock_diag.7, socket.7, tcp.7, udp.7, unicode.7, user_namespaces.7, utf-8.7, zdump.8, zic.8: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-03-06 15:12:10 +01:00
Michael Kerrisk 4a5a783d8f prctl.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-11-24 20:54:48 +01:00
Michael Kerrisk a32c96b894 prctl.2: Explain the circumstances in which the parent-death signal is sent
To test the behavior documented by this patch, the following
demos employ the program shown at the foot of this commit message.

First, show that the pdeath signal is sent when the parent
terminates:

$ ./pdeath_signal 0 10 4
Parent (18595) about to sleep for 4 seconds
Child about to set PR_SET_PDEATHSIG
Child about to sleep
Parent (18595) terminating
*********** Child (18596) got signal; si_pid = 18595; si_uid = 1000
            Parent PID is now 1403
$ Child about to exit

But the signal is not sent if the parent terminates before the
child uses PR_SET_PDEATHSIG:

$ ./pdeath_signal 2 10  0
Parent (18707) about to sleep for 0 seconds
Parent (18707) terminating
Child about to sleep 2 seconds before setting PR_SET_PDEATHSIG
$ Child about to set PR_SET_PDEATHSIG
Child about to sleep
Child about to exit

Demonstrate that the pdeath signal is sent on termination of each
ancestor subreaper process:

$ ./pdeath_signal 2 10 3 7 6 5
18786 marked itself as a subreaper
18786 subreaper about to sleep 7 seconds
18787 marked itself as a subreaper
18787 subreaper about to sleep 6 seconds
18788 marked itself as a subreaper
18788 subreaper about to sleep 5 seconds
Parent (18789) about to sleep for 3 seconds
Child about to sleep 2 seconds before setting PR_SET_PDEATHSIG
Child about to set PR_SET_PDEATHSIG
Child about to sleep
Parent (18789) terminating
*********** Child (18790) got signal; si_pid = 18789; si_uid = 1000
            Parent PID is now 18788
18788 subreaper about to terminate
*********** Child (18790) got signal; si_pid = 18788; si_uid = 1000
            Parent PID is now 18787
18787 subreaper about to terminate
*********** Child (18790) got signal; si_pid = 18787; si_uid = 1000
            Parent PID is now 18786
18786 subreaper about to terminate
*********** Child (18790) got signal; si_pid = 18786; si_uid = 1000
            Parent PID is now 1403
$ Child about to exit

But in the case where some subreapers terminate before they
have a chance to adopt the child, the terminations of those
subreapers do not result in a signal for the child:

$ ./pdeath_signal 2 10 3 5 6 7
18836 marked itself as a subreaper
18836 subreaper about to sleep 5 seconds
18837 marked itself as a subreaper
18837 subreaper about to sleep 6 seconds
18838 marked itself as a subreaper
18838 subreaper about to sleep 7 seconds
Parent (18839) about to sleep for 3 seconds
Child about to sleep 2 seconds before setting PR_SET_PDEATHSIG
Child about to set PR_SET_PDEATHSIG
Child about to sleep
Parent (18839) terminating
*********** Child (18840) got signal; si_pid = 18839; si_uid = 1000
            Parent PID is now 18838
18836 subreaper about to terminate
$ 18837 subreaper about to terminate
18838 subreaper about to terminate
*********** Child (18840) got signal; si_pid = 18838; si_uid = 1000
            Parent PID is now 1403
Child about to exit

============================

/* pdeath_signal.c */

                        } while (0)

static void
handler(int sig, siginfo_t *si, void *ucontext)
{
    printf("*********** Child (%ld) got signal; si_pid = %d; si_uid = %d\n",
            (long) getpid(), si->si_pid, si->si_uid);
    printf("            Parent PID is now %ld\n", (long) getppid());
}

int
main(int argc, char *argv[])
{
    struct sigaction sa;
    int childPreSleep, childPostSleep, parentSleep;

    if (argc < 2) {
        fprintf(stderr, "Usage: %s child-pre-sleep "
                "[child-post-sleep [parent-sleep [subreaper-sleep...]]]\n",
                argv[0]);
        exit(EXIT_FAILURE);
    }

    childPreSleep = atoi(argv[1]);
    if (argc > 2)
        childPostSleep = atoi(argv[2]);
    if (argc > 3)
        parentSleep = atoi(argv[3]);

    /* Optionally create a series of subreapers */

    if (argc > 4) {
        for (int sr = 4; sr < argc; sr++) {
            if (prctl(PR_SET_CHILD_SUBREAPER, 1) == -1)
                errExit("prctl");
            printf("%ld marked itself as a subreaper\n", (long) getpid());
            switch (fork()) {
            case -1:
                errExit("fork");
            case 0:
                break;
            default:
                printf("%ld subreaper about to sleep %s seconds\n",
                        (long) getpid(), argv[sr]);
                sleep(atoi(argv[sr]));
                printf("%ld subreaper about to terminate\n", (long) getpid());
                exit(EXIT_SUCCESS);
            }
        }
    }

    switch (fork()) {
    case -1:
        errExit("fork");

    case 0:
        sa.sa_flags = SA_SIGINFO;
        sigemptyset(&sa.sa_mask);
        sa.sa_sigaction = handler;
        if (sigaction(SIGUSR1, &sa, NULL) == -1)
            errExit("sigaction");

        if (childPreSleep > 0) {
            printf("Child about to sleep %d seconds before setting "
                    "PR_SET_PDEATHSIG\n", childPreSleep);
            sleep(childPreSleep);
        }

        printf("Child about to set PR_SET_PDEATHSIG\n");
        if (prctl(PR_SET_PDEATHSIG, SIGUSR1) == -1)
            errExit("prctl");

        printf("Child about to sleep\n");
        for (int j = 0; j < childPostSleep; j++)
            sleep(1);

        printf("Child about to exit\n");
        exit(EXIT_SUCCESS);

    default:
        printf("Parent (%ld) about to sleep for %d seconds\n",
                (long) getpid(), parentSleep);
        sleep(parentSleep);
        printf("Parent (%ld) terminating\n", (long) getpid());
        exit(EXIT_SUCCESS);
    }
}

Reported-by: Jann Horn <jann@thejh.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-11-24 13:00:52 +01:00
Michael Kerrisk 29b249db56 prctl.2: tfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-11-24 12:44:27 +01:00
Michael Kerrisk fdda93639e prctl.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-11-24 11:25:28 +01:00
Michael Kerrisk e256205a55 prctl.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-11-24 11:23:55 +01:00
Michael Kerrisk 300a9c78f3 prctl.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-11-24 11:22:47 +01:00
Michael Kerrisk a09b5995c3 prctl.2: Add additional info on PR_SET_PDEATHSIG
The signal is process directed and the siginfo_t->si_pid
filed contains the PID of the terminating parent.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-11-24 11:20:09 +01:00
Michael Kerrisk 910b068989 prctl.2: Rework the PR_SET_PDEATHSIG description a little, for easier readability
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-11-24 10:47:21 +01:00
Michael Kerrisk c5236575ca prctl.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-11-24 10:38:07 +01:00
Michael Kerrisk d6bec36eca clone.2, prctl.2, st.4, proc.5: Change references to '2.6.0-test*' series kernels to just '2.6.0'
The extra detail has little of noting with -test 2.6.0
added a particular feature has little value these days,
and is likely to confuse some readers who don't know
(and probably don't care) about the historical details.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-11-19 13:09:55 +01:00
Michael Kerrisk cf0866501d prctl.2: Note libcap(3) APIs for operating on ambient capability set
(However, the libcap APIs do not yet seem to have
manual pages...)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-11-16 21:45:10 +01:00
Michael Kerrisk d9a0d1d7b7 prctl.2: Mention libcap APIs for operating on capability bounding set
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-11-16 21:32:45 +01:00
Michael Kerrisk 642df17c43 prctl.2: Add some further historical details on PR_SET_MM_EXE_FILE
Also some minor tweaks to Benjamin Peterson's patch.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-11-05 08:29:13 +01:00
Benjamin Peterson 47bc9cec30 prctl.2: PR_SET_MM_EXE_FILE may now be used as many times as desired
The original implementation of PR_SET_MM_EXE_FILE only allowed it
to be used once in a process's lifetime. This restriction was
lifted in Linux commit 3fb4afd9a504c2386b8435028d43283216bf588e
("prctl: remove one-shot limitation for changing exe link").

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-11-05 08:15:12 +01:00
Michael Kerrisk d2eeb68f0b prctl.2: wfix: Remove a redundant sentence
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-11-05 08:14:44 +01:00
Michael Kerrisk dd08fccaae prctl.2: Add kernel version for PR_GET_SPECULATION_CTRL + PR_SET_SPECULATION_CTRL
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-28 13:52:41 +02:00
Michael Kerrisk a01c1cbcc3 prctl.2: Various fixups to Konrad Rzeszutek Wilk's text
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-28 13:50:07 +02:00
Michael Kerrisk 2feab5d3b1 prctl.2: Minor fixups
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-28 12:57:30 +02:00
Michael Kerrisk ac3756bc53 prctl.2: srcfix: rewrap source lines
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-28 12:57:30 +02:00
Michael Kerrisk e36dfb8186 prctl.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-28 12:57:30 +02:00
Konrad Rzeszutek Wilk e23acd79f9 prctl.2: Document PR_SET_SPECULATION_CTRL and PR_GET_SPECULATION_CTRL
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-05-28 11:59:26 +02:00
Michael Kerrisk 8538a62b4c iconv.1, bpf.2, copy_file_range.2, fcntl.2, memfd_create.2, mlock.2, mount.2, mprotect.2, perf_event_open.2, pkey_alloc.2, prctl.2, read.2, recvmmsg.2, s390_sthyi.2, seccomp.2, sendmmsg.2, syscalls.2, unshare.2, write.2, errno.3, fgetpwent.3, fts.3, pthread_rwlockattr_setkind_np.3, fuse.4, veth.4, capabilities.7, cgroups.7, ip.7, man-pages.7, namespaces.7, network_namespaces.7, sched.7, socket.7, user_namespaces.7, iconvconfig.8: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2018-02-02 07:38:54 +01:00
Michael Kerrisk ae16c99d97 prctl.2: wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-12-02 16:23:00 +01:00
Michael Kerrisk 0336144833 prctl.2: Defer to capabilities(7) for discussion of the "keep capabilities" flag
It makes no sense to describe this flag in two different
manual pages, so consolidate the description to one page.
Furthermore, the following statement that was in the prctl(2)
page is not correct:

    A thread's effective capability set is always cleared
    when such a credential change is made, regardless of
    the setting of the "keep capabilities" flag.

The effective set is not cleared if, for example, the
credential sets were [ruid != 0, euid != 0, suid == 0]
and suid is switched to zero while the "keep capabilities"
flag is set.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-12-02 16:21:13 +01:00
Michael Kerrisk a23d8efafc capget.2, fanotify_init.2, fcntl.2, ioctl_tty.2, madvise.2, mbind.2, prctl.2, sched_setaffinity.2, hash.3, isgreater.3, posix_fallocate.3, sigvec.3, full.4, sd.4, wavelan.4, core.5, host.conf.5, epoll.7, signal.7, unix.7, user_namespaces.7: wfix (will fail --> fail/fails)
Reported-by: Pedro Alves <palves@redhat.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-10-20 16:36:57 +02:00