2004-11-03 13:51:07 +00:00
|
|
|
.\" Copyright (C) 1998 Andries Brouwer (aeb@cwi.nl)
|
2020-06-26 11:42:48 +00:00
|
|
|
.\" and Copyright (C) 2002, 2006, 2008, 2012, 2013, 2015 Michael Kerrisk <mtk.manpages@gmail.com>
|
2007-06-02 08:19:44 +00:00
|
|
|
.\" and Copyright Guillem Jover <guillem@hadrons.org>
|
2020-06-26 11:42:48 +00:00
|
|
|
.\" and Copyright (C) 2010 Andi Kleen <andi@firstfloor.org>
|
|
|
|
.\" and Copyright (C) 2012 Cyrill Gorcunov <gorcunov@openvz.org>
|
2015-01-10 14:15:03 +00:00
|
|
|
.\" and Copyright (C) 2014 Dave Hansen / Intel
|
2020-06-26 11:42:48 +00:00
|
|
|
.\" and Copyright (c) 2016 Eugene Syromyatnikov <evgsyr@gmail.com>
|
|
|
|
.\" and Copyright (c) 2018 Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
|
2020-06-26 11:21:15 +00:00
|
|
|
.\" and Copyright (c) 2020 Dave Martin <Dave.Martin@arm.com>
|
2004-11-03 13:51:07 +00:00
|
|
|
.\"
|
intro.1, _exit.2, access.2, alarm.2, alloc_hugepages.2, arch_prctl.2, bind.2, chdir.2, chmod.2, chown.2, chroot.2, clock_getres.2, clock_nanosleep.2, close.2, connect.2, delete_module.2, dup.2, execve.2, exit_group.2, faccessat.2, fchmodat.2, fchownat.2, fcntl.2, fork.2, fstatat.2, fsync.2, futimesat.2, get_robust_list.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getpagesize.2, getpid.2, getresuid.2, getrlimit.2, getrusage.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, idle.2, init_module.2, intro.2, iopl.2, kcmp.2, kexec_load.2, kill.2, link.2, linkat.2, llseek.2, lookup_dcookie.2, madvise.2, mincore.2, mkdirat.2, mknodat.2, mmap.2, mmap2.2, mount.2, mprotect.2, mq_getsetattr.2, msgctl.2, msgget.2, msgop.2, msync.2, nice.2, open.2, openat.2, pause.2, perfmonctl.2, personality.2, pipe.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, quotactl.2, read.2, readahead.2, readdir.2, readlinkat.2, readv.2, reboot.2, recvmmsg.2, remap_file_pages.2, rename.2, renameat.2, rmdir.2, rt_sigqueueinfo.2, select.2, select_tut.2, semctl.2, semget.2, semop.2, sendmmsg.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setresuid.2, setuid.2, setup.2, sgetmask.2, shmctl.2, shmget.2, shmop.2, sigaction.2, sigaltstack.2, signal.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, splice.2, stat.2, statfs.2, stime.2, subpage_prot.2, swapon.2, symlink.2, symlinkat.2, sync.2, sync_file_range.2, syscalls.2, sysctl.2, sysfs.2, syslog.2, tee.2, time.2, timer_create.2, timer_delete.2, timer_getoverrun.2, timer_settime.2, times.2, tkill.2, umask.2, umount.2, uname.2, unlink.2, unlinkat.2, uselib.2, ustat.2, utime.2, utimensat.2, vfork.2, vhangup.2, vm86.2, vmsplice.2, wait.2, wait4.2, write.2, CPU_SET.3, INFINITY.3, abort.3, abs.3, acos.3, acosh.3, adjtime.3, aio_init.3, asin.3, asinh.3, asprintf.3, assert.3, assert_perror.3, atan.3, atan2.3, atanh.3, atexit.3, atof.3, atoi.3, basename.3, bcmp.3, bcopy.3, bindresvport.3, bsd_signal.3, bsearch.3, bstring.3, byteorder.3, bzero.3, catgets.3, catopen.3, cbrt.3, ceil.3, clearenv.3, clock.3, clock_getcpuclockid.3, closedir.3, confstr.3, copysign.3, cos.3, cosh.3, ctermid.3, ctime.3, difftime.3, dirfd.3, div.3, dl_iterate_phdr.3, dprintf.3, drand48.3, drand48_r.3, dysize.3, ecvt.3, ecvt_r.3, end.3, endian.3, erf.3, erfc.3, ether_aton.3, euidaccess.3, exit.3, exp.3, exp10.3, exp2.3, expm1.3, fabs.3, fcloseall.3, fexecve.3, ffs.3, fgetgrent.3, fgetpwent.3, finite.3, flockfile.3, floor.3, fmod.3, fnmatch.3, fopencookie.3, fpathconf.3, fpurge.3, frexp.3, fseeko.3, ftok.3, futimes.3, gcvt.3, get_nprocs_conf.3, getaddrinfo.3, getaddrinfo_a.3, getauxval.3, getcontext.3, getcwd.3, getdate.3, getdirentries.3, getdtablesize.3, getenv.3, getfsent.3, getgrent.3, getgrnam.3, getgrouplist.3, gethostbyname.3, gethostid.3, getifaddrs.3, getipnodebyname.3, getline.3, getlogin.3, getmntent.3, getnetent.3, getnetent_r.3, getopt.3, getprotoent.3, getprotoent_r.3, getpw.3, getpwent.3, getpwnam.3, getrpcent_r.3, gets.3, getservent.3, getservent_r.3, getumask.3, getusershell.3, getutmp.3, getw.3, glob.3, gnu_get_libc_version.3, gsignal.3, hypot.3, if_nameindex.3, if_nametoindex.3, ilogb.3, index.3, inet.3, inet_ntop.3, inet_pton.3, infnan.3, initgroups.3, insque.3, intro.3, isalpha.3, isatty.3, j0.3, ldexp.3, localeconv.3, log.3, log10.3, log1p.3, log2.3, logb.3, lrint.3, lround.3, lsearch.3, lseek64.3, makecontext.3, makedev.3, mallinfo.3, malloc.3, malloc_get_state.3, malloc_info.3, malloc_stats.3, malloc_trim.3, malloc_usable_size.3, mallopt.3, matherr.3, mcheck.3, memccpy.3, memchr.3, memcmp.3, memcpy.3, memfrob.3, memmem.3, memmove.3, memset.3, mkdtemp.3, mkfifo.3, mkfifoat.3, mkstemp.3, mktemp.3, modf.3, mq_close.3, mq_getattr.3, mq_notify.3, mq_open.3, mq_receive.3, mq_send.3, mq_unlink.3, mtrace.3, on_exit.3, opendir.3, posix_fallocate.3, posix_memalign.3, posix_openpt.3, pow.3, pow10.3, profil.3, psignal.3, pthread_attr_init.3, pthread_attr_setaffinity_np.3, pthread_attr_setdetachstate.3, pthread_attr_setguardsize.3, pthread_attr_setinheritsched.3, pthread_attr_setschedparam.3, pthread_attr_setschedpolicy.3, pthread_attr_setscope.3, pthread_attr_setstack.3, pthread_attr_setstackaddr.3, pthread_attr_setstacksize.3, pthread_cancel.3, pthread_cleanup_push.3, pthread_cleanup_push_defer_np.3, pthread_create.3, pthread_detach.3, pthread_equal.3, pthread_exit.3, pthread_getattr_np.3, pthread_getcpuclockid.3, pthread_join.3, pthread_kill.3, pthread_kill_other_threads_np.3, pthread_self.3, pthread_setaffinity_np.3, pthread_setcancelstate.3, pthread_setconcurrency.3, pthread_setname_np.3, pthread_setschedparam.3, pthread_setschedprio.3, pthread_sigmask.3, pthread_sigqueue.3, pthread_testcancel.3, pthread_tryjoin_np.3, pthread_yield.3, putenv.3, putpwent.3, puts.3, qecvt.3, qsort.3, raise.3, rand.3, random.3, random_r.3, re_comp.3, readdir.3, realpath.3, regex.3, remainder.3, remove.3, resolver.3, rewinddir.3, rint.3, round.3, scalb.3, scalbln.3, scandir.3, sched_getcpu.3, seekdir.3, sem_close.3, sem_destroy.3, sem_getvalue.3, sem_init.3, sem_open.3, sem_post.3, sem_unlink.3, sem_wait.3, setenv.3, setlocale.3, setlogmask.3, shm_open.3, siginterrupt.3, sigpause.3, sigqueue.3, sigset.3, sigsetops.3, sigvec.3, sigwait.3, sin.3, sinh.3, sleep.3, sockatmark.3, sqrt.3, statvfs.3, stdio_ext.3, stpcpy.3, strcasecmp.3, strcat.3, strchr.3, strcmp.3, strcoll.3, strcpy.3, strdup.3, strerror.3, strfry.3, strftime.3, string.3, strlen.3, strpbrk.3, strptime.3, strsep.3, strsignal.3, strspn.3, strstr.3, strtok.3, strtol.3, strtoul.3, strverscmp.3, strxfrm.3, swab.3, sysconf.3, syslog.3, system.3, sysv_signal.3, tan.3, tanh.3, tcgetpgrp.3, tcgetsid.3, telldir.3, tempnam.3, timegm.3, timeradd.3, tmpfile.3, tmpnam.3, toascii.3, toupper.3, trunc.3, tsearch.3, ttyslot.3, tzset.3, ulimit.3, undocumented.3, unlocked_stdio.3, usleep.3, y0.3, cpuid.4, full.4, initrd.4, mouse.4, msr.4, sd.4, st.4, acct.5, core.5, services.5, slabinfo.5, aio.7, capabilities.7, credentials.7, feature_test_macros.7, hier.7, inotify.7, libc.7, locale.7, man-pages.7, man.7, math_error.7, mq_overview.7, numa.7, path_resolution.7, pipe.7, pthreads.7, pty.7, rtld-audit.7, sem_overview.7, shm_overview.7, sigevent.7, signal.7, suffixes.7, svipc.7, termio.7, time.7, udplite.7, units.7, uri.7, sln.8: s/LICENSE_START(verbatim)/LICENSE_START(VERBATIM)/
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2013-03-10 09:29:01 +00:00
|
|
|
.\" %%%LICENSE_START(VERBATIM)
|
2004-11-03 13:51:07 +00:00
|
|
|
.\" Permission is granted to make and distribute verbatim copies of this
|
|
|
|
.\" manual provided the copyright notice and this permission notice are
|
|
|
|
.\" preserved on all copies.
|
|
|
|
.\"
|
|
|
|
.\" Permission is granted to copy and distribute modified versions of this
|
|
|
|
.\" manual under the conditions for verbatim copying, provided that the
|
|
|
|
.\" entire resulting derived work is distributed under the terms of a
|
|
|
|
.\" permission notice identical to this one.
|
2007-04-12 22:42:49 +00:00
|
|
|
.\"
|
2004-11-03 13:51:07 +00:00
|
|
|
.\" Since the Linux kernel and libraries are constantly changing, this
|
|
|
|
.\" manual page may be incorrect or out-of-date. The author(s) assume no
|
|
|
|
.\" responsibility for errors or omissions, or for damages resulting from
|
|
|
|
.\" the use of the information contained herein. The author(s) may not
|
|
|
|
.\" have taken the same level of care in the production of this manual,
|
|
|
|
.\" which is licensed free of charge, as they might when working
|
|
|
|
.\" professionally.
|
2007-04-12 22:42:49 +00:00
|
|
|
.\"
|
2004-11-03 13:51:07 +00:00
|
|
|
.\" Formatted or processed versions of this manual, if unaccompanied by
|
|
|
|
.\" the source, must acknowledge the copyright and authors of this work.
|
intro.1, _exit.2, access.2, alarm.2, alloc_hugepages.2, arch_prctl.2, bind.2, chdir.2, chmod.2, chown.2, chroot.2, clock_getres.2, clock_nanosleep.2, close.2, connect.2, delete_module.2, dup.2, execve.2, exit_group.2, faccessat.2, fchmodat.2, fchownat.2, fcntl.2, fork.2, fstatat.2, fsync.2, futimesat.2, get_robust_list.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getpagesize.2, getpid.2, getresuid.2, getrlimit.2, getrusage.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, idle.2, init_module.2, intro.2, iopl.2, kcmp.2, kexec_load.2, kill.2, link.2, linkat.2, llseek.2, lookup_dcookie.2, madvise.2, mincore.2, mkdirat.2, mknodat.2, mmap.2, mmap2.2, mount.2, mprotect.2, mq_getsetattr.2, msgctl.2, msgget.2, msgop.2, msync.2, nice.2, open.2, openat.2, pause.2, perfmonctl.2, personality.2, pipe.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, quotactl.2, read.2, readahead.2, readdir.2, readlinkat.2, readv.2, reboot.2, recvmmsg.2, remap_file_pages.2, rename.2, renameat.2, rmdir.2, rt_sigqueueinfo.2, select.2, select_tut.2, semctl.2, semget.2, semop.2, sendmmsg.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setresuid.2, setuid.2, setup.2, sgetmask.2, shmctl.2, shmget.2, shmop.2, sigaction.2, sigaltstack.2, signal.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, splice.2, stat.2, statfs.2, stime.2, subpage_prot.2, swapon.2, symlink.2, symlinkat.2, sync.2, sync_file_range.2, syscalls.2, sysctl.2, sysfs.2, syslog.2, tee.2, time.2, timer_create.2, timer_delete.2, timer_getoverrun.2, timer_settime.2, times.2, tkill.2, umask.2, umount.2, uname.2, unlink.2, unlinkat.2, uselib.2, ustat.2, utime.2, utimensat.2, vfork.2, vhangup.2, vm86.2, vmsplice.2, wait.2, wait4.2, write.2, CPU_SET.3, INFINITY.3, abort.3, abs.3, acos.3, acosh.3, adjtime.3, aio_init.3, asin.3, asinh.3, asprintf.3, assert.3, assert_perror.3, atan.3, atan2.3, atanh.3, atexit.3, atof.3, atoi.3, basename.3, bcmp.3, bcopy.3, bindresvport.3, bsd_signal.3, bsearch.3, bstring.3, byteorder.3, bzero.3, catgets.3, catopen.3, cbrt.3, ceil.3, clearenv.3, clock.3, clock_getcpuclockid.3, closedir.3, confstr.3, copysign.3, cos.3, cosh.3, ctermid.3, ctime.3, difftime.3, dirfd.3, div.3, dl_iterate_phdr.3, dprintf.3, drand48.3, drand48_r.3, dysize.3, ecvt.3, ecvt_r.3, end.3, endian.3, erf.3, erfc.3, ether_aton.3, euidaccess.3, exit.3, exp.3, exp10.3, exp2.3, expm1.3, fabs.3, fcloseall.3, fexecve.3, ffs.3, fgetgrent.3, fgetpwent.3, finite.3, flockfile.3, floor.3, fmod.3, fnmatch.3, fopencookie.3, fpathconf.3, fpurge.3, frexp.3, fseeko.3, ftok.3, futimes.3, gcvt.3, get_nprocs_conf.3, getaddrinfo.3, getaddrinfo_a.3, getauxval.3, getcontext.3, getcwd.3, getdate.3, getdirentries.3, getdtablesize.3, getenv.3, getfsent.3, getgrent.3, getgrnam.3, getgrouplist.3, gethostbyname.3, gethostid.3, getifaddrs.3, getipnodebyname.3, getline.3, getlogin.3, getmntent.3, getnetent.3, getnetent_r.3, getopt.3, getprotoent.3, getprotoent_r.3, getpw.3, getpwent.3, getpwnam.3, getrpcent_r.3, gets.3, getservent.3, getservent_r.3, getumask.3, getusershell.3, getutmp.3, getw.3, glob.3, gnu_get_libc_version.3, gsignal.3, hypot.3, if_nameindex.3, if_nametoindex.3, ilogb.3, index.3, inet.3, inet_ntop.3, inet_pton.3, infnan.3, initgroups.3, insque.3, intro.3, isalpha.3, isatty.3, j0.3, ldexp.3, localeconv.3, log.3, log10.3, log1p.3, log2.3, logb.3, lrint.3, lround.3, lsearch.3, lseek64.3, makecontext.3, makedev.3, mallinfo.3, malloc.3, malloc_get_state.3, malloc_info.3, malloc_stats.3, malloc_trim.3, malloc_usable_size.3, mallopt.3, matherr.3, mcheck.3, memccpy.3, memchr.3, memcmp.3, memcpy.3, memfrob.3, memmem.3, memmove.3, memset.3, mkdtemp.3, mkfifo.3, mkfifoat.3, mkstemp.3, mktemp.3, modf.3, mq_close.3, mq_getattr.3, mq_notify.3, mq_open.3, mq_receive.3, mq_send.3, mq_unlink.3, mtrace.3, on_exit.3, opendir.3, posix_fallocate.3, posix_memalign.3, posix_openpt.3, pow.3, pow10.3, profil.3, psignal.3, pthread_attr_init.3, pthread_attr_setaffinity_np.3, pthread_attr_setdetachstate.3, pthread_attr_setguardsize.3, pthread_attr_setinheritsched.3, pthread_attr_setschedparam.3, pthread_attr_setschedpolicy.3, pthread_attr_setscope.3, pthread_attr_setstack.3, pthread_attr_setstackaddr.3, pthread_attr_setstacksize.3, pthread_cancel.3, pthread_cleanup_push.3, pthread_cleanup_push_defer_np.3, pthread_create.3, pthread_detach.3, pthread_equal.3, pthread_exit.3, pthread_getattr_np.3, pthread_getcpuclockid.3, pthread_join.3, pthread_kill.3, pthread_kill_other_threads_np.3, pthread_self.3, pthread_setaffinity_np.3, pthread_setcancelstate.3, pthread_setconcurrency.3, pthread_setname_np.3, pthread_setschedparam.3, pthread_setschedprio.3, pthread_sigmask.3, pthread_sigqueue.3, pthread_testcancel.3, pthread_tryjoin_np.3, pthread_yield.3, putenv.3, putpwent.3, puts.3, qecvt.3, qsort.3, raise.3, rand.3, random.3, random_r.3, re_comp.3, readdir.3, realpath.3, regex.3, remainder.3, remove.3, resolver.3, rewinddir.3, rint.3, round.3, scalb.3, scalbln.3, scandir.3, sched_getcpu.3, seekdir.3, sem_close.3, sem_destroy.3, sem_getvalue.3, sem_init.3, sem_open.3, sem_post.3, sem_unlink.3, sem_wait.3, setenv.3, setlocale.3, setlogmask.3, shm_open.3, siginterrupt.3, sigpause.3, sigqueue.3, sigset.3, sigsetops.3, sigvec.3, sigwait.3, sin.3, sinh.3, sleep.3, sockatmark.3, sqrt.3, statvfs.3, stdio_ext.3, stpcpy.3, strcasecmp.3, strcat.3, strchr.3, strcmp.3, strcoll.3, strcpy.3, strdup.3, strerror.3, strfry.3, strftime.3, string.3, strlen.3, strpbrk.3, strptime.3, strsep.3, strsignal.3, strspn.3, strstr.3, strtok.3, strtol.3, strtoul.3, strverscmp.3, strxfrm.3, swab.3, sysconf.3, syslog.3, system.3, sysv_signal.3, tan.3, tanh.3, tcgetpgrp.3, tcgetsid.3, telldir.3, tempnam.3, timegm.3, timeradd.3, tmpfile.3, tmpnam.3, toascii.3, toupper.3, trunc.3, tsearch.3, ttyslot.3, tzset.3, ulimit.3, undocumented.3, unlocked_stdio.3, usleep.3, y0.3, cpuid.4, full.4, initrd.4, mouse.4, msr.4, sd.4, st.4, acct.5, core.5, services.5, slabinfo.5, aio.7, capabilities.7, credentials.7, feature_test_macros.7, hier.7, inotify.7, libc.7, locale.7, man-pages.7, man.7, math_error.7, mq_overview.7, numa.7, path_resolution.7, pipe.7, pthreads.7, pty.7, rtld-audit.7, sem_overview.7, shm_overview.7, sigevent.7, signal.7, suffixes.7, svipc.7, termio.7, time.7, udplite.7, units.7, uri.7, sln.8: Global fix: Add LICENSE_START(verbatim)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2013-03-10 09:28:40 +00:00
|
|
|
.\" %%%LICENSE_END
|
2004-11-03 13:51:07 +00:00
|
|
|
.\"
|
|
|
|
.\" Modified Thu Nov 11 04:19:42 MET 1999, aeb: added PR_GET_PDEATHSIG
|
|
|
|
.\" Modified 27 Jun 02, Michael Kerrisk
|
2007-04-12 22:42:49 +00:00
|
|
|
.\" Added PR_SET_DUMPABLE, PR_GET_DUMPABLE,
|
2004-11-03 13:51:07 +00:00
|
|
|
.\" PR_SET_KEEPCAPS, PR_GET_KEEPCAPS
|
2006-09-26 12:03:11 +00:00
|
|
|
.\" Modified 2006-08-30 Guillem Jover <guillem@hadrons.org>
|
|
|
|
.\" Updated Linux versions where the options where introduced.
|
|
|
|
.\" Added PR_SET_TIMING, PR_GET_TIMING, PR_SET_NAME, PR_GET_NAME,
|
|
|
|
.\" PR_SET_UNALIGN, PR_GET_UNALIGN, PR_SET_FPEMU, PR_GET_FPEMU,
|
|
|
|
.\" PR_SET_FPEXC, PR_GET_FPEXC
|
2008-07-09 11:53:48 +00:00
|
|
|
.\" 2008-04-29 Serge Hallyn, Document PR_CAPBSET_READ and PR_CAPBSET_DROP
|
|
|
|
.\" 2008-06-13 Erik Bosman, <ejbosman@cs.vu.nl>
|
|
|
|
.\" Document PR_GET_TSC and PR_SET_TSC.
|
|
|
|
.\" 2008-06-15 mtk, Document PR_SET_SECCOMP, PR_GET_SECCOMP
|
2012-04-24 20:04:11 +00:00
|
|
|
.\" 2009-10-03 Andi Kleen, document PR_MCE_KILL
|
2012-04-24 16:38:04 +00:00
|
|
|
.\" 2012-04 Cyrill Gorcunov, Document PR_SET_MM
|
2012-04-24 20:04:11 +00:00
|
|
|
.\" 2012-04-25 Michael Kerrisk, Document PR_TASK_PERF_EVENTS_DISABLE and
|
|
|
|
.\" PR_TASK_PERF_EVENTS_ENABLE
|
2012-10-22 04:28:15 +00:00
|
|
|
.\" 2012-09-20 Kees Cook, update PR_SET_SECCOMP for mode 2
|
2012-10-22 07:13:08 +00:00
|
|
|
.\" 2012-09-20 Kees Cook, document PR_SET_NO_NEW_PRIVS, PR_GET_NO_NEW_PRIVS
|
2012-10-25 14:42:13 +00:00
|
|
|
.\" 2012-10-25 Michael Kerrisk, Document PR_SET_TIMERSLACK and
|
|
|
|
.\" PR_GET_TIMERSLACK
|
2013-01-10 22:54:12 +00:00
|
|
|
.\" 2013-01-10 Kees Cook, document PR_SET_PTRACER
|
2016-06-17 21:15:07 +00:00
|
|
|
.\" 2012-02-04 Michael Kerrisk, document PR_{SET,GET}_CHILD_SUBREAPER
|
2015-01-10 14:03:47 +00:00
|
|
|
.\" 2014-11-10 Dave Hansen, document PR_MPX_{EN,DIS}ABLE_MANAGEMENT
|
2004-11-03 13:51:07 +00:00
|
|
|
.\"
|
2010-06-27 04:54:10 +00:00
|
|
|
.\"
|
getent.1, ldd.1, locale.1, localedef.1, memusage.1, memusagestat.1, mtrace.1, _exit.2, _syscall.2, accept.2, access.2, acct.2, add_key.2, adjtimex.2, alloc_hugepages.2, arch_prctl.2, bdflush.2, bind.2, bpf.2, brk.2, cacheflush.2, capget.2, chdir.2, chmod.2, chown.2, chroot.2, clock_getres.2, clock_nanosleep.2, clone.2, close.2, close_range.2, connect.2, copy_file_range.2, create_module.2, delete_module.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, eventfd.2, execve.2, execveat.2, fanotify_init.2, fanotify_mark.2, fcntl.2, flock.2, fork.2, fsync.2, futex.2, get_kernel_syms.2, get_mempolicy.2, get_robust_list.2, getcpu.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getitimer.2, getpagesize.2, getpeername.2, getpid.2, getpriority.2, getrandom.2, getresuid.2, getrlimit.2, getrusage.2, getsid.2, getsockname.2, getsockopt.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, getxattr.2, idle.2, init_module.2, inotify_add_watch.2, inotify_rm_watch.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl.2, ioctl_console.2, ioctl_fat.2, ioctl_ficlonerange.2, ioctl_fideduperange.2, ioctl_fslabel.2, ioctl_getfsmap.2, ioctl_ns.2, ioctl_tty.2, ioctl_userfaultfd.2, ioperm.2, iopl.2, ipc.2, kcmp.2, kexec_load.2, keyctl.2, kill.2, link.2, listen.2, listxattr.2, llseek.2, lookup_dcookie.2, lseek.2, madvise.2, mbind.2, membarrier.2, memfd_create.2, migrate_pages.2, mincore.2, mkdir.2, mknod.2, mlock.2, mmap.2, mmap2.2, modify_ldt.2, mount.2, move_pages.2, mprotect.2, mq_getsetattr.2, mremap.2, msgctl.2, msgget.2, msgop.2, msync.2, nanosleep.2, nfsservctl.2, nice.2, open.2, open_by_handle_at.2, openat2.2, pause.2, pciconfig_read.2, perf_event_open.2, perfmonctl.2, personality.2, pidfd_getfd.2, pidfd_open.2, pidfd_send_signal.2, pipe.2, pivot_root.2, pkey_alloc.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, ptrace.2, query_module.2, quotactl.2, read.2, readahead.2, readdir.2, readlink.2, readv.2, reboot.2, recv.2, remap_file_pages.2, removexattr.2, rename.2, request_key.2, restart_syscall.2, rmdir.2, rt_sigqueueinfo.2, s390_guarded_storage.2, s390_pci_mmio_write.2, s390_runtime_instr.2, s390_sthyi.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setattr.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, seccomp.2, select.2, select_tut.2, semctl.2, semget.2, semop.2, send.2, sendfile.2, set_thread_area.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setpgid.2, setresuid.2, setreuid.2, setsid.2, setuid.2, setup.2, setxattr.2, sgetmask.2, shmctl.2, shmget.2, shmop.2, shutdown.2, sigaction.2, sigaltstack.2, signal.2, signalfd.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, socket.2, socketcall.2, socketpair.2, splice.2, spu_create.2, spu_run.2, stat.2, statfs.2, statx.2, stime.2, subpage_prot.2, swapon.2, symlink.2, sync.2, sync_file_range.2, syscall.2, syscalls.2, sysctl.2, sysfs.2, sysinfo.2, syslog.2, time.2, timer_create.2, timer_delete.2, timer_getoverrun.2, timer_settime.2, timerfd_create.2, times.2, tkill.2, truncate.2, umask.2, umount.2, uname.2, unimplemented.2, unlink.2, unshare.2, uselib.2, userfaultfd.2, ustat.2, utime.2, utimensat.2, vfork.2, vhangup.2, vm86.2, vmsplice.2, wait.2, wait4.2, write.2, CPU_SET.3, __ppc_get_timebase.3, __ppc_set_ppr_med.3, __ppc_yield.3, __setfpucw.3, a64l.3, abort.3, abs.3, acos.3, acosh.3, addseverity.3, adjtime.3, aio_cancel.3, aio_error.3, aio_fsync.3, aio_read.3, aio_return.3, aio_suspend.3, aio_write.3, alloca.3, argz_add.3, asin.3, asinh.3, asprintf.3, assert.3, assert_perror.3, atan.3, atan2.3, atanh.3, atexit.3, atof.3, atoi.3, backtrace.3, basename.3, bcmp.3, bcopy.3, bindresvport.3, bsd_signal.3, bsearch.3, bstring.3, btowc.3, byteorder.3, bzero.3, cabs.3, cacos.3, cacosh.3, canonicalize_file_name.3, carg.3, casin.3, casinh.3, catan.3, catanh.3, catgets.3, catopen.3, cbrt.3, ccos.3, ccosh.3, ceil.3, cexp.3, cexp2.3, cfree.3, cimag.3, circleq.3, clearenv.3, clock.3, clock_getcpuclockid.3, clog.3, clog10.3, clog2.3, closedir.3, cmsg.3, confstr.3, conj.3, copysign.3, cos.3, cosh.3, cpow.3, cproj.3, creal.3, crypt.3, csin.3, csinh.3, csqrt.3, ctan.3, ctanh.3, ctermid.3, ctime.3, daemon.3, des_crypt.3, difftime.3, dirfd.3, div.3, dl_iterate_phdr.3, dladdr.3, dlerror.3, dlinfo.3, dlopen.3, dlsym.3, drand48.3, drand48_r.3, duplocale.3, dysize.3, ecvt.3, ecvt_r.3, encrypt.3, endian.3, envz_add.3, erf.3, erfc.3, err.3, errno.3, error.3, ether_aton.3, euidaccess.3, exec.3, exit.3, exp.3, exp10.3, exp2.3, expm1.3, fabs.3, fclose.3, fcloseall.3, fdim.3, fenv.3, ferror.3, fexecve.3, fflush.3, ffs.3, fgetc.3, fgetgrent.3, fgetpwent.3, fgetwc.3, fgetws.3, fileno.3, finite.3, flockfile.3, floor.3, fma.3, fmax.3, fmemopen.3, fmin.3, fmod.3, fmtmsg.3, fnmatch.3, fopen.3, fopencookie.3, fpathconf.3, fpclassify.3, fpurge.3, fputwc.3, fputws.3, fread.3, frexp.3, fseek.3, fseeko.3, ftime.3, ftok.3, fts.3, ftw.3, futimes.3, fwide.3, gamma.3, gcvt.3, get_nprocs_conf.3, get_phys_pages.3, getaddrinfo.3, getaddrinfo_a.3, getauxval.3, getcontext.3, getcwd.3, getdate.3, getdirentries.3, getdtablesize.3, getentropy.3, getenv.3, getfsent.3, getgrent.3, getgrent_r.3, getgrnam.3, getgrouplist.3, gethostbyname.3, gethostid.3, getifaddrs.3, getipnodebyname.3, getline.3, getloadavg.3, getlogin.3, getmntent.3, getnameinfo.3, getnetent.3, getnetent_r.3, getopt.3, getpass.3, getprotoent.3, getprotoent_r.3, getpt.3, getpw.3, getpwent.3, getpwent_r.3, getpwnam.3, getrpcent.3, getrpcent_r.3, getrpcport.3, gets.3, getservent.3, getservent_r.3, getspnam.3, getsubopt.3, getttyent.3, getumask.3, getusershell.3, getutent.3, getutmp.3, getw.3, getwchar.3, glob.3, gnu_get_libc_version.3, grantpt.3, group_member.3, gsignal.3, hsearch.3, hypot.3, iconv.3, iconv_close.3, iconv_open.3, if_nameindex.3, if_nametoindex.3, ilogb.3, index.3, inet.3, inet_net_pton.3, inet_ntop.3, inet_pton.3, initgroups.3, insque.3, isalpha.3, isatty.3, isfdtype.3, isgreater.3, iswalnum.3, iswalpha.3, iswblank.3, iswcntrl.3, iswctype.3, iswdigit.3, iswgraph.3, iswlower.3, iswprint.3, iswpunct.3, iswspace.3, iswupper.3, iswxdigit.3, j0.3, key_setsecret.3, killpg.3, ldexp.3, lgamma.3, lio_listio.3, list.3, localeconv.3, lockf.3, log.3, log10.3, log1p.3, log2.3, logb.3, login.3, lrint.3, lround.3, lsearch.3, lseek64.3, makecontext.3, makedev.3, mallinfo.3, malloc.3, malloc_get_state.3, malloc_hook.3, malloc_info.3, malloc_stats.3, malloc_trim.3, malloc_usable_size.3, mallopt.3, matherr.3, mblen.3, mbrlen.3, mbrtowc.3, mbsinit.3, mbsnrtowcs.3, mbsrtowcs.3, mbstowcs.3, mbtowc.3, mcheck.3, memccpy.3, memchr.3, memcmp.3, memcpy.3, memfrob.3, memmem.3, memmove.3, mempcpy.3, memset.3, mkdtemp.3, mkfifo.3, mkstemp.3, mktemp.3, modf.3, mpool.3, mq_close.3, mq_getattr.3, mq_notify.3, mq_open.3, mq_receive.3, mq_send.3, mq_unlink.3, mtrace.3, nan.3, newlocale.3, nextafter.3, nextup.3, nl_langinfo.3, ntp_gettime.3, on_exit.3, open_memstream.3, opendir.3, openpty.3, perror.3, popen.3, posix_fallocate.3, posix_madvise.3, posix_memalign.3, posix_openpt.3, posix_spawn.3, pow.3, pow10.3, printf.3, profil.3, psignal.3, pthread_attr_init.3, pthread_attr_setaffinity_np.3, pthread_attr_setdetachstate.3, pthread_attr_setguardsize.3, pthread_attr_setinheritsched.3, pthread_attr_setschedparam.3, pthread_attr_setschedpolicy.3, pthread_attr_setscope.3, pthread_attr_setsigmask_np.3, pthread_attr_setstack.3, pthread_attr_setstackaddr.3, pthread_attr_setstacksize.3, pthread_cancel.3, pthread_cleanup_push.3, pthread_cleanup_push_defer_np.3, pthread_create.3, pthread_detach.3, pthread_equal.3, pthread_exit.3, pthread_getattr_default_np.3, pthread_getattr_np.3, pthread_getcpuclockid.3, pthread_join.3, pthread_kill.3, pthread_kill_other_threads_np.3, pthread_mutex_consistent.3, pthread_mutexattr_getpshared.3, pthread_mutexattr_setrobust.3, pthread_rwlockattr_setkind_np.3, pthread_self.3, pthread_setaffinity_np.3, pthread_setcancelstate.3, pthread_setconcurrency.3, pthread_setname_np.3, pthread_setschedparam.3, pthread_setschedprio.3, pthread_sigmask.3, pthread_sigqueue.3, pthread_spin_init.3, pthread_spin_lock.3, pthread_testcancel.3, pthread_tryjoin_np.3, pthread_yield.3, ptsname.3, putenv.3, putgrent.3, putpwent.3, puts.3, putwchar.3, qecvt.3, qsort.3, raise.3, rand.3, random.3, random_r.3, rcmd.3, re_comp.3, readdir.3, readdir_r.3, realpath.3, regex.3, remainder.3, remove.3, remquo.3, resolver.3, rewinddir.3, rexec.3, rint.3, round.3, rpc.3, rpmatch.3, rtime.3, rtnetlink.3, scalb.3, scalbln.3, scandir.3, scanf.3, sched_getcpu.3, seekdir.3, sem_close.3, sem_destroy.3, sem_getvalue.3, sem_init.3, sem_open.3, sem_post.3, sem_unlink.3, sem_wait.3, setaliasent.3, setbuf.3, setenv.3, setjmp.3, setlocale.3, setlogmask.3, setnetgrent.3, shm_open.3, siginterrupt.3, signbit.3, significand.3, sigpause.3, sigqueue.3, sigset.3, sigsetops.3, sigvec.3, sigwait.3, sin.3, sincos.3, sinh.3, sleep.3, slist.3, sockatmark.3, sqrt.3, stailq.3, statvfs.3, stdarg.3, stdio.3, stdio_ext.3, stpcpy.3, stpncpy.3, strcasecmp.3, strcat.3, strchr.3, strcmp.3, strcoll.3, strcpy.3, strdup.3, strerror.3, strfmon.3, strfromd.3, strfry.3, strftime.3, string.3, strlen.3, strnlen.3, strpbrk.3, strptime.3, strsep.3, strsignal.3, strspn.3, strstr.3, strtod.3, strtoimax.3, strtok.3, strtol.3, strtoul.3, strverscmp.3, strxfrm.3, swab.3, sysconf.3, syslog.3, system.3, sysv_signal.3, tailq.3, tan.3, tanh.3, tcgetpgrp.3, tcgetsid.3, telldir.3, tempnam.3, termios.3, tgamma.3, timegm.3, timeradd.3, tmpfile.3, tmpnam.3, toascii.3, toupper.3, towctrans.3, towlower.3, towupper.3, trunc.3, tsearch.3, ttyname.3, ttyslot.3, tzset.3, ualarm.3, ulimit.3, undocumented.3, ungetwc.3, unlocked_stdio.3, unlockpt.3, updwtmp.3, uselocale.3, usleep.3, wcpcpy.3, wcpncpy.3, wcrtomb.3, wcscasecmp.3, wcscat.3, wcschr.3, wcscmp.3, wcscpy.3, wcscspn.3, wcsdup.3, wcslen.3, wcsncasecmp.3, wcsncat.3, wcsncmp.3, wcsncpy.3, wcsnlen.3, wcsnrtombs.3, wcspbrk.3, wcsrchr.3, wcsrtombs.3, wcsspn.3, wcsstr.3, wcstoimax.3, wcstok.3, wcstombs.3, wcswidth.3, wctob.3, wctomb.3, wctrans.3, wctype.3, wcwidth.3, wmemchr.3, wmemcmp.3, wmemcpy.3, wmemmove.3, wmemset.3, wordexp.3, wprintf.3, xcrypt.3, xdr.3, y0.3, cciss.4, console_codes.4, dsp56k.4, hpsa.4, initrd.4, loop.4, lp.4, msr.4, random.4, rtc.4, smartpqi.4, veth.4, wavelan.4, acct.5, core.5, elf.5, hosts.5, locale.5, proc.5, resolv.conf.5, rpc.5, slabinfo.5, sysfs.5, tmpfs.5, utmp.5, address_families.7, aio.7, attributes.7, bootparam.7, capabilities.7, cgroups.7, complex.7, ddp.7, environ.7, epoll.7, fanotify.7, feature_test_macros.7, hier.7, inode.7, inotify.7, ip.7, ipv6.7, keyrings.7, locale.7, man-pages.7, man.7, math_error.7, mount_namespaces.7, namespaces.7, netdevice.7, netlink.7, numa.7, packet.7, pkeys.7, pthreads.7, queue.7, raw.7, rtnetlink.7, sched.7, session-keyring.7, shm_overview.7, sigevent.7, signal-safety.7, signal.7, sock_diag.7, socket.7, spufs.7, symlink.7, system_data_types.7, tcp.7, time_namespaces.7, udp.7, udplite.7, unicode.7, unix.7, uri.7, user_namespaces.7, vdso.7, vsock.7, x25.7, iconvconfig.8, ld.so.8, ldconfig.8, sln.8, tzselect.8: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2021-03-21 23:15:34 +00:00
|
|
|
.TH PRCTL 2 2021-03-22 "Linux" "Linux Programmer's Manual"
|
2004-11-03 13:51:07 +00:00
|
|
|
.SH NAME
|
2020-05-12 16:36:46 +00:00
|
|
|
prctl \- operations on a process or thread
|
2004-11-03 13:51:07 +00:00
|
|
|
.SH SYNOPSIS
|
2007-04-03 14:04:54 +00:00
|
|
|
.nf
|
2004-11-03 13:51:07 +00:00
|
|
|
.B #include <sys/prctl.h>
|
_exit.2, bpf.2, cacheflush.2, capget.2, chdir.2, chmod.2, chroot.2, clock_getres.2, clock_nanosleep.2, close.2, connect.2, create_module.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, eventfd.2, execve.2, execveat.2, exit_group.2, fanotify_mark.2, flock.2, fork.2, fsync.2, futex.2, futimesat.2, get_kernel_syms.2, get_mempolicy.2, get_robust_list.2, getcpu.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getitimer.2, getpagesize.2, getpeername.2, getpid.2, getpriority.2, getrandom.2, getresuid.2, getrlimit.2, getrusage.2, getsid.2, getsockname.2, getsockopt.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, getxattr.2, idle.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, ioctl.2, ioctl_fat.2, ioctl_ficlonerange.2, ioctl_fideduperange.2, ioctl_getfsmap.2, ioctl_tty.2, ioperm.2, iopl.2, keyctl.2, kill.2, link.2, listen.2, listxattr.2, llseek.2, lseek.2, madvise.2, mbind.2, membarrier.2, memfd_create.2, migrate_pages.2, mincore.2, mkdir.2, mknod.2, mlock.2, mmap.2, mmap2.2, modify_ldt.2, mount.2, move_pages.2, mprotect.2, mq_getsetattr.2, mremap.2, msgop.2, msync.2, nanosleep.2, nfsservctl.2, nice.2, pause.2, pciconfig_read.2, perf_event_open.2, perfmonctl.2, personality.2, pkey_alloc.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, ptrace.2, query_module.2, read.2, readahead.2, readdir.2, readv.2, reboot.2, recv.2, remap_file_pages.2, removexattr.2, rename.2, request_key.2, rmdir.2, rt_sigqueueinfo.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, select.2, select_tut.2, semctl.2, semget.2, semop.2, send.2, sendfile.2, set_mempolicy.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setns.2, setpgid.2, setresuid.2, setreuid.2, setsid.2, setuid.2, setup.2, setxattr.2, sgetmask.2, shmctl.2, shmget.2, shutdown.2, sigaction.2, sigaltstack.2, sigpending.2, sigprocmask.2, sigsuspend.2, sigwaitinfo.2, socket.2, socketcall.2, socketpair.2, stat.2, statfs.2, stime.2, swapon.2, symlink.2, sync.2, sysctl.2, sysinfo.2, syslog.2, time.2, timer_create.2, timer_delete.2, timer_getoverrun.2, timer_settime.2, timerfd_create.2, times.2, tkill.2, truncate.2, umask.2, umount.2, uname.2, unlink.2, unshare.2, uselib.2, userfaultfd.2, ustat.2, utime.2, utimensat.2, vfork.2, vhangup.2, vm86.2, wait.2, wait4.2, write.2, CPU_SET.3, INFINITY.3, __ppc_get_timebase.3, __ppc_set_ppr_med.3, __ppc_yield.3, __setfpucw.3, a64l.3, abort.3, abs.3, acos.3, acosh.3, addseverity.3, adjtime.3, aio_cancel.3, aio_error.3, aio_fsync.3, aio_init.3, aio_read.3, aio_return.3, aio_suspend.3, aio_write.3, alloca.3, argz_add.3, asin.3, asinh.3, asprintf.3, assert.3, assert_perror.3, atan.3, atan2.3, atanh.3, atexit.3, atof.3, atoi.3, basename.3, bcmp.3, bcopy.3, bsd_signal.3, bsearch.3, bstring.3, btowc.3, byteorder.3, cabs.3, cacos.3, cacosh.3, canonicalize_file_name.3, carg.3, casin.3, casinh.3, catan.3, catanh.3, catopen.3, cbrt.3, ccos.3, ccosh.3, ceil.3, cexp.3, cexp2.3, cfree.3, cimag.3, clearenv.3, clock.3, clock_getcpuclockid.3, clog.3, clog10.3, clog2.3, closedir.3, cmsg.3, confstr.3, conj.3, copysign.3, cos.3, cosh.3, cpow.3, cproj.3, creal.3, crypt.3, csin.3, csinh.3, csqrt.3, ctan.3, ctanh.3, ctermid.3, ctime.3, daemon.3, difftime.3, dirfd.3, div.3, dlerror.3, dlopen.3, dlsym.3, drand48.3, drand48_r.3, duplocale.3, dysize.3, ecvt.3, ecvt_r.3, encrypt.3, endian.3, erf.3, erfc.3, err.3, errno.3, ether_aton.3, euidaccess.3, exec.3, exit.3, exp.3, exp10.3, exp2.3, expm1.3, fabs.3, fclose.3, fcloseall.3, fdim.3, fenv.3, ferror.3, fexecve.3, fflush.3, ffs.3, fgetc.3, fgetgrent.3, fgetpwent.3, fgetwc.3, fgetws.3, finite.3, flockfile.3, floor.3, fma.3, fmax.3, fmemopen.3, fmin.3, fmod.3, fmtmsg.3, fnmatch.3, fopen.3, fpathconf.3, fpclassify.3, fpurge.3, fputwc.3, fputws.3, fread.3, frexp.3, fseek.3, fseeko.3, ftime.3, ftok.3, fts.3, ftw.3, futimes.3, fwide.3, gamma.3, gcvt.3, get_nprocs_conf.3, get_phys_pages.3, getaddrinfo.3, getaddrinfo_a.3, getauxval.3, getcontext.3, getcwd.3, getdate.3, getdirentries.3, getdtablesize.3, getentropy.3, getenv.3, getfsent.3, getgrent.3, getgrent_r.3, getgrnam.3, getgrouplist.3, gethostbyname.3, gethostid.3, getifaddrs.3, getipnodebyname.3, getline.3, getloadavg.3, getlogin.3, getmntent.3, getnameinfo.3, getnetent.3, getnetent_r.3, getopt.3, getpass.3, getprotoent.3, getprotoent_r.3, getpt.3, getpw.3, getpwent.3, getpwent_r.3, getpwnam.3, getrpcent_r.3, getrpcport.3, gets.3, getservent.3, getservent_r.3, getspnam.3, getsubopt.3, getttyent.3, getumask.3, getusershell.3, getutent.3, getw.3, getwchar.3, glob.3, grantpt.3, group_member.3, gsignal.3, hsearch.3, hypot.3, iconv.3, iconv_close.3, iconv_open.3, if_nameindex.3, if_nametoindex.3, ilogb.3, index.3, inet.3, inet_net_pton.3, inet_ntop.3, infnan.3, initgroups.3, insque.3, isalpha.3, isatty.3, isfdtype.3, isgreater.3, iswalnum.3, iswalpha.3, iswblank.3, iswcntrl.3, iswctype.3, iswdigit.3, iswgraph.3, iswlower.3, iswprint.3, iswpunct.3, iswspace.3, iswupper.3, iswxdigit.3, j0.3, key_setsecret.3, killpg.3, ldexp.3, lgamma.3, localeconv.3, lockf.3, log.3, log10.3, log1p.3, log2.3, logb.3, login.3, lrint.3, lround.3, lsearch.3, lseek64.3, makecontext.3, malloc.3, malloc_get_state.3, malloc_hook.3, malloc_info.3, matherr.3, mblen.3, mbrlen.3, mbrtowc.3, mbsinit.3, mbsnrtowcs.3, mbsrtowcs.3, mbstowcs.3, mbtowc.3, mcheck.3, memccpy.3, memchr.3, memcmp.3, memcpy.3, memfrob.3, memmem.3, memmove.3, mempcpy.3, memset.3, mkdtemp.3, mkfifo.3, mkstemp.3, mktemp.3, modf.3, mpool.3, mq_close.3, mq_getattr.3, mq_notify.3, mq_open.3, mq_receive.3, mq_send.3, mq_unlink.3, mtrace.3, nan.3, netlink.3, newlocale.3, nextafter.3, nl_langinfo.3, offsetof.3, on_exit.3, open_memstream.3, opendir.3, openpty.3, perror.3, popen.3, posix_fallocate.3, posix_madvise.3, posix_memalign.3, posix_openpt.3, pow.3, pow10.3, printf.3, profil.3, psignal.3, pthread_atfork.3, pthread_attr_init.3, pthread_attr_setaffinity_np.3, pthread_attr_setdetachstate.3, pthread_attr_setguardsize.3, pthread_attr_setinheritsched.3, pthread_attr_setschedparam.3, pthread_attr_setschedpolicy.3, pthread_attr_setscope.3, pthread_attr_setstack.3, pthread_attr_setstackaddr.3, pthread_attr_setstacksize.3, pthread_cancel.3, pthread_cleanup_push.3, pthread_cleanup_push_defer_np.3, pthread_create.3, pthread_detach.3, pthread_equal.3, pthread_exit.3, pthread_getattr_default_np.3, pthread_getattr_np.3, pthread_getcpuclockid.3, pthread_join.3, pthread_kill.3, pthread_rwlockattr_setkind_np.3, pthread_self.3, pthread_setaffinity_np.3, pthread_setcancelstate.3, pthread_setconcurrency.3, pthread_setname_np.3, pthread_setschedparam.3, pthread_setschedprio.3, pthread_sigmask.3, pthread_sigqueue.3, pthread_testcancel.3, pthread_tryjoin_np.3, pthread_yield.3, ptsname.3, putenv.3, putgrent.3, putpwent.3, puts.3, putwchar.3, qecvt.3, qsort.3, raise.3, rand.3, random.3, random_r.3, rcmd.3, re_comp.3, readdir.3, realpath.3, remainder.3, remove.3, remquo.3, resolver.3, rewinddir.3, rexec.3, rint.3, round.3, rpmatch.3, rtime.3, rtnetlink.3, scalb.3, scalbln.3, scandir.3, scanf.3, sched_getcpu.3, seekdir.3, sem_close.3, sem_destroy.3, sem_getvalue.3, sem_init.3, sem_open.3, sem_post.3, sem_unlink.3, sem_wait.3, setaliasent.3, setbuf.3, setenv.3, setlocale.3, setlogmask.3, setnetgrent.3, shm_open.3, siginterrupt.3, signbit.3, significand.3, sigpause.3, sigqueue.3, sigset.3, sigvec.3, sigwait.3, sin.3, sincos.3, sinh.3, sleep.3, sockatmark.3, sqrt.3, statvfs.3, stdarg.3, stdio.3, stdio_ext.3, stpcpy.3, stpncpy.3, strcasecmp.3, strcat.3, strchr.3, strcmp.3, strcoll.3, strcpy.3, strdup.3, strerror.3, strfmon.3, strfromd.3, strfry.3, strftime.3, strlen.3, strnlen.3, strpbrk.3, strptime.3, strsep.3, strsignal.3, strspn.3, strstr.3, strtod.3, strtoimax.3, strtok.3, strtol.3, strtoul.3, strverscmp.3, strxfrm.3, swab.3, sysconf.3, syslog.3, system.3, sysv_signal.3, tan.3, tanh.3, tcgetpgrp.3, tcgetsid.3, telldir.3, tempnam.3, termios.3, tgamma.3, timegm.3, timeradd.3, tmpfile.3, tmpnam.3, toascii.3, toupper.3, towctrans.3, towlower.3, towupper.3, trunc.3, tsearch.3, ttyname.3, ttyslot.3, tzset.3, ualarm.3, ulimit.3, ungetwc.3, unlocked_stdio.3, unlockpt.3, updwtmp.3, uselocale.3, usleep.3, wcpcpy.3, wcpncpy.3, wcrtomb.3, wcscasecmp.3, wcscat.3, wcschr.3, wcscmp.3, wcscpy.3, wcscspn.3, wcsdup.3, wcslen.3, wcsncasecmp.3, wcsncat.3, wcsncmp.3, wcsncpy.3, wcsnlen.3, wcsnrtombs.3, wcspbrk.3, wcsrchr.3, wcsrtombs.3, wcsspn.3, wcsstr.3, wcstoimax.3, wcstok.3, wcstombs.3, wcswidth.3, wctob.3, wctomb.3, wctrans.3, wctype.3, wcwidth.3, wmemchr.3, wmemcmp.3, wmemcpy.3, wmemmove.3, wmemset.3, wordexp.3, wprintf.3, xcrypt.3, y0.3, dsp56k.4, random.4, rtc.4, st.4, ddp.7, ip.7, ipv6.7, packet.7, rtnetlink.7, socket.7, tcp.7, udp.7, udplite.7, x25.7: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-15 15:16:29 +00:00
|
|
|
.PP
|
2007-04-03 14:04:54 +00:00
|
|
|
.BI "int prctl(int " option ", unsigned long " arg2 ", unsigned long " arg3 ,
|
|
|
|
.BI " unsigned long " arg4 ", unsigned long " arg5 );
|
|
|
|
.fi
|
2004-11-03 13:51:07 +00:00
|
|
|
.SH DESCRIPTION
|
2005-10-19 06:54:38 +00:00
|
|
|
.BR prctl ()
|
2020-05-12 16:36:46 +00:00
|
|
|
manipulates various aspects of the behavior
|
|
|
|
of the calling thread or process.
|
|
|
|
.PP
|
2020-05-13 11:37:45 +00:00
|
|
|
Note that careless use of some
|
2020-05-12 16:36:47 +00:00
|
|
|
.BR prctl ()
|
2020-05-13 11:37:45 +00:00
|
|
|
operations can confuse the user-space run-time environment,
|
|
|
|
so these operations should be used with care.
|
2020-05-12 16:36:47 +00:00
|
|
|
.PP
|
2020-05-12 16:36:46 +00:00
|
|
|
.BR prctl ()
|
2004-11-03 13:51:07 +00:00
|
|
|
is called with a first argument describing what to do
|
2007-12-10 07:16:56 +00:00
|
|
|
(with values defined in \fI<linux/prctl.h>\fP), and further
|
2008-07-10 20:53:08 +00:00
|
|
|
arguments with a significance depending on the first one.
|
2004-11-03 13:51:07 +00:00
|
|
|
The first argument can be:
|
2015-12-04 09:30:46 +00:00
|
|
|
.\"
|
2020-05-12 16:36:49 +00:00
|
|
|
.\" prctl PR_CAP_AMBIENT
|
2015-12-04 09:30:46 +00:00
|
|
|
.TP
|
|
|
|
.BR PR_CAP_AMBIENT " (since Linux 4.3)"
|
|
|
|
.\" commit 58319057b7847667f0c9585b9de0e8932b0fdb08
|
2016-12-15 10:01:41 +00:00
|
|
|
Reads or changes the ambient capability set of the calling thread,
|
|
|
|
according to the value of
|
2015-12-04 09:30:46 +00:00
|
|
|
.IR arg2 ,
|
|
|
|
which must be one of the following:
|
|
|
|
.RS
|
|
|
|
.\"
|
|
|
|
.TP
|
|
|
|
.B PR_CAP_AMBIENT_RAISE
|
|
|
|
The capability specified in
|
|
|
|
.I arg3
|
|
|
|
is added to the ambient set.
|
|
|
|
The specified capability must already be present in
|
|
|
|
both the permitted and the inheritable sets of the process.
|
|
|
|
This operation is not permitted if the
|
|
|
|
.B SECBIT_NO_CAP_AMBIENT_RAISE
|
|
|
|
securebit is set.
|
|
|
|
.TP
|
|
|
|
.B PR_CAP_AMBIENT_LOWER
|
|
|
|
The capability specified in
|
|
|
|
.I arg3
|
|
|
|
is removed from the ambient set.
|
|
|
|
.TP
|
|
|
|
.B PR_CAP_AMBIENT_IS_SET
|
|
|
|
The
|
arch_prctl.2, execveat.2, fanotify_mark.2, fcntl.2, fork.2, madvise.2, mknod.2, mmap.2, modify_ldt.2, mount.2, open.2, prctl.2, ptrace.2, restart_syscall.2, seccomp.2, semop.2, set_thread_area.2, symlink.2, umount.2, unlink.2, error.3, getnetent.3, getprotoent.3, getservent.3, getutent.3, glob.3, login.3, setjmp.3, setnetgrent.3, wordexp.3, epoll.7: Remove section number from page self reference
Fix places where pages refer to the function that they describe
and include a section number in that reference. Such references
cause some HTML-rendering tools to create self-references in the
page.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-08-07 16:40:35 +00:00
|
|
|
.BR prctl ()
|
2015-12-04 09:30:46 +00:00
|
|
|
call returns 1 if the capability in
|
|
|
|
.I arg3
|
|
|
|
is in the ambient set and 0 if it is not.
|
|
|
|
.TP
|
|
|
|
.BR PR_CAP_AMBIENT_CLEAR_ALL
|
|
|
|
All capabilities will be removed from the ambient set.
|
|
|
|
This operation requires setting
|
|
|
|
.I arg3
|
|
|
|
to zero.
|
|
|
|
.RE
|
2015-12-04 15:05:27 +00:00
|
|
|
.IP
|
|
|
|
In all of the above operations,
|
|
|
|
.I arg4
|
|
|
|
and
|
|
|
|
.I arg5
|
|
|
|
must be specified as 0.
|
2018-11-16 20:45:10 +00:00
|
|
|
.IP
|
|
|
|
Higher-level interfaces layered on top of the above operations are
|
|
|
|
provided in the
|
|
|
|
.BR libcap (3)
|
|
|
|
library in the form of
|
|
|
|
.BR cap_get_ambient (3),
|
|
|
|
.BR cap_set_ambient (3),
|
|
|
|
and
|
|
|
|
.BR cap_reset_ambient (3).
|
2020-05-12 16:36:49 +00:00
|
|
|
.\" prctl PR_CAPBSET_READ
|
2004-11-03 13:51:07 +00:00
|
|
|
.TP
|
2011-09-17 04:08:35 +00:00
|
|
|
.BR PR_CAPBSET_READ " (since Linux 2.6.25)"
|
2008-07-09 11:53:48 +00:00
|
|
|
Return (as the function result) 1 if the capability specified in
|
|
|
|
.I arg2
|
|
|
|
is in the calling thread's capability bounding set,
|
|
|
|
or 0 if it is not.
|
|
|
|
(The capability constants are defined in
|
|
|
|
.IR <linux/capability.h> .)
|
|
|
|
The capability bounding set dictates
|
|
|
|
whether the process can receive the capability through a
|
2008-07-09 13:55:24 +00:00
|
|
|
file's permitted capability set on a subsequent call to
|
2008-07-09 11:53:48 +00:00
|
|
|
.BR execve (2).
|
_syscall.2, bpf.2, cacheflush.2, capget.2, chdir.2, chmod.2, chroot.2, clock_getres.2, clock_nanosleep.2, clone.2, close.2, connect.2, copy_file_range.2, create_module.2, delete_module.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, eventfd.2, execve.2, execveat.2, fallocate.2, flock.2, fork.2, fsync.2, futex.2, futimesat.2, get_kernel_syms.2, get_mempolicy.2, get_robust_list.2, getcpu.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getitimer.2, getpagesize.2, getpeername.2, getpriority.2, getrandom.2, getresuid.2, getrlimit.2, getrusage.2, getsid.2, getsockname.2, getsockopt.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, init_module.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, intro.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl_fat.2, ioctl_ficlonerange.2, ioctl_fideduperange.2, ioctl_tty.2, ioctl_userfaultfd.2, ioperm.2, iopl.2, ioprio_set.2, kcmp.2, kexec_load.2, keyctl.2, kill.2, link.2, listen.2, listxattr.2, llseek.2, lookup_dcookie.2, lseek.2, madvise.2, mbind.2, membarrier.2, memfd_create.2, migrate_pages.2, mincore.2, mkdir.2, mknod.2, mlock.2, mmap.2, mmap2.2, modify_ldt.2, move_pages.2, mprotect.2, mq_getsetattr.2, mremap.2, msgctl.2, msgget.2, msgop.2, msync.2, nanosleep.2, nfsservctl.2, nice.2, open_by_handle_at.2, outb.2, perf_event_open.2, perfmonctl.2, personality.2, pivot_root.2, pkey_alloc.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, ptrace.2, query_module.2, quotactl.2, read.2, readahead.2, readdir.2, readv.2, reboot.2, recv.2, recvmmsg.2, remap_file_pages.2, rename.2, request_key.2, restart_syscall.2, rt_sigqueueinfo.2, s390_pci_mmio_write.2, s390_runtime_instr.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setattr.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, seccomp.2, select.2, select_tut.2, semctl.2, semget.2, semop.2, send.2, sendfile.2, sendmmsg.2, set_mempolicy.2, set_thread_area.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setns.2, setpgid.2, setresuid.2, setreuid.2, setsid.2, setuid.2, sgetmask.2, shmctl.2, shmget.2, shmop.2, sigaction.2, sigaltstack.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, socket.2, socketcall.2, socketpair.2, splice.2, spu_create.2, spu_run.2, stat.2, statfs.2, statx.2, subpage_prot.2, swapon.2, symlink.2, sync.2, sync_file_range.2, syscalls.2, sysctl.2, sysinfo.2, syslog.2, tee.2, time.2, timer_create.2, timer_getoverrun.2, timer_settime.2, timerfd_create.2, times.2, tkill.2, truncate.2, umask.2, umount.2, unimplemented.2, unlink.2, unshare.2, uselib.2, userfaultfd.2, utime.2, utimensat.2, vfork.2, vmsplice.2, wait.2, wait4.2, write.2: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 07:30:51 +00:00
|
|
|
.IP
|
2008-07-09 11:53:48 +00:00
|
|
|
If the capability specified in
|
|
|
|
.I arg2
|
|
|
|
is not valid, then the call fails with the error
|
|
|
|
.BR EINVAL .
|
2018-11-16 20:32:45 +00:00
|
|
|
.IP
|
|
|
|
A higher-level interface layered on top of this operation is provided in the
|
|
|
|
.BR libcap (3)
|
|
|
|
library in the form of
|
|
|
|
.BR cap_get_bound (3).
|
2020-05-12 16:36:49 +00:00
|
|
|
.\" prctl PR_CAPBSET_DROP
|
2008-07-09 11:53:48 +00:00
|
|
|
.TP
|
|
|
|
.BR PR_CAPBSET_DROP " (since Linux 2.6.25)"
|
|
|
|
If the calling thread has the
|
|
|
|
.B CAP_SETPCAP
|
2016-06-26 14:13:51 +00:00
|
|
|
capability within its user namespace, then drop the capability specified by
|
2008-07-09 11:53:48 +00:00
|
|
|
.I arg2
|
|
|
|
from the calling thread's capability bounding set.
|
|
|
|
Any children of the calling thread will inherit the newly
|
|
|
|
reduced bounding set.
|
_syscall.2, bpf.2, cacheflush.2, capget.2, chdir.2, chmod.2, chroot.2, clock_getres.2, clock_nanosleep.2, clone.2, close.2, connect.2, copy_file_range.2, create_module.2, delete_module.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, eventfd.2, execve.2, execveat.2, fallocate.2, flock.2, fork.2, fsync.2, futex.2, futimesat.2, get_kernel_syms.2, get_mempolicy.2, get_robust_list.2, getcpu.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getitimer.2, getpagesize.2, getpeername.2, getpriority.2, getrandom.2, getresuid.2, getrlimit.2, getrusage.2, getsid.2, getsockname.2, getsockopt.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, init_module.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, intro.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl_fat.2, ioctl_ficlonerange.2, ioctl_fideduperange.2, ioctl_tty.2, ioctl_userfaultfd.2, ioperm.2, iopl.2, ioprio_set.2, kcmp.2, kexec_load.2, keyctl.2, kill.2, link.2, listen.2, listxattr.2, llseek.2, lookup_dcookie.2, lseek.2, madvise.2, mbind.2, membarrier.2, memfd_create.2, migrate_pages.2, mincore.2, mkdir.2, mknod.2, mlock.2, mmap.2, mmap2.2, modify_ldt.2, move_pages.2, mprotect.2, mq_getsetattr.2, mremap.2, msgctl.2, msgget.2, msgop.2, msync.2, nanosleep.2, nfsservctl.2, nice.2, open_by_handle_at.2, outb.2, perf_event_open.2, perfmonctl.2, personality.2, pivot_root.2, pkey_alloc.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, ptrace.2, query_module.2, quotactl.2, read.2, readahead.2, readdir.2, readv.2, reboot.2, recv.2, recvmmsg.2, remap_file_pages.2, rename.2, request_key.2, restart_syscall.2, rt_sigqueueinfo.2, s390_pci_mmio_write.2, s390_runtime_instr.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setattr.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, seccomp.2, select.2, select_tut.2, semctl.2, semget.2, semop.2, send.2, sendfile.2, sendmmsg.2, set_mempolicy.2, set_thread_area.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setns.2, setpgid.2, setresuid.2, setreuid.2, setsid.2, setuid.2, sgetmask.2, shmctl.2, shmget.2, shmop.2, sigaction.2, sigaltstack.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, socket.2, socketcall.2, socketpair.2, splice.2, spu_create.2, spu_run.2, stat.2, statfs.2, statx.2, subpage_prot.2, swapon.2, symlink.2, sync.2, sync_file_range.2, syscalls.2, sysctl.2, sysinfo.2, syslog.2, tee.2, time.2, timer_create.2, timer_getoverrun.2, timer_settime.2, timerfd_create.2, times.2, tkill.2, truncate.2, umask.2, umount.2, unimplemented.2, unlink.2, unshare.2, uselib.2, userfaultfd.2, utime.2, utimensat.2, vfork.2, vmsplice.2, wait.2, wait4.2, write.2: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 07:30:51 +00:00
|
|
|
.IP
|
2008-07-09 11:53:48 +00:00
|
|
|
The call fails with the error:
|
|
|
|
.B EPERM
|
2008-07-09 13:55:24 +00:00
|
|
|
if the calling thread does not have the
|
2008-07-09 11:53:48 +00:00
|
|
|
.BR CAP_SETPCAP ;
|
|
|
|
.BR EINVAL
|
|
|
|
if
|
|
|
|
.I arg2
|
|
|
|
does not represent a valid capability; or
|
|
|
|
.BR EINVAL
|
|
|
|
if file capabilities are not enabled in the kernel,
|
|
|
|
in which case bounding sets are not supported.
|
2018-11-16 20:32:45 +00:00
|
|
|
.IP
|
|
|
|
A higher-level interface layered on top of this operation is provided in the
|
|
|
|
.BR libcap (3)
|
|
|
|
library in the form of
|
|
|
|
.BR cap_drop_bound (3).
|
2020-05-12 16:36:49 +00:00
|
|
|
.\" prctl PR_SET_CHILD_SUBREAPER
|
2013-02-08 09:38:43 +00:00
|
|
|
.TP
|
|
|
|
.BR PR_SET_CHILD_SUBREAPER " (since Linux 3.4)"
|
|
|
|
.\" commit ebec18a6d3aa1e7d84aab16225e87fd25170ec2b
|
|
|
|
If
|
|
|
|
.I arg2
|
|
|
|
is nonzero,
|
|
|
|
set the "child subreaper" attribute of the calling process;
|
|
|
|
if
|
|
|
|
.I arg2
|
|
|
|
is zero, unset the attribute.
|
_syscall.2, bpf.2, cacheflush.2, capget.2, chdir.2, chmod.2, chroot.2, clock_getres.2, clock_nanosleep.2, clone.2, close.2, connect.2, copy_file_range.2, create_module.2, delete_module.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, eventfd.2, execve.2, execveat.2, fallocate.2, flock.2, fork.2, fsync.2, futex.2, futimesat.2, get_kernel_syms.2, get_mempolicy.2, get_robust_list.2, getcpu.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getitimer.2, getpagesize.2, getpeername.2, getpriority.2, getrandom.2, getresuid.2, getrlimit.2, getrusage.2, getsid.2, getsockname.2, getsockopt.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, init_module.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, intro.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl_fat.2, ioctl_ficlonerange.2, ioctl_fideduperange.2, ioctl_tty.2, ioctl_userfaultfd.2, ioperm.2, iopl.2, ioprio_set.2, kcmp.2, kexec_load.2, keyctl.2, kill.2, link.2, listen.2, listxattr.2, llseek.2, lookup_dcookie.2, lseek.2, madvise.2, mbind.2, membarrier.2, memfd_create.2, migrate_pages.2, mincore.2, mkdir.2, mknod.2, mlock.2, mmap.2, mmap2.2, modify_ldt.2, move_pages.2, mprotect.2, mq_getsetattr.2, mremap.2, msgctl.2, msgget.2, msgop.2, msync.2, nanosleep.2, nfsservctl.2, nice.2, open_by_handle_at.2, outb.2, perf_event_open.2, perfmonctl.2, personality.2, pivot_root.2, pkey_alloc.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, ptrace.2, query_module.2, quotactl.2, read.2, readahead.2, readdir.2, readv.2, reboot.2, recv.2, recvmmsg.2, remap_file_pages.2, rename.2, request_key.2, restart_syscall.2, rt_sigqueueinfo.2, s390_pci_mmio_write.2, s390_runtime_instr.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setattr.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, seccomp.2, select.2, select_tut.2, semctl.2, semget.2, semop.2, send.2, sendfile.2, sendmmsg.2, set_mempolicy.2, set_thread_area.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setns.2, setpgid.2, setresuid.2, setreuid.2, setsid.2, setuid.2, sgetmask.2, shmctl.2, shmget.2, shmop.2, sigaction.2, sigaltstack.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, socket.2, socketcall.2, socketpair.2, splice.2, spu_create.2, spu_run.2, stat.2, statfs.2, statx.2, subpage_prot.2, swapon.2, symlink.2, sync.2, sync_file_range.2, syscalls.2, sysctl.2, sysinfo.2, syslog.2, tee.2, time.2, timer_create.2, timer_getoverrun.2, timer_settime.2, timerfd_create.2, times.2, tkill.2, truncate.2, umask.2, umount.2, unimplemented.2, unlink.2, unshare.2, uselib.2, userfaultfd.2, utime.2, utimensat.2, vfork.2, vmsplice.2, wait.2, wait4.2, write.2: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 07:30:51 +00:00
|
|
|
.IP
|
2017-03-16 07:26:24 +00:00
|
|
|
A subreaper fulfills the role of
|
2013-02-08 09:38:43 +00:00
|
|
|
.BR init (1)
|
|
|
|
for its descendant processes.
|
2017-03-16 07:26:24 +00:00
|
|
|
When a process becomes orphaned
|
2019-08-27 11:56:13 +00:00
|
|
|
(i.e., its immediate parent terminates),
|
2017-03-16 07:26:24 +00:00
|
|
|
then that process will be reparented to
|
|
|
|
the nearest still living ancestor subreaper.
|
|
|
|
Subsequently, calls to
|
2020-05-19 05:43:21 +00:00
|
|
|
.BR getppid (2)
|
2017-03-16 07:26:24 +00:00
|
|
|
in the orphaned process will now return the PID of the subreaper process,
|
|
|
|
and when the orphan terminates, it is the subreaper process that
|
2013-02-08 09:38:43 +00:00
|
|
|
will receive a
|
|
|
|
.BR SIGCHLD
|
2016-06-09 08:41:47 +00:00
|
|
|
signal and will be able to
|
2013-02-08 09:38:43 +00:00
|
|
|
.BR wait (2)
|
|
|
|
on the process to discover its termination status.
|
_syscall.2, bpf.2, cacheflush.2, capget.2, chdir.2, chmod.2, chroot.2, clock_getres.2, clock_nanosleep.2, clone.2, close.2, connect.2, copy_file_range.2, create_module.2, delete_module.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, eventfd.2, execve.2, execveat.2, fallocate.2, flock.2, fork.2, fsync.2, futex.2, futimesat.2, get_kernel_syms.2, get_mempolicy.2, get_robust_list.2, getcpu.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getitimer.2, getpagesize.2, getpeername.2, getpriority.2, getrandom.2, getresuid.2, getrlimit.2, getrusage.2, getsid.2, getsockname.2, getsockopt.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, init_module.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, intro.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl_fat.2, ioctl_ficlonerange.2, ioctl_fideduperange.2, ioctl_tty.2, ioctl_userfaultfd.2, ioperm.2, iopl.2, ioprio_set.2, kcmp.2, kexec_load.2, keyctl.2, kill.2, link.2, listen.2, listxattr.2, llseek.2, lookup_dcookie.2, lseek.2, madvise.2, mbind.2, membarrier.2, memfd_create.2, migrate_pages.2, mincore.2, mkdir.2, mknod.2, mlock.2, mmap.2, mmap2.2, modify_ldt.2, move_pages.2, mprotect.2, mq_getsetattr.2, mremap.2, msgctl.2, msgget.2, msgop.2, msync.2, nanosleep.2, nfsservctl.2, nice.2, open_by_handle_at.2, outb.2, perf_event_open.2, perfmonctl.2, personality.2, pivot_root.2, pkey_alloc.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, ptrace.2, query_module.2, quotactl.2, read.2, readahead.2, readdir.2, readv.2, reboot.2, recv.2, recvmmsg.2, remap_file_pages.2, rename.2, request_key.2, restart_syscall.2, rt_sigqueueinfo.2, s390_pci_mmio_write.2, s390_runtime_instr.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setattr.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, seccomp.2, select.2, select_tut.2, semctl.2, semget.2, semop.2, send.2, sendfile.2, sendmmsg.2, set_mempolicy.2, set_thread_area.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setns.2, setpgid.2, setresuid.2, setreuid.2, setsid.2, setuid.2, sgetmask.2, shmctl.2, shmget.2, shmop.2, sigaction.2, sigaltstack.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, socket.2, socketcall.2, socketpair.2, splice.2, spu_create.2, spu_run.2, stat.2, statfs.2, statx.2, subpage_prot.2, swapon.2, symlink.2, sync.2, sync_file_range.2, syscalls.2, sysctl.2, sysinfo.2, syslog.2, tee.2, time.2, timer_create.2, timer_getoverrun.2, timer_settime.2, timerfd_create.2, times.2, tkill.2, truncate.2, umask.2, umount.2, unimplemented.2, unlink.2, unshare.2, uselib.2, userfaultfd.2, utime.2, utimensat.2, vfork.2, vmsplice.2, wait.2, wait4.2, write.2: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 07:30:51 +00:00
|
|
|
.IP
|
2018-11-24 19:54:48 +00:00
|
|
|
The setting of the "child subreaper" attribute
|
2018-11-24 10:22:47 +00:00
|
|
|
is not inherited by children created by
|
2017-03-16 07:10:43 +00:00
|
|
|
.BR fork (2)
|
|
|
|
and
|
|
|
|
.BR clone (2).
|
|
|
|
The setting is preserved across
|
|
|
|
.BR execve (2).
|
_syscall.2, bpf.2, cacheflush.2, capget.2, chdir.2, chmod.2, chroot.2, clock_getres.2, clock_nanosleep.2, clone.2, close.2, connect.2, copy_file_range.2, create_module.2, delete_module.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, eventfd.2, execve.2, execveat.2, fallocate.2, flock.2, fork.2, fsync.2, futex.2, futimesat.2, get_kernel_syms.2, get_mempolicy.2, get_robust_list.2, getcpu.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getitimer.2, getpagesize.2, getpeername.2, getpriority.2, getrandom.2, getresuid.2, getrlimit.2, getrusage.2, getsid.2, getsockname.2, getsockopt.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, init_module.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, intro.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl_fat.2, ioctl_ficlonerange.2, ioctl_fideduperange.2, ioctl_tty.2, ioctl_userfaultfd.2, ioperm.2, iopl.2, ioprio_set.2, kcmp.2, kexec_load.2, keyctl.2, kill.2, link.2, listen.2, listxattr.2, llseek.2, lookup_dcookie.2, lseek.2, madvise.2, mbind.2, membarrier.2, memfd_create.2, migrate_pages.2, mincore.2, mkdir.2, mknod.2, mlock.2, mmap.2, mmap2.2, modify_ldt.2, move_pages.2, mprotect.2, mq_getsetattr.2, mremap.2, msgctl.2, msgget.2, msgop.2, msync.2, nanosleep.2, nfsservctl.2, nice.2, open_by_handle_at.2, outb.2, perf_event_open.2, perfmonctl.2, personality.2, pivot_root.2, pkey_alloc.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, ptrace.2, query_module.2, quotactl.2, read.2, readahead.2, readdir.2, readv.2, reboot.2, recv.2, recvmmsg.2, remap_file_pages.2, rename.2, request_key.2, restart_syscall.2, rt_sigqueueinfo.2, s390_pci_mmio_write.2, s390_runtime_instr.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setattr.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, seccomp.2, select.2, select_tut.2, semctl.2, semget.2, semop.2, send.2, sendfile.2, sendmmsg.2, set_mempolicy.2, set_thread_area.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setns.2, setpgid.2, setresuid.2, setreuid.2, setsid.2, setuid.2, sgetmask.2, shmctl.2, shmget.2, shmop.2, sigaction.2, sigaltstack.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, socket.2, socketcall.2, socketpair.2, splice.2, spu_create.2, spu_run.2, stat.2, statfs.2, statx.2, subpage_prot.2, swapon.2, symlink.2, sync.2, sync_file_range.2, syscalls.2, sysctl.2, sysinfo.2, syslog.2, tee.2, time.2, timer_create.2, timer_getoverrun.2, timer_settime.2, timerfd_create.2, times.2, tkill.2, truncate.2, umask.2, umount.2, unimplemented.2, unlink.2, unshare.2, uselib.2, userfaultfd.2, utime.2, utimensat.2, vfork.2, vmsplice.2, wait.2, wait4.2, write.2: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 07:30:51 +00:00
|
|
|
.IP
|
2017-03-17 06:55:58 +00:00
|
|
|
Establishing a subreaper process is useful in session management frameworks
|
|
|
|
where a hierarchical group of processes is managed by a subreaper process
|
|
|
|
that needs to be informed when one of the processes\(emfor example,
|
|
|
|
a double-forked daemon\(emterminates
|
|
|
|
(perhaps so that it can restart that process).
|
|
|
|
Some
|
|
|
|
.BR init (1)
|
|
|
|
frameworks (e.g.,
|
|
|
|
.BR systemd (1))
|
|
|
|
employ a subreaper process for similar reasons.
|
2020-05-12 16:36:49 +00:00
|
|
|
.\" prctl PR_GET_CHILD_SUBREAPER
|
2013-02-08 09:38:43 +00:00
|
|
|
.TP
|
|
|
|
.BR PR_GET_CHILD_SUBREAPER " (since Linux 3.4)"
|
|
|
|
Return the "child subreaper" setting of the caller,
|
|
|
|
in the location pointed to by
|
|
|
|
.IR "(int\ *) arg2" .
|
2020-05-12 16:36:49 +00:00
|
|
|
.\" prctl PR_SET_DUMPABLE
|
2008-07-09 11:53:48 +00:00
|
|
|
.TP
|
2008-07-16 14:01:02 +00:00
|
|
|
.BR PR_SET_DUMPABLE " (since Linux 2.3.20)"
|
2020-04-21 12:01:01 +00:00
|
|
|
Set the state of the "dumpable" attribute,
|
2015-01-19 13:36:59 +00:00
|
|
|
which determines whether core dumps are produced for the calling process
|
|
|
|
upon delivery of a signal whose default behavior is to produce a core dump.
|
_syscall.2, bpf.2, cacheflush.2, capget.2, chdir.2, chmod.2, chroot.2, clock_getres.2, clock_nanosleep.2, clone.2, close.2, connect.2, copy_file_range.2, create_module.2, delete_module.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, eventfd.2, execve.2, execveat.2, fallocate.2, flock.2, fork.2, fsync.2, futex.2, futimesat.2, get_kernel_syms.2, get_mempolicy.2, get_robust_list.2, getcpu.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getitimer.2, getpagesize.2, getpeername.2, getpriority.2, getrandom.2, getresuid.2, getrlimit.2, getrusage.2, getsid.2, getsockname.2, getsockopt.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, init_module.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, intro.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl_fat.2, ioctl_ficlonerange.2, ioctl_fideduperange.2, ioctl_tty.2, ioctl_userfaultfd.2, ioperm.2, iopl.2, ioprio_set.2, kcmp.2, kexec_load.2, keyctl.2, kill.2, link.2, listen.2, listxattr.2, llseek.2, lookup_dcookie.2, lseek.2, madvise.2, mbind.2, membarrier.2, memfd_create.2, migrate_pages.2, mincore.2, mkdir.2, mknod.2, mlock.2, mmap.2, mmap2.2, modify_ldt.2, move_pages.2, mprotect.2, mq_getsetattr.2, mremap.2, msgctl.2, msgget.2, msgop.2, msync.2, nanosleep.2, nfsservctl.2, nice.2, open_by_handle_at.2, outb.2, perf_event_open.2, perfmonctl.2, personality.2, pivot_root.2, pkey_alloc.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, ptrace.2, query_module.2, quotactl.2, read.2, readahead.2, readdir.2, readv.2, reboot.2, recv.2, recvmmsg.2, remap_file_pages.2, rename.2, request_key.2, restart_syscall.2, rt_sigqueueinfo.2, s390_pci_mmio_write.2, s390_runtime_instr.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setattr.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, seccomp.2, select.2, select_tut.2, semctl.2, semget.2, semop.2, send.2, sendfile.2, sendmmsg.2, set_mempolicy.2, set_thread_area.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setns.2, setpgid.2, setresuid.2, setreuid.2, setsid.2, setuid.2, sgetmask.2, shmctl.2, shmget.2, shmop.2, sigaction.2, sigaltstack.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, socket.2, socketcall.2, socketpair.2, splice.2, spu_create.2, spu_run.2, stat.2, statfs.2, statx.2, subpage_prot.2, swapon.2, symlink.2, sync.2, sync_file_range.2, syscalls.2, sysctl.2, sysinfo.2, syslog.2, tee.2, time.2, timer_create.2, timer_getoverrun.2, timer_settime.2, timerfd_create.2, times.2, tkill.2, truncate.2, umask.2, umount.2, unimplemented.2, unlink.2, unshare.2, uselib.2, userfaultfd.2, utime.2, utimensat.2, vfork.2, vmsplice.2, wait.2, wait4.2, write.2: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 07:30:51 +00:00
|
|
|
.IP
|
2008-07-16 14:01:02 +00:00
|
|
|
In kernels up to and including 2.6.12,
|
2008-07-09 11:53:48 +00:00
|
|
|
.I arg2
|
2015-01-19 11:40:21 +00:00
|
|
|
must be either 0
|
|
|
|
.RB ( SUID_DUMP_DISABLE ,
|
|
|
|
process is not dumpable) or 1
|
|
|
|
.RB ( SUID_DUMP_USER ,
|
|
|
|
process is dumpable).
|
2015-01-19 12:23:46 +00:00
|
|
|
Between kernels 2.6.13 and 2.6.17,
|
|
|
|
.\" commit abf75a5033d4da7b8a7e92321d74021d1fcfb502
|
|
|
|
the value 2 was also permitted,
|
2008-07-16 14:01:02 +00:00
|
|
|
which caused any binary which normally would not be dumped
|
|
|
|
to be dumped readable by root only;
|
|
|
|
for security reasons, this feature has been removed.
|
|
|
|
.\" See http://marc.theaimsgroup.com/?l=linux-kernel&m=115270289030630&w=2
|
|
|
|
.\" Subject: Fix prctl privilege escalation (CVE-2006-2451)
|
|
|
|
.\" From: Marcel Holtmann <marcel () holtmann ! org>
|
|
|
|
.\" Date: 2006-07-12 11:12:00
|
|
|
|
(See also the description of
|
2015-01-19 13:36:59 +00:00
|
|
|
.I /proc/sys/fs/\:suid_dumpable
|
2008-07-16 14:01:02 +00:00
|
|
|
in
|
|
|
|
.BR proc (5).)
|
_syscall.2, bpf.2, cacheflush.2, capget.2, chdir.2, chmod.2, chroot.2, clock_getres.2, clock_nanosleep.2, clone.2, close.2, connect.2, copy_file_range.2, create_module.2, delete_module.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, eventfd.2, execve.2, execveat.2, fallocate.2, flock.2, fork.2, fsync.2, futex.2, futimesat.2, get_kernel_syms.2, get_mempolicy.2, get_robust_list.2, getcpu.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getitimer.2, getpagesize.2, getpeername.2, getpriority.2, getrandom.2, getresuid.2, getrlimit.2, getrusage.2, getsid.2, getsockname.2, getsockopt.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, init_module.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, intro.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl_fat.2, ioctl_ficlonerange.2, ioctl_fideduperange.2, ioctl_tty.2, ioctl_userfaultfd.2, ioperm.2, iopl.2, ioprio_set.2, kcmp.2, kexec_load.2, keyctl.2, kill.2, link.2, listen.2, listxattr.2, llseek.2, lookup_dcookie.2, lseek.2, madvise.2, mbind.2, membarrier.2, memfd_create.2, migrate_pages.2, mincore.2, mkdir.2, mknod.2, mlock.2, mmap.2, mmap2.2, modify_ldt.2, move_pages.2, mprotect.2, mq_getsetattr.2, mremap.2, msgctl.2, msgget.2, msgop.2, msync.2, nanosleep.2, nfsservctl.2, nice.2, open_by_handle_at.2, outb.2, perf_event_open.2, perfmonctl.2, personality.2, pivot_root.2, pkey_alloc.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, ptrace.2, query_module.2, quotactl.2, read.2, readahead.2, readdir.2, readv.2, reboot.2, recv.2, recvmmsg.2, remap_file_pages.2, rename.2, request_key.2, restart_syscall.2, rt_sigqueueinfo.2, s390_pci_mmio_write.2, s390_runtime_instr.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setattr.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, seccomp.2, select.2, select_tut.2, semctl.2, semget.2, semop.2, send.2, sendfile.2, sendmmsg.2, set_mempolicy.2, set_thread_area.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setns.2, setpgid.2, setresuid.2, setreuid.2, setsid.2, setuid.2, sgetmask.2, shmctl.2, shmget.2, shmop.2, sigaction.2, sigaltstack.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, socket.2, socketcall.2, socketpair.2, splice.2, spu_create.2, spu_run.2, stat.2, statfs.2, statx.2, subpage_prot.2, swapon.2, symlink.2, sync.2, sync_file_range.2, syscalls.2, sysctl.2, sysinfo.2, syslog.2, tee.2, time.2, timer_create.2, timer_getoverrun.2, timer_settime.2, timerfd_create.2, times.2, tkill.2, truncate.2, umask.2, umount.2, unimplemented.2, unlink.2, unshare.2, uselib.2, userfaultfd.2, utime.2, utimensat.2, vfork.2, vmsplice.2, wait.2, wait4.2, write.2: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 07:30:51 +00:00
|
|
|
.IP
|
2020-04-22 09:59:21 +00:00
|
|
|
Normally, the "dumpable" attribute is set to 1.
|
2015-01-19 13:36:59 +00:00
|
|
|
However, it is reset to the current value contained in the file
|
|
|
|
.IR /proc/sys/fs/\:suid_dumpable
|
|
|
|
(which by default has the value 0),
|
2016-09-20 15:47:47 +00:00
|
|
|
in the following circumstances:
|
2015-01-19 13:36:59 +00:00
|
|
|
.\" See kernel/cred.c::commit_creds() (Linux 3.18 sources)
|
|
|
|
.RS
|
2016-12-28 10:13:38 +00:00
|
|
|
.IP * 3
|
2016-09-20 15:47:47 +00:00
|
|
|
The process's effective user or group ID is changed.
|
2015-01-19 13:36:59 +00:00
|
|
|
.IP *
|
2016-09-20 15:47:47 +00:00
|
|
|
The process's filesystem user or group ID is changed (see
|
2015-01-19 13:36:59 +00:00
|
|
|
.BR credentials (7)).
|
|
|
|
.IP *
|
2016-09-20 15:47:47 +00:00
|
|
|
The process executes
|
2015-01-19 13:36:59 +00:00
|
|
|
.RB ( execve (2))
|
2016-12-28 10:13:38 +00:00
|
|
|
a set-user-ID or set-group-ID program, resulting in a change
|
|
|
|
of either the effective user ID or the effective group ID.
|
2016-12-27 21:52:16 +00:00
|
|
|
.IP *
|
|
|
|
The process executes
|
|
|
|
.RB ( execve (2))
|
|
|
|
a program that has file capabilities (see
|
|
|
|
.BR capabilities (7)),
|
2016-12-28 10:13:38 +00:00
|
|
|
.\" See kernel/cred.c::commit_creds()
|
2016-12-27 21:52:16 +00:00
|
|
|
but only if the permitted capabilities
|
2016-12-28 10:13:38 +00:00
|
|
|
gained exceed those already permitted for the process.
|
2015-02-21 11:14:39 +00:00
|
|
|
.\" Also certain namespace operations;
|
2015-01-19 13:36:59 +00:00
|
|
|
.RE
|
|
|
|
.IP
|
2011-09-17 04:10:54 +00:00
|
|
|
Processes that are not dumpable can not be attached via
|
2012-06-07 12:27:54 +00:00
|
|
|
.BR ptrace (2)
|
2016-09-20 15:05:46 +00:00
|
|
|
.BR PTRACE_ATTACH ;
|
|
|
|
see
|
|
|
|
.BR ptrace (2)
|
|
|
|
for further details.
|
_syscall.2, bpf.2, cacheflush.2, capget.2, chdir.2, chmod.2, chroot.2, clock_getres.2, clock_nanosleep.2, clone.2, close.2, connect.2, copy_file_range.2, create_module.2, delete_module.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, eventfd.2, execve.2, execveat.2, fallocate.2, flock.2, fork.2, fsync.2, futex.2, futimesat.2, get_kernel_syms.2, get_mempolicy.2, get_robust_list.2, getcpu.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getitimer.2, getpagesize.2, getpeername.2, getpriority.2, getrandom.2, getresuid.2, getrlimit.2, getrusage.2, getsid.2, getsockname.2, getsockopt.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, init_module.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, intro.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl_fat.2, ioctl_ficlonerange.2, ioctl_fideduperange.2, ioctl_tty.2, ioctl_userfaultfd.2, ioperm.2, iopl.2, ioprio_set.2, kcmp.2, kexec_load.2, keyctl.2, kill.2, link.2, listen.2, listxattr.2, llseek.2, lookup_dcookie.2, lseek.2, madvise.2, mbind.2, membarrier.2, memfd_create.2, migrate_pages.2, mincore.2, mkdir.2, mknod.2, mlock.2, mmap.2, mmap2.2, modify_ldt.2, move_pages.2, mprotect.2, mq_getsetattr.2, mremap.2, msgctl.2, msgget.2, msgop.2, msync.2, nanosleep.2, nfsservctl.2, nice.2, open_by_handle_at.2, outb.2, perf_event_open.2, perfmonctl.2, personality.2, pivot_root.2, pkey_alloc.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, ptrace.2, query_module.2, quotactl.2, read.2, readahead.2, readdir.2, readv.2, reboot.2, recv.2, recvmmsg.2, remap_file_pages.2, rename.2, request_key.2, restart_syscall.2, rt_sigqueueinfo.2, s390_pci_mmio_write.2, s390_runtime_instr.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setattr.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, seccomp.2, select.2, select_tut.2, semctl.2, semget.2, semop.2, send.2, sendfile.2, sendmmsg.2, set_mempolicy.2, set_thread_area.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setns.2, setpgid.2, setresuid.2, setreuid.2, setsid.2, setuid.2, sgetmask.2, shmctl.2, shmget.2, shmop.2, sigaction.2, sigaltstack.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, socket.2, socketcall.2, socketpair.2, splice.2, spu_create.2, spu_run.2, stat.2, statfs.2, statx.2, subpage_prot.2, swapon.2, symlink.2, sync.2, sync_file_range.2, syscalls.2, sysctl.2, sysinfo.2, syslog.2, tee.2, time.2, timer_create.2, timer_getoverrun.2, timer_settime.2, timerfd_create.2, times.2, tkill.2, truncate.2, umask.2, umount.2, unimplemented.2, unlink.2, unshare.2, uselib.2, userfaultfd.2, utime.2, utimensat.2, vfork.2, vmsplice.2, wait.2, wait4.2, write.2: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 07:30:51 +00:00
|
|
|
.IP
|
2016-09-20 15:12:07 +00:00
|
|
|
If a process is not dumpable,
|
|
|
|
the ownership of files in the process's
|
|
|
|
.IR /proc/[pid]
|
|
|
|
directory is affected as described in
|
|
|
|
.BR proc (5).
|
2020-05-12 16:36:49 +00:00
|
|
|
.\" prctl PR_GET_DUMPABLE
|
2006-09-26 13:01:24 +00:00
|
|
|
.TP
|
2008-07-16 14:01:02 +00:00
|
|
|
.BR PR_GET_DUMPABLE " (since Linux 2.3.20)"
|
|
|
|
Return (as the function result) the current state of the calling
|
2020-04-21 12:01:01 +00:00
|
|
|
process's dumpable attribute.
|
2008-07-16 14:01:02 +00:00
|
|
|
.\" Since Linux 2.6.13, the dumpable flag can have the value 2,
|
|
|
|
.\" but in 2.6.13 PR_GET_DUMPABLE simply returns 1 if the dumpable
|
intro.1, time.1, adjtimex.2, capget.2, eventfd.2, fcntl.2, getrlimit.2, getsockopt.2, gettimeofday.2, intro.2, ioctl_list.2, ioperm.2, mlock.2, pivot_root.2, poll.2, prctl.2, ptrace.2, sched_setscheduler.2, select_tut.2, semget.2, sigaltstack.2, signalfd.2, sysctl.2, timer_settime.2, timerfd_create.2, wait.2, CPU_SET.3, argz_add.3, assert_perror.3, atexit.3, backtrace.3, bcmp.3, clearenv.3, ctime.3, dl_iterate_phdr.3, dlopen.3, ecvt.3, errno.3, error.3, ether_aton.3, exit.3, fenv.3, ferror.3, finite.3, flockfile.3, fnmatch.3, fpathconf.3, fpclassify.3, ftime.3, ftok.3, ftw.3, fwide.3, getaddrinfo.3, gethostbyname.3, getlogin.3, getnameinfo.3, getnetent.3, getopt.3, getprotoent.3, getrpcent.3, getservent.3, glob.3, hsearch.3, inet.3, isalpha.3, iswalnum.3, iswalpha.3, iswblank.3, iswcntrl.3, iswctype.3, iswdigit.3, iswgraph.3, iswlower.3, iswprint.3, iswpunct.3, iswspace.3, iswupper.3, iswxdigit.3, longjmp.3, lsearch.3, malloc.3, matherr.3, mblen.3, mbsinit.3, mbtowc.3, on_exit.3, printf.3, pthread_attr_init.3, pthread_attr_setaffinity_np.3, pthread_attr_setdetachstate.3, pthread_attr_setguardsize.3, pthread_attr_setinheritsched.3, pthread_attr_setschedparam.3, pthread_attr_setschedpolicy.3, pthread_attr_setscope.3, pthread_attr_setstack.3, pthread_attr_setstackaddr.3, pthread_attr_setstacksize.3, pthread_cancel.3, pthread_cleanup_push.3, pthread_equal.3, pthread_getattr_np.3, pthread_getcpuclockid.3, pthread_setaffinity_np.3, pthread_setcancelstate.3, pthread_setconcurrency.3, pthread_setschedparam.3, pthread_setschedprio.3, ptsname.3, putenv.3, putgrent.3, raise.3, rcmd.3, regex.3, rexec.3, rpc.3, rpmatch.3, rtnetlink.3, scandir.3, sem_init.3, setaliasent.3, setbuf.3, setenv.3, setjmp.3, signbit.3, stdio_ext.3, strtod.3, strtol.3, strtoul.3, system.3, termios.3, timeradd.3, tzset.3, ualarm.3, wctomb.3, xdr.3, st.4, tty_ioctl.4, core.5, elf.5, proc.5, bootparam.7, capabilities.7, icmp.7, ip.7, ipv6.7, math_error.7, mdoc.samples.7, mq_overview.7, pthreads.7, raw.7, regex.7, socket.7, tcp.7, tzselect.8: Global fix: s/non-zero/nonzero/
The tendency in English, as prescribed in style guides like
Chicago MoS, is towards removing hyphens after prefixes
like "non-" etc.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2010-01-16 16:40:55 +00:00
|
|
|
.\" flags has a nonzero value. This was fixed in 2.6.14.
|
2020-05-12 16:36:49 +00:00
|
|
|
.\" prctl PR_SET_ENDIAN
|
2006-09-26 13:01:24 +00:00
|
|
|
.TP
|
2008-07-09 11:53:48 +00:00
|
|
|
.BR PR_SET_ENDIAN " (since Linux 2.6.18, PowerPC only)"
|
2007-04-12 22:42:49 +00:00
|
|
|
Set the endian-ness of the calling process to the value given
|
2006-09-26 13:01:24 +00:00
|
|
|
in \fIarg2\fP, which should be one of the following:
|
2008-07-09 11:53:48 +00:00
|
|
|
.\" Respectively 0, 1, 2
|
2006-09-26 13:01:24 +00:00
|
|
|
.BR PR_ENDIAN_BIG ,
|
|
|
|
.BR PR_ENDIAN_LITTLE ,
|
|
|
|
or
|
2007-09-20 16:26:31 +00:00
|
|
|
.B PR_ENDIAN_PPC_LITTLE
|
2006-09-26 13:01:24 +00:00
|
|
|
(PowerPC pseudo little endian).
|
2020-05-12 16:36:49 +00:00
|
|
|
.\" prctl PR_GET_ENDIAN
|
2006-09-26 12:03:11 +00:00
|
|
|
.TP
|
2008-07-09 11:53:48 +00:00
|
|
|
.BR PR_GET_ENDIAN " (since Linux 2.6.18, PowerPC only)"
|
|
|
|
Return the endian-ness of the calling process,
|
|
|
|
in the location pointed to by
|
|
|
|
.IR "(int\ *) arg2" .
|
2020-05-12 16:36:49 +00:00
|
|
|
.\" prctl PR_SET_FP_MODE
|
2016-11-20 00:55:11 +00:00
|
|
|
.TP
|
|
|
|
.BR PR_SET_FP_MODE " (since Linux 4.0, only on MIPS)"
|
2016-11-20 10:39:25 +00:00
|
|
|
.\" commit 9791554b45a2acc28247f66a5fd5bbc212a6b8c8
|
|
|
|
On the MIPS architecture,
|
|
|
|
user-space code can be built using an ABI which permits linking
|
|
|
|
with code that has more restrictive floating-point (FP) requirements.
|
|
|
|
For example, user-space code may be built to target the O32 FPXX ABI
|
2016-11-20 10:32:37 +00:00
|
|
|
and linked with code built for either one of the more restrictive
|
2016-11-20 10:39:25 +00:00
|
|
|
FP32 or FP64 ABIs.
|
2016-11-20 10:32:37 +00:00
|
|
|
When more restrictive code is linked in,
|
2016-11-20 10:39:25 +00:00
|
|
|
the overall requirement for the process is to use the more
|
|
|
|
restrictive floating-point mode.
|
_syscall.2, bpf.2, cacheflush.2, capget.2, chdir.2, chmod.2, chroot.2, clock_getres.2, clock_nanosleep.2, clone.2, close.2, connect.2, copy_file_range.2, create_module.2, delete_module.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, eventfd.2, execve.2, execveat.2, fallocate.2, flock.2, fork.2, fsync.2, futex.2, futimesat.2, get_kernel_syms.2, get_mempolicy.2, get_robust_list.2, getcpu.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getitimer.2, getpagesize.2, getpeername.2, getpriority.2, getrandom.2, getresuid.2, getrlimit.2, getrusage.2, getsid.2, getsockname.2, getsockopt.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, init_module.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, intro.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl_fat.2, ioctl_ficlonerange.2, ioctl_fideduperange.2, ioctl_tty.2, ioctl_userfaultfd.2, ioperm.2, iopl.2, ioprio_set.2, kcmp.2, kexec_load.2, keyctl.2, kill.2, link.2, listen.2, listxattr.2, llseek.2, lookup_dcookie.2, lseek.2, madvise.2, mbind.2, membarrier.2, memfd_create.2, migrate_pages.2, mincore.2, mkdir.2, mknod.2, mlock.2, mmap.2, mmap2.2, modify_ldt.2, move_pages.2, mprotect.2, mq_getsetattr.2, mremap.2, msgctl.2, msgget.2, msgop.2, msync.2, nanosleep.2, nfsservctl.2, nice.2, open_by_handle_at.2, outb.2, perf_event_open.2, perfmonctl.2, personality.2, pivot_root.2, pkey_alloc.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, ptrace.2, query_module.2, quotactl.2, read.2, readahead.2, readdir.2, readv.2, reboot.2, recv.2, recvmmsg.2, remap_file_pages.2, rename.2, request_key.2, restart_syscall.2, rt_sigqueueinfo.2, s390_pci_mmio_write.2, s390_runtime_instr.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setattr.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, seccomp.2, select.2, select_tut.2, semctl.2, semget.2, semop.2, send.2, sendfile.2, sendmmsg.2, set_mempolicy.2, set_thread_area.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setns.2, setpgid.2, setresuid.2, setreuid.2, setsid.2, setuid.2, sgetmask.2, shmctl.2, shmget.2, shmop.2, sigaction.2, sigaltstack.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, socket.2, socketcall.2, socketpair.2, splice.2, spu_create.2, spu_run.2, stat.2, statfs.2, statx.2, subpage_prot.2, swapon.2, symlink.2, sync.2, sync_file_range.2, syscalls.2, sysctl.2, sysinfo.2, syslog.2, tee.2, time.2, timer_create.2, timer_getoverrun.2, timer_settime.2, timerfd_create.2, times.2, tkill.2, truncate.2, umask.2, umount.2, unimplemented.2, unlink.2, unshare.2, uselib.2, userfaultfd.2, utime.2, utimensat.2, vfork.2, vmsplice.2, wait.2, wait4.2, write.2: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 07:30:51 +00:00
|
|
|
.IP
|
2016-11-20 17:25:34 +00:00
|
|
|
Because the kernel has no means of knowing in advance
|
2016-11-20 10:39:25 +00:00
|
|
|
which mode the process should be executed in,
|
2016-11-20 17:25:34 +00:00
|
|
|
and because these restrictions can
|
|
|
|
change over the lifetime of the process, the
|
|
|
|
.B PR_SET_FP_MODE
|
|
|
|
operation is provided to allow control of the floating-point mode
|
|
|
|
from user space.
|
_syscall.2, bpf.2, cacheflush.2, capget.2, chdir.2, chmod.2, chroot.2, clock_getres.2, clock_nanosleep.2, clone.2, close.2, connect.2, copy_file_range.2, create_module.2, delete_module.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, eventfd.2, execve.2, execveat.2, fallocate.2, flock.2, fork.2, fsync.2, futex.2, futimesat.2, get_kernel_syms.2, get_mempolicy.2, get_robust_list.2, getcpu.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getitimer.2, getpagesize.2, getpeername.2, getpriority.2, getrandom.2, getresuid.2, getrlimit.2, getrusage.2, getsid.2, getsockname.2, getsockopt.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, init_module.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, intro.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl_fat.2, ioctl_ficlonerange.2, ioctl_fideduperange.2, ioctl_tty.2, ioctl_userfaultfd.2, ioperm.2, iopl.2, ioprio_set.2, kcmp.2, kexec_load.2, keyctl.2, kill.2, link.2, listen.2, listxattr.2, llseek.2, lookup_dcookie.2, lseek.2, madvise.2, mbind.2, membarrier.2, memfd_create.2, migrate_pages.2, mincore.2, mkdir.2, mknod.2, mlock.2, mmap.2, mmap2.2, modify_ldt.2, move_pages.2, mprotect.2, mq_getsetattr.2, mremap.2, msgctl.2, msgget.2, msgop.2, msync.2, nanosleep.2, nfsservctl.2, nice.2, open_by_handle_at.2, outb.2, perf_event_open.2, perfmonctl.2, personality.2, pivot_root.2, pkey_alloc.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, ptrace.2, query_module.2, quotactl.2, read.2, readahead.2, readdir.2, readv.2, reboot.2, recv.2, recvmmsg.2, remap_file_pages.2, rename.2, request_key.2, restart_syscall.2, rt_sigqueueinfo.2, s390_pci_mmio_write.2, s390_runtime_instr.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setattr.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, seccomp.2, select.2, select_tut.2, semctl.2, semget.2, semop.2, send.2, sendfile.2, sendmmsg.2, set_mempolicy.2, set_thread_area.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setns.2, setpgid.2, setresuid.2, setreuid.2, setsid.2, setuid.2, sgetmask.2, shmctl.2, shmget.2, shmop.2, sigaction.2, sigaltstack.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, socket.2, socketcall.2, socketpair.2, splice.2, spu_create.2, spu_run.2, stat.2, statfs.2, statx.2, subpage_prot.2, swapon.2, symlink.2, sync.2, sync_file_range.2, syscalls.2, sysctl.2, sysinfo.2, syslog.2, tee.2, time.2, timer_create.2, timer_getoverrun.2, timer_settime.2, timerfd_create.2, times.2, tkill.2, truncate.2, umask.2, umount.2, unimplemented.2, unlink.2, unshare.2, uselib.2, userfaultfd.2, utime.2, utimensat.2, vfork.2, vmsplice.2, wait.2, wait4.2, write.2: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 07:30:51 +00:00
|
|
|
.IP
|
2016-11-20 00:55:11 +00:00
|
|
|
.\" https://dmz-portal.mips.com/wiki/MIPS_O32_ABI_-_FR0_and_FR1_Interlinking
|
|
|
|
The
|
|
|
|
.I (unsigned int) arg2
|
2016-11-20 10:39:25 +00:00
|
|
|
argument is a bit mask describing the floating-point mode used:
|
2016-11-20 00:55:11 +00:00
|
|
|
.RS
|
|
|
|
.TP
|
2016-11-20 10:55:37 +00:00
|
|
|
.BR PR_FP_MODE_FR
|
2016-11-20 00:55:11 +00:00
|
|
|
When this bit is
|
|
|
|
.I unset
|
|
|
|
(so called
|
|
|
|
.BR FR=0 " or " FR0
|
2016-11-20 18:02:23 +00:00
|
|
|
mode), the 32 floating-point registers are 32 bits wide,
|
|
|
|
and 64-bit registers are represented as a pair of registers
|
2016-11-20 10:32:37 +00:00
|
|
|
(even- and odd- numbered,
|
2016-11-20 10:39:25 +00:00
|
|
|
with the even-numbered register containing the lower 32 bits,
|
|
|
|
and the odd-numbered register containing the higher 32 bits).
|
_syscall.2, bpf.2, cacheflush.2, capget.2, chdir.2, chmod.2, chroot.2, clock_getres.2, clock_nanosleep.2, clone.2, close.2, connect.2, copy_file_range.2, create_module.2, delete_module.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, eventfd.2, execve.2, execveat.2, fallocate.2, flock.2, fork.2, fsync.2, futex.2, futimesat.2, get_kernel_syms.2, get_mempolicy.2, get_robust_list.2, getcpu.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getitimer.2, getpagesize.2, getpeername.2, getpriority.2, getrandom.2, getresuid.2, getrlimit.2, getrusage.2, getsid.2, getsockname.2, getsockopt.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, init_module.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, intro.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl_fat.2, ioctl_ficlonerange.2, ioctl_fideduperange.2, ioctl_tty.2, ioctl_userfaultfd.2, ioperm.2, iopl.2, ioprio_set.2, kcmp.2, kexec_load.2, keyctl.2, kill.2, link.2, listen.2, listxattr.2, llseek.2, lookup_dcookie.2, lseek.2, madvise.2, mbind.2, membarrier.2, memfd_create.2, migrate_pages.2, mincore.2, mkdir.2, mknod.2, mlock.2, mmap.2, mmap2.2, modify_ldt.2, move_pages.2, mprotect.2, mq_getsetattr.2, mremap.2, msgctl.2, msgget.2, msgop.2, msync.2, nanosleep.2, nfsservctl.2, nice.2, open_by_handle_at.2, outb.2, perf_event_open.2, perfmonctl.2, personality.2, pivot_root.2, pkey_alloc.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, ptrace.2, query_module.2, quotactl.2, read.2, readahead.2, readdir.2, readv.2, reboot.2, recv.2, recvmmsg.2, remap_file_pages.2, rename.2, request_key.2, restart_syscall.2, rt_sigqueueinfo.2, s390_pci_mmio_write.2, s390_runtime_instr.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setattr.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, seccomp.2, select.2, select_tut.2, semctl.2, semget.2, semop.2, send.2, sendfile.2, sendmmsg.2, set_mempolicy.2, set_thread_area.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setns.2, setpgid.2, setresuid.2, setreuid.2, setsid.2, setuid.2, sgetmask.2, shmctl.2, shmget.2, shmop.2, sigaction.2, sigaltstack.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, socket.2, socketcall.2, socketpair.2, splice.2, spu_create.2, spu_run.2, stat.2, statfs.2, statx.2, subpage_prot.2, swapon.2, symlink.2, sync.2, sync_file_range.2, syscalls.2, sysctl.2, sysinfo.2, syslog.2, tee.2, time.2, timer_create.2, timer_getoverrun.2, timer_settime.2, timerfd_create.2, times.2, tkill.2, truncate.2, umask.2, umount.2, unimplemented.2, unlink.2, unshare.2, uselib.2, userfaultfd.2, utime.2, utimensat.2, vfork.2, vmsplice.2, wait.2, wait4.2, write.2: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 07:30:51 +00:00
|
|
|
.IP
|
2016-11-20 00:55:11 +00:00
|
|
|
When this bit is
|
|
|
|
.I set
|
2016-11-20 17:25:34 +00:00
|
|
|
(on supported hardware),
|
2016-11-20 18:02:23 +00:00
|
|
|
the 32 floating-point registers are 64 bits wide (so called
|
2016-11-20 00:55:11 +00:00
|
|
|
.BR FR=1 " or " FR1
|
2016-11-20 10:39:25 +00:00
|
|
|
mode).
|
2016-11-20 10:32:37 +00:00
|
|
|
Note that modern MIPS implementations (MIPS R6 and newer) support
|
2016-11-20 00:55:11 +00:00
|
|
|
.B FR=1
|
|
|
|
mode only.
|
_syscall.2, bpf.2, cacheflush.2, capget.2, chdir.2, chmod.2, chroot.2, clock_getres.2, clock_nanosleep.2, clone.2, close.2, connect.2, copy_file_range.2, create_module.2, delete_module.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, eventfd.2, execve.2, execveat.2, fallocate.2, flock.2, fork.2, fsync.2, futex.2, futimesat.2, get_kernel_syms.2, get_mempolicy.2, get_robust_list.2, getcpu.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getitimer.2, getpagesize.2, getpeername.2, getpriority.2, getrandom.2, getresuid.2, getrlimit.2, getrusage.2, getsid.2, getsockname.2, getsockopt.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, init_module.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, intro.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl_fat.2, ioctl_ficlonerange.2, ioctl_fideduperange.2, ioctl_tty.2, ioctl_userfaultfd.2, ioperm.2, iopl.2, ioprio_set.2, kcmp.2, kexec_load.2, keyctl.2, kill.2, link.2, listen.2, listxattr.2, llseek.2, lookup_dcookie.2, lseek.2, madvise.2, mbind.2, membarrier.2, memfd_create.2, migrate_pages.2, mincore.2, mkdir.2, mknod.2, mlock.2, mmap.2, mmap2.2, modify_ldt.2, move_pages.2, mprotect.2, mq_getsetattr.2, mremap.2, msgctl.2, msgget.2, msgop.2, msync.2, nanosleep.2, nfsservctl.2, nice.2, open_by_handle_at.2, outb.2, perf_event_open.2, perfmonctl.2, personality.2, pivot_root.2, pkey_alloc.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, ptrace.2, query_module.2, quotactl.2, read.2, readahead.2, readdir.2, readv.2, reboot.2, recv.2, recvmmsg.2, remap_file_pages.2, rename.2, request_key.2, restart_syscall.2, rt_sigqueueinfo.2, s390_pci_mmio_write.2, s390_runtime_instr.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setattr.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, seccomp.2, select.2, select_tut.2, semctl.2, semget.2, semop.2, send.2, sendfile.2, sendmmsg.2, set_mempolicy.2, set_thread_area.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setns.2, setpgid.2, setresuid.2, setreuid.2, setsid.2, setuid.2, sgetmask.2, shmctl.2, shmget.2, shmop.2, sigaction.2, sigaltstack.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, socket.2, socketcall.2, socketpair.2, splice.2, spu_create.2, spu_run.2, stat.2, statfs.2, statx.2, subpage_prot.2, swapon.2, symlink.2, sync.2, sync_file_range.2, syscalls.2, sysctl.2, sysinfo.2, syslog.2, tee.2, time.2, timer_create.2, timer_getoverrun.2, timer_settime.2, timerfd_create.2, times.2, tkill.2, truncate.2, umask.2, umount.2, unimplemented.2, unlink.2, unshare.2, uselib.2, userfaultfd.2, utime.2, utimensat.2, vfork.2, vmsplice.2, wait.2, wait4.2, write.2: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 07:30:51 +00:00
|
|
|
.IP
|
2016-11-20 10:39:25 +00:00
|
|
|
Applications that use the O32 FP32 ABI can operate only when this bit is
|
2016-11-20 00:55:11 +00:00
|
|
|
.I unset
|
|
|
|
.RB ( FR=0 ;
|
|
|
|
or they can be used with FRE enabled, see below).
|
2016-11-20 10:39:25 +00:00
|
|
|
Applications that use the O32 FP64 ABI
|
|
|
|
(and the O32 FP64A ABI, which exists to
|
|
|
|
provide the ability to operate with existing FP32 code; see below)
|
|
|
|
can operate only when this bit is
|
2016-11-20 00:55:11 +00:00
|
|
|
.I set
|
|
|
|
.RB ( FR=1 ).
|
2016-11-20 17:28:02 +00:00
|
|
|
Applications that use the O32 FPXX ABI can operate with either
|
2016-11-20 17:25:34 +00:00
|
|
|
.BR FR=0
|
|
|
|
or
|
|
|
|
.BR FR=1 .
|
2016-11-20 00:55:11 +00:00
|
|
|
.TP
|
2016-11-20 10:55:37 +00:00
|
|
|
.BR PR_FP_MODE_FRE
|
2016-11-20 17:25:34 +00:00
|
|
|
Enable emulation of 32-bit floating-point mode.
|
2016-11-20 10:32:37 +00:00
|
|
|
When this mode is enabled,
|
2016-11-20 17:25:34 +00:00
|
|
|
it emulates 32-bit floating-point operations
|
|
|
|
by raising a reserved-instruction exception
|
2016-11-20 10:32:37 +00:00
|
|
|
on every instruction that uses 32-bit formats and
|
2016-11-20 10:39:25 +00:00
|
|
|
the kernel then handles the instruction in software.
|
|
|
|
(The problem lies in the discrepancy of handling odd-numbered registers
|
|
|
|
which are the high 32 bits of 64-bit registers with even numbers in
|
2016-11-20 00:55:11 +00:00
|
|
|
.B FR=0
|
2016-11-20 10:39:25 +00:00
|
|
|
mode and the lower 32-bit parts of odd-numbered 64-bit registers in
|
2016-11-20 00:55:11 +00:00
|
|
|
.B FR=1
|
2016-11-20 10:39:25 +00:00
|
|
|
mode.)
|
|
|
|
Enabling this bit is necessary when code with the O32 FP32 ABI should operate
|
|
|
|
with code with compatible the O32 FPXX or O32 FP64A ABIs (which require
|
2016-11-20 00:55:11 +00:00
|
|
|
.B FR=1
|
2016-11-20 10:32:37 +00:00
|
|
|
FPU mode) or when it is executed on newer hardware (MIPS R6 onwards)
|
|
|
|
which lacks
|
2016-11-20 00:55:11 +00:00
|
|
|
.B FR=0
|
2016-11-20 10:39:25 +00:00
|
|
|
mode support when a binary with the FP32 ABI is used.
|
2016-11-20 00:55:11 +00:00
|
|
|
.IP
|
2016-11-20 10:39:25 +00:00
|
|
|
Note that this mode makes sense only when the FPU is in 64-bit mode
|
|
|
|
.RB ( FR=1 ).
|
2016-11-20 00:55:11 +00:00
|
|
|
.IP
|
2016-11-20 10:39:25 +00:00
|
|
|
Note that the use of emulation inherently has a significant performance hit
|
2016-11-20 10:32:37 +00:00
|
|
|
and should be avoided if possible.
|
2016-11-20 00:55:11 +00:00
|
|
|
.RE
|
|
|
|
.IP
|
2016-11-20 17:25:34 +00:00
|
|
|
In the N32/N64 ABI, 64-bit floating-point mode is always used,
|
|
|
|
so FPU emulation is not required and the FPU always operates in
|
2016-11-20 00:55:11 +00:00
|
|
|
.B FR=1
|
|
|
|
mode.
|
|
|
|
.IP
|
2016-11-20 17:25:34 +00:00
|
|
|
This option is mainly intended for use by the dynamic linker
|
|
|
|
.RB ( ld.so (8)).
|
2016-11-20 00:55:11 +00:00
|
|
|
.IP
|
2016-11-20 10:39:25 +00:00
|
|
|
The arguments
|
|
|
|
.IR arg3 ,
|
|
|
|
.IR arg4 ,
|
|
|
|
and
|
|
|
|
.IR arg5
|
2016-11-20 00:55:11 +00:00
|
|
|
are ignored.
|
2020-05-12 16:36:49 +00:00
|
|
|
.\" prctl PR_GET_FP_MODE
|
2016-11-20 00:55:11 +00:00
|
|
|
.TP
|
|
|
|
.BR PR_GET_FP_MODE " (since Linux 4.0, only on MIPS)"
|
2019-10-02 03:05:50 +00:00
|
|
|
Return (as the function result)
|
|
|
|
the current floating-point mode (see the description of
|
2016-11-20 00:55:11 +00:00
|
|
|
.B PR_SET_FP_MODE
|
|
|
|
for details).
|
_syscall.2, bpf.2, cacheflush.2, capget.2, chdir.2, chmod.2, chroot.2, clock_getres.2, clock_nanosleep.2, clone.2, close.2, connect.2, copy_file_range.2, create_module.2, delete_module.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, eventfd.2, execve.2, execveat.2, fallocate.2, flock.2, fork.2, fsync.2, futex.2, futimesat.2, get_kernel_syms.2, get_mempolicy.2, get_robust_list.2, getcpu.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getitimer.2, getpagesize.2, getpeername.2, getpriority.2, getrandom.2, getresuid.2, getrlimit.2, getrusage.2, getsid.2, getsockname.2, getsockopt.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, init_module.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, intro.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl_fat.2, ioctl_ficlonerange.2, ioctl_fideduperange.2, ioctl_tty.2, ioctl_userfaultfd.2, ioperm.2, iopl.2, ioprio_set.2, kcmp.2, kexec_load.2, keyctl.2, kill.2, link.2, listen.2, listxattr.2, llseek.2, lookup_dcookie.2, lseek.2, madvise.2, mbind.2, membarrier.2, memfd_create.2, migrate_pages.2, mincore.2, mkdir.2, mknod.2, mlock.2, mmap.2, mmap2.2, modify_ldt.2, move_pages.2, mprotect.2, mq_getsetattr.2, mremap.2, msgctl.2, msgget.2, msgop.2, msync.2, nanosleep.2, nfsservctl.2, nice.2, open_by_handle_at.2, outb.2, perf_event_open.2, perfmonctl.2, personality.2, pivot_root.2, pkey_alloc.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, ptrace.2, query_module.2, quotactl.2, read.2, readahead.2, readdir.2, readv.2, reboot.2, recv.2, recvmmsg.2, remap_file_pages.2, rename.2, request_key.2, restart_syscall.2, rt_sigqueueinfo.2, s390_pci_mmio_write.2, s390_runtime_instr.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setattr.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, seccomp.2, select.2, select_tut.2, semctl.2, semget.2, semop.2, send.2, sendfile.2, sendmmsg.2, set_mempolicy.2, set_thread_area.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setns.2, setpgid.2, setresuid.2, setreuid.2, setsid.2, setuid.2, sgetmask.2, shmctl.2, shmget.2, shmop.2, sigaction.2, sigaltstack.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, socket.2, socketcall.2, socketpair.2, splice.2, spu_create.2, spu_run.2, stat.2, statfs.2, statx.2, subpage_prot.2, swapon.2, symlink.2, sync.2, sync_file_range.2, syscalls.2, sysctl.2, sysinfo.2, syslog.2, tee.2, time.2, timer_create.2, timer_getoverrun.2, timer_settime.2, timerfd_create.2, times.2, tkill.2, truncate.2, umask.2, umount.2, unimplemented.2, unlink.2, unshare.2, uselib.2, userfaultfd.2, utime.2, utimensat.2, vfork.2, vmsplice.2, wait.2, wait4.2, write.2: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 07:30:51 +00:00
|
|
|
.IP
|
2016-11-20 10:39:25 +00:00
|
|
|
On success,
|
2016-11-20 17:25:34 +00:00
|
|
|
the call returns a bit mask which represents the current floating-point mode.
|
_syscall.2, bpf.2, cacheflush.2, capget.2, chdir.2, chmod.2, chroot.2, clock_getres.2, clock_nanosleep.2, clone.2, close.2, connect.2, copy_file_range.2, create_module.2, delete_module.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, eventfd.2, execve.2, execveat.2, fallocate.2, flock.2, fork.2, fsync.2, futex.2, futimesat.2, get_kernel_syms.2, get_mempolicy.2, get_robust_list.2, getcpu.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getitimer.2, getpagesize.2, getpeername.2, getpriority.2, getrandom.2, getresuid.2, getrlimit.2, getrusage.2, getsid.2, getsockname.2, getsockopt.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, init_module.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, intro.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl_fat.2, ioctl_ficlonerange.2, ioctl_fideduperange.2, ioctl_tty.2, ioctl_userfaultfd.2, ioperm.2, iopl.2, ioprio_set.2, kcmp.2, kexec_load.2, keyctl.2, kill.2, link.2, listen.2, listxattr.2, llseek.2, lookup_dcookie.2, lseek.2, madvise.2, mbind.2, membarrier.2, memfd_create.2, migrate_pages.2, mincore.2, mkdir.2, mknod.2, mlock.2, mmap.2, mmap2.2, modify_ldt.2, move_pages.2, mprotect.2, mq_getsetattr.2, mremap.2, msgctl.2, msgget.2, msgop.2, msync.2, nanosleep.2, nfsservctl.2, nice.2, open_by_handle_at.2, outb.2, perf_event_open.2, perfmonctl.2, personality.2, pivot_root.2, pkey_alloc.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, ptrace.2, query_module.2, quotactl.2, read.2, readahead.2, readdir.2, readv.2, reboot.2, recv.2, recvmmsg.2, remap_file_pages.2, rename.2, request_key.2, restart_syscall.2, rt_sigqueueinfo.2, s390_pci_mmio_write.2, s390_runtime_instr.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setattr.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, seccomp.2, select.2, select_tut.2, semctl.2, semget.2, semop.2, send.2, sendfile.2, sendmmsg.2, set_mempolicy.2, set_thread_area.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setns.2, setpgid.2, setresuid.2, setreuid.2, setsid.2, setuid.2, sgetmask.2, shmctl.2, shmget.2, shmop.2, sigaction.2, sigaltstack.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, socket.2, socketcall.2, socketpair.2, splice.2, spu_create.2, spu_run.2, stat.2, statfs.2, statx.2, subpage_prot.2, swapon.2, symlink.2, sync.2, sync_file_range.2, syscalls.2, sysctl.2, sysinfo.2, syslog.2, tee.2, time.2, timer_create.2, timer_getoverrun.2, timer_settime.2, timerfd_create.2, times.2, tkill.2, truncate.2, umask.2, umount.2, unimplemented.2, unlink.2, unshare.2, uselib.2, userfaultfd.2, utime.2, utimensat.2, vfork.2, vmsplice.2, wait.2, wait4.2, write.2: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 07:30:51 +00:00
|
|
|
.IP
|
2016-11-20 10:39:25 +00:00
|
|
|
The arguments
|
|
|
|
.IR arg2 ,
|
|
|
|
.IR arg3 ,
|
|
|
|
.IR arg4 ,
|
|
|
|
and
|
|
|
|
.IR arg5
|
2016-11-20 00:55:11 +00:00
|
|
|
are ignored.
|
2020-05-12 16:36:49 +00:00
|
|
|
.\" prctl PR_SET_FPEMU
|
2008-07-09 11:53:48 +00:00
|
|
|
.TP
|
|
|
|
.BR PR_SET_FPEMU " (since Linux 2.4.18, 2.5.9, only on ia64)"
|
2006-09-26 12:03:11 +00:00
|
|
|
Set floating-point emulation control bits to \fIarg2\fP.
|
2015-05-19 07:51:24 +00:00
|
|
|
Pass
|
|
|
|
.B PR_FPEMU_NOPRINT
|
|
|
|
to silently emulate floating-point operation accesses, or
|
|
|
|
.B PR_FPEMU_SIGFPE
|
|
|
|
to not emulate floating-point operations and send
|
2007-06-21 05:38:48 +00:00
|
|
|
.B SIGFPE
|
|
|
|
instead.
|
2020-05-12 16:36:49 +00:00
|
|
|
.\" prctl PR_GET_FPEMU
|
2006-09-26 12:03:11 +00:00
|
|
|
.TP
|
2008-07-09 11:53:48 +00:00
|
|
|
.BR PR_GET_FPEMU " (since Linux 2.4.18, 2.5.9, only on ia64)"
|
|
|
|
Return floating-point emulation control bits,
|
|
|
|
in the location pointed to by
|
|
|
|
.IR "(int\ *) arg2" .
|
2020-05-12 16:36:49 +00:00
|
|
|
.\" prctl PR_SET_FPEXC
|
2006-09-26 12:03:11 +00:00
|
|
|
.TP
|
2008-07-09 11:53:48 +00:00
|
|
|
.BR PR_SET_FPEXC " (since Linux 2.4.21, 2.5.32, only on PowerPC)"
|
2007-04-24 16:44:51 +00:00
|
|
|
Set floating-point exception mode to \fIarg2\fP.
|
|
|
|
Pass \fBPR_FP_EXC_SW_ENABLE\fP to use FPEXC for FP exception enables,
|
2008-07-23 02:57:20 +00:00
|
|
|
\fBPR_FP_EXC_DIV\fP for floating-point divide by zero,
|
|
|
|
\fBPR_FP_EXC_OVF\fP for floating-point overflow,
|
|
|
|
\fBPR_FP_EXC_UND\fP for floating-point underflow,
|
|
|
|
\fBPR_FP_EXC_RES\fP for floating-point inexact result,
|
|
|
|
\fBPR_FP_EXC_INV\fP for floating-point invalid operation,
|
2006-09-26 12:03:11 +00:00
|
|
|
\fBPR_FP_EXC_DISABLED\fP for FP exceptions disabled,
|
2010-01-16 17:01:12 +00:00
|
|
|
\fBPR_FP_EXC_NONRECOV\fP for async nonrecoverable exception mode,
|
2006-09-26 12:03:11 +00:00
|
|
|
\fBPR_FP_EXC_ASYNC\fP for async recoverable exception mode,
|
|
|
|
\fBPR_FP_EXC_PRECISE\fP for precise exception mode.
|
2020-05-12 16:36:49 +00:00
|
|
|
.\" prctl PR_GET_FPEXC
|
2006-09-26 12:03:11 +00:00
|
|
|
.TP
|
2008-07-09 11:53:48 +00:00
|
|
|
.BR PR_GET_FPEXC " (since Linux 2.4.21, 2.5.32, only on PowerPC)"
|
|
|
|
Return floating-point exception mode,
|
|
|
|
in the location pointed to by
|
|
|
|
.IR "(int\ *) arg2" .
|
2020-05-12 16:36:50 +00:00
|
|
|
.\" prctl PR_SET_IO_FLUSHER
|
|
|
|
.TP
|
|
|
|
.BR PR_SET_IO_FLUSHER " (since Linux 5.6)"
|
|
|
|
If a user process is involved in the block layer or filesystem I/O path,
|
|
|
|
and can allocate memory while processing I/O requests it must set
|
|
|
|
\fIarg2\fP to 1.
|
|
|
|
This will put the process in the IO_FLUSHER state,
|
|
|
|
which allows it special treatment to make progress when allocating memory.
|
|
|
|
If \fIarg2\fP is 0, the process will clear the IO_FLUSHER state, and
|
|
|
|
the default behavior will be used.
|
|
|
|
.IP
|
|
|
|
The calling process must have the
|
|
|
|
.BR CAP_SYS_RESOURCE
|
|
|
|
capability.
|
|
|
|
.IP
|
|
|
|
.IR arg3 ,
|
|
|
|
.IR arg4 ,
|
|
|
|
and
|
|
|
|
.IR arg5
|
|
|
|
must be zero.
|
|
|
|
.IP
|
|
|
|
The IO_FLUSHER state is inherited by a child process created via
|
|
|
|
.BR fork (2)
|
|
|
|
and is preserved across
|
|
|
|
.BR execve (2).
|
|
|
|
.IP
|
|
|
|
Examples of IO_FLUSHER applications are FUSE daemons, SCSI device
|
|
|
|
emulation daemons, and daemons that perform error handling like multipath
|
|
|
|
path recovery applications.
|
|
|
|
.\" prctl PR_GET_IO_FLUSHER
|
|
|
|
.TP
|
|
|
|
.B PR_GET_IO_FLUSHER (Since Linux 5.6)
|
|
|
|
Return (as the function result) the IO_FLUSHER state of the caller.
|
|
|
|
A value of 1 indicates that the caller is in the IO_FLUSHER state;
|
|
|
|
0 indicates that the caller is not in the IO_FLUSHER state.
|
|
|
|
.IP
|
|
|
|
The calling process must have the
|
|
|
|
.BR CAP_SYS_RESOURCE
|
|
|
|
capability.
|
|
|
|
.IP
|
|
|
|
.IR arg2 ,
|
|
|
|
.IR arg3 ,
|
|
|
|
.IR arg4 ,
|
|
|
|
and
|
|
|
|
.IR arg5
|
|
|
|
must be zero.
|
2020-05-12 16:36:49 +00:00
|
|
|
.\" prctl PR_SET_KEEPCAPS
|
2008-07-09 11:53:48 +00:00
|
|
|
.TP
|
2008-07-16 14:01:02 +00:00
|
|
|
.BR PR_SET_KEEPCAPS " (since Linux 2.2.18)"
|
2017-12-02 15:12:07 +00:00
|
|
|
Set the state of the calling thread's "keep capabilities" flag.
|
2019-05-16 17:22:32 +00:00
|
|
|
The effect of this flag is described in
|
2017-12-02 15:12:07 +00:00
|
|
|
.BR capabilities (7).
|
2008-07-16 14:01:02 +00:00
|
|
|
.I arg2
|
2017-12-02 15:12:07 +00:00
|
|
|
must be either 0 (clear the flag)
|
|
|
|
or 1 (set the flag).
|
2010-05-13 04:16:25 +00:00
|
|
|
The "keep capabilities" value will be reset to 0 on subsequent calls to
|
2008-07-16 14:01:02 +00:00
|
|
|
.BR execve (2).
|
2020-05-12 16:36:49 +00:00
|
|
|
.\" prctl PR_GET_KEEPCAPS
|
2008-07-16 14:01:02 +00:00
|
|
|
.TP
|
|
|
|
.BR PR_GET_KEEPCAPS " (since Linux 2.2.18)"
|
2016-02-28 00:32:41 +00:00
|
|
|
Return (as the function result) the current state of the calling thread's
|
2008-07-16 14:01:02 +00:00
|
|
|
"keep capabilities" flag.
|
2017-12-02 15:12:07 +00:00
|
|
|
See
|
|
|
|
.BR capabilities (7)
|
|
|
|
for a description of this flag.
|
2020-05-12 16:36:49 +00:00
|
|
|
.\" prctl PR_MCE_KILL
|
2008-07-16 14:01:02 +00:00
|
|
|
.TP
|
2015-12-04 09:30:46 +00:00
|
|
|
.BR PR_MCE_KILL " (since Linux 2.6.32)"
|
2016-12-15 10:18:17 +00:00
|
|
|
Set the machine check memory corruption kill policy for the calling thread.
|
2015-12-04 09:30:46 +00:00
|
|
|
If
|
|
|
|
.I arg2
|
|
|
|
is
|
|
|
|
.BR PR_MCE_KILL_CLEAR ,
|
|
|
|
clear the thread memory corruption kill policy and use the system-wide default.
|
|
|
|
(The system-wide default is defined by
|
|
|
|
.IR /proc/sys/vm/memory_failure_early_kill ;
|
|
|
|
see
|
|
|
|
.BR proc (5).)
|
|
|
|
If
|
|
|
|
.I arg2
|
|
|
|
is
|
|
|
|
.BR PR_MCE_KILL_SET ,
|
|
|
|
use a thread-specific memory corruption kill policy.
|
|
|
|
In this case,
|
|
|
|
.I arg3
|
|
|
|
defines whether the policy is
|
|
|
|
.I early kill
|
|
|
|
.RB ( PR_MCE_KILL_EARLY ),
|
|
|
|
.I late kill
|
|
|
|
.RB ( PR_MCE_KILL_LATE ),
|
|
|
|
or the system-wide default
|
|
|
|
.RB ( PR_MCE_KILL_DEFAULT ).
|
|
|
|
Early kill means that the thread receives a
|
|
|
|
.B SIGBUS
|
|
|
|
signal as soon as hardware memory corruption is detected inside
|
|
|
|
its address space.
|
|
|
|
In late kill mode, the process is killed only when it accesses a corrupted page.
|
|
|
|
See
|
|
|
|
.BR sigaction (2)
|
|
|
|
for more information on the
|
|
|
|
.BR SIGBUS
|
|
|
|
signal.
|
|
|
|
The policy is inherited by children.
|
|
|
|
The remaining unused
|
|
|
|
.BR prctl ()
|
|
|
|
arguments must be zero for future compatibility.
|
2020-05-12 16:36:49 +00:00
|
|
|
.\" prctl PR_MCE_KILL_GET
|
2008-07-16 14:01:02 +00:00
|
|
|
.TP
|
2015-12-04 09:30:46 +00:00
|
|
|
.BR PR_MCE_KILL_GET " (since Linux 2.6.32)"
|
2019-10-02 04:20:45 +00:00
|
|
|
Return (as the function result)
|
|
|
|
the current per-process machine check kill policy.
|
2015-12-04 09:30:46 +00:00
|
|
|
All unused
|
|
|
|
.BR prctl ()
|
|
|
|
arguments must be zero.
|
2020-05-12 16:36:49 +00:00
|
|
|
.\" prctl PR_SET_MM
|
2008-07-16 14:01:02 +00:00
|
|
|
.TP
|
2015-12-04 09:30:46 +00:00
|
|
|
.BR PR_SET_MM " (since Linux 3.3)"
|
|
|
|
.\" commit 028ee4be34a09a6d48bdf30ab991ae933a7bc036
|
|
|
|
Modify certain kernel memory map descriptor fields
|
|
|
|
of the calling process.
|
|
|
|
Usually these fields are set by the kernel and dynamic loader (see
|
|
|
|
.BR ld.so (8)
|
|
|
|
for more information) and a regular application should not use this feature.
|
|
|
|
However, there are cases, such as self-modifying programs,
|
|
|
|
where a program might find it useful to change its own memory map.
|
_syscall.2, bpf.2, cacheflush.2, capget.2, chdir.2, chmod.2, chroot.2, clock_getres.2, clock_nanosleep.2, clone.2, close.2, connect.2, copy_file_range.2, create_module.2, delete_module.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, eventfd.2, execve.2, execveat.2, fallocate.2, flock.2, fork.2, fsync.2, futex.2, futimesat.2, get_kernel_syms.2, get_mempolicy.2, get_robust_list.2, getcpu.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getitimer.2, getpagesize.2, getpeername.2, getpriority.2, getrandom.2, getresuid.2, getrlimit.2, getrusage.2, getsid.2, getsockname.2, getsockopt.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, init_module.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, intro.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl_fat.2, ioctl_ficlonerange.2, ioctl_fideduperange.2, ioctl_tty.2, ioctl_userfaultfd.2, ioperm.2, iopl.2, ioprio_set.2, kcmp.2, kexec_load.2, keyctl.2, kill.2, link.2, listen.2, listxattr.2, llseek.2, lookup_dcookie.2, lseek.2, madvise.2, mbind.2, membarrier.2, memfd_create.2, migrate_pages.2, mincore.2, mkdir.2, mknod.2, mlock.2, mmap.2, mmap2.2, modify_ldt.2, move_pages.2, mprotect.2, mq_getsetattr.2, mremap.2, msgctl.2, msgget.2, msgop.2, msync.2, nanosleep.2, nfsservctl.2, nice.2, open_by_handle_at.2, outb.2, perf_event_open.2, perfmonctl.2, personality.2, pivot_root.2, pkey_alloc.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, ptrace.2, query_module.2, quotactl.2, read.2, readahead.2, readdir.2, readv.2, reboot.2, recv.2, recvmmsg.2, remap_file_pages.2, rename.2, request_key.2, restart_syscall.2, rt_sigqueueinfo.2, s390_pci_mmio_write.2, s390_runtime_instr.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setattr.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, seccomp.2, select.2, select_tut.2, semctl.2, semget.2, semop.2, send.2, sendfile.2, sendmmsg.2, set_mempolicy.2, set_thread_area.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setns.2, setpgid.2, setresuid.2, setreuid.2, setsid.2, setuid.2, sgetmask.2, shmctl.2, shmget.2, shmop.2, sigaction.2, sigaltstack.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, socket.2, socketcall.2, socketpair.2, splice.2, spu_create.2, spu_run.2, stat.2, statfs.2, statx.2, subpage_prot.2, swapon.2, symlink.2, sync.2, sync_file_range.2, syscalls.2, sysctl.2, sysinfo.2, syslog.2, tee.2, time.2, timer_create.2, timer_getoverrun.2, timer_settime.2, timerfd_create.2, times.2, tkill.2, truncate.2, umask.2, umount.2, unimplemented.2, unlink.2, unshare.2, uselib.2, userfaultfd.2, utime.2, utimensat.2, vfork.2, vmsplice.2, wait.2, wait4.2, write.2: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 07:30:51 +00:00
|
|
|
.IP
|
2015-12-04 09:30:46 +00:00
|
|
|
The calling process must have the
|
|
|
|
.BR CAP_SYS_RESOURCE
|
|
|
|
capability.
|
|
|
|
The value in
|
|
|
|
.I arg2
|
|
|
|
is one of the options below, while
|
|
|
|
.I arg3
|
|
|
|
provides a new value for the option.
|
2017-02-15 20:14:41 +00:00
|
|
|
The
|
|
|
|
.I arg4
|
|
|
|
and
|
|
|
|
.I arg5
|
|
|
|
arguments must be zero if unused.
|
_syscall.2, bpf.2, cacheflush.2, capget.2, chdir.2, chmod.2, chroot.2, clock_getres.2, clock_nanosleep.2, clone.2, close.2, connect.2, copy_file_range.2, create_module.2, delete_module.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, eventfd.2, execve.2, execveat.2, fallocate.2, flock.2, fork.2, fsync.2, futex.2, futimesat.2, get_kernel_syms.2, get_mempolicy.2, get_robust_list.2, getcpu.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getitimer.2, getpagesize.2, getpeername.2, getpriority.2, getrandom.2, getresuid.2, getrlimit.2, getrusage.2, getsid.2, getsockname.2, getsockopt.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, init_module.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, intro.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl_fat.2, ioctl_ficlonerange.2, ioctl_fideduperange.2, ioctl_tty.2, ioctl_userfaultfd.2, ioperm.2, iopl.2, ioprio_set.2, kcmp.2, kexec_load.2, keyctl.2, kill.2, link.2, listen.2, listxattr.2, llseek.2, lookup_dcookie.2, lseek.2, madvise.2, mbind.2, membarrier.2, memfd_create.2, migrate_pages.2, mincore.2, mkdir.2, mknod.2, mlock.2, mmap.2, mmap2.2, modify_ldt.2, move_pages.2, mprotect.2, mq_getsetattr.2, mremap.2, msgctl.2, msgget.2, msgop.2, msync.2, nanosleep.2, nfsservctl.2, nice.2, open_by_handle_at.2, outb.2, perf_event_open.2, perfmonctl.2, personality.2, pivot_root.2, pkey_alloc.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, ptrace.2, query_module.2, quotactl.2, read.2, readahead.2, readdir.2, readv.2, reboot.2, recv.2, recvmmsg.2, remap_file_pages.2, rename.2, request_key.2, restart_syscall.2, rt_sigqueueinfo.2, s390_pci_mmio_write.2, s390_runtime_instr.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setattr.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, seccomp.2, select.2, select_tut.2, semctl.2, semget.2, semop.2, send.2, sendfile.2, sendmmsg.2, set_mempolicy.2, set_thread_area.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setns.2, setpgid.2, setresuid.2, setreuid.2, setsid.2, setuid.2, sgetmask.2, shmctl.2, shmget.2, shmop.2, sigaction.2, sigaltstack.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, socket.2, socketcall.2, socketpair.2, splice.2, spu_create.2, spu_run.2, stat.2, statfs.2, statx.2, subpage_prot.2, swapon.2, symlink.2, sync.2, sync_file_range.2, syscalls.2, sysctl.2, sysinfo.2, syslog.2, tee.2, time.2, timer_create.2, timer_getoverrun.2, timer_settime.2, timerfd_create.2, times.2, tkill.2, truncate.2, umask.2, umount.2, unimplemented.2, unlink.2, unshare.2, uselib.2, userfaultfd.2, utime.2, utimensat.2, vfork.2, vmsplice.2, wait.2, wait4.2, write.2: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 07:30:51 +00:00
|
|
|
.IP
|
2017-02-15 20:14:43 +00:00
|
|
|
Before Linux 3.10,
|
2018-11-05 07:14:44 +00:00
|
|
|
.\" commit 52b3694157e3aa6df871e283115652ec6f2d31e0
|
2017-02-15 20:14:43 +00:00
|
|
|
this feature is available only if the kernel is built with the
|
|
|
|
.BR CONFIG_CHECKPOINT_RESTORE
|
|
|
|
option enabled.
|
2015-12-04 09:30:46 +00:00
|
|
|
.RS
|
|
|
|
.TP
|
|
|
|
.BR PR_SET_MM_START_CODE
|
|
|
|
Set the address above which the program text can run.
|
|
|
|
The corresponding memory area must be readable and executable,
|
2017-09-20 06:54:15 +00:00
|
|
|
but not writable or shareable (see
|
2015-12-04 09:30:46 +00:00
|
|
|
.BR mprotect (2)
|
2012-10-22 07:18:40 +00:00
|
|
|
and
|
2015-12-04 09:30:46 +00:00
|
|
|
.BR mmap (2)
|
|
|
|
for more information).
|
2012-10-22 07:13:08 +00:00
|
|
|
.TP
|
2015-12-04 09:30:46 +00:00
|
|
|
.BR PR_SET_MM_END_CODE
|
|
|
|
Set the address below which the program text can run.
|
|
|
|
The corresponding memory area must be readable and executable,
|
2017-09-20 06:54:15 +00:00
|
|
|
but not writable or shareable.
|
2012-10-22 07:13:08 +00:00
|
|
|
.TP
|
2015-12-04 09:30:46 +00:00
|
|
|
.BR PR_SET_MM_START_DATA
|
|
|
|
Set the address above which initialized and
|
|
|
|
uninitialized (bss) data are placed.
|
|
|
|
The corresponding memory area must be readable and writable,
|
2017-09-20 06:54:15 +00:00
|
|
|
but not executable or shareable.
|
2008-07-16 14:01:02 +00:00
|
|
|
.TP
|
2015-12-04 09:30:46 +00:00
|
|
|
.B PR_SET_MM_END_DATA
|
|
|
|
Set the address below which initialized and
|
|
|
|
uninitialized (bss) data are placed.
|
|
|
|
The corresponding memory area must be readable and writable,
|
2017-09-20 06:54:15 +00:00
|
|
|
but not executable or shareable.
|
2008-07-16 14:01:02 +00:00
|
|
|
.TP
|
2015-12-04 09:30:46 +00:00
|
|
|
.BR PR_SET_MM_START_STACK
|
|
|
|
Set the start address of the stack.
|
|
|
|
The corresponding memory area must be readable and writable.
|
2013-01-10 22:54:12 +00:00
|
|
|
.TP
|
2015-12-04 09:30:46 +00:00
|
|
|
.BR PR_SET_MM_START_BRK
|
|
|
|
Set the address above which the program heap can be expanded with
|
|
|
|
.BR brk (2)
|
|
|
|
call.
|
|
|
|
The address must be greater than the ending address of
|
|
|
|
the current program data segment.
|
|
|
|
In addition, the combined size of the resulting heap and
|
|
|
|
the size of the data segment can't exceed the
|
|
|
|
.BR RLIMIT_DATA
|
|
|
|
resource limit (see
|
|
|
|
.BR setrlimit (2)).
|
|
|
|
.TP
|
|
|
|
.BR PR_SET_MM_BRK
|
|
|
|
Set the current
|
|
|
|
.BR brk (2)
|
|
|
|
value.
|
|
|
|
The requirements for the address are the same as for the
|
|
|
|
.BR PR_SET_MM_START_BRK
|
|
|
|
option.
|
add_key.2, bpf.2, fcntl.2, futex.2, listxattr.2, perf_event_open.2, prctl.2, request_key.2, sigaltstack.2, __ppc_set_ppr_med.3, __ppc_yield.3, getw.3, setbuf.3, setjmp.3, lirc.4, core.5, securetty.5, inode.7, keyrings.7, process-keyring.7, user-keyring.7, ld.so.8: srcfix: use .PP instead of .P
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-17 23:13:44 +00:00
|
|
|
.PP
|
2015-12-04 09:30:46 +00:00
|
|
|
The following options are available since Linux 3.5.
|
|
|
|
.\" commit fe8c7f5cbf91124987106faa3bdf0c8b955c4cf7
|
|
|
|
.TP
|
|
|
|
.BR PR_SET_MM_ARG_START
|
|
|
|
Set the address above which the program command line is placed.
|
|
|
|
.TP
|
|
|
|
.BR PR_SET_MM_ARG_END
|
|
|
|
Set the address below which the program command line is placed.
|
|
|
|
.TP
|
|
|
|
.BR PR_SET_MM_ENV_START
|
|
|
|
Set the address above which the program environment is placed.
|
|
|
|
.TP
|
|
|
|
.BR PR_SET_MM_ENV_END
|
|
|
|
Set the address below which the program environment is placed.
|
|
|
|
.IP
|
|
|
|
The address passed with
|
|
|
|
.BR PR_SET_MM_ARG_START ,
|
|
|
|
.BR PR_SET_MM_ARG_END ,
|
|
|
|
.BR PR_SET_MM_ENV_START ,
|
|
|
|
and
|
|
|
|
.BR PR_SET_MM_ENV_END
|
|
|
|
should belong to a process stack area.
|
|
|
|
Thus, the corresponding memory area must be readable, writable, and
|
|
|
|
(depending on the kernel configuration) have the
|
|
|
|
.BR MAP_GROWSDOWN
|
|
|
|
attribute set (see
|
|
|
|
.BR mmap (2)).
|
|
|
|
.TP
|
|
|
|
.BR PR_SET_MM_AUXV
|
|
|
|
Set a new auxiliary vector.
|
|
|
|
The
|
|
|
|
.I arg3
|
|
|
|
argument should provide the address of the vector.
|
|
|
|
The
|
|
|
|
.I arg4
|
|
|
|
is the size of the vector.
|
|
|
|
.TP
|
|
|
|
.BR PR_SET_MM_EXE_FILE
|
|
|
|
.\" commit b32dfe377102ce668775f8b6b1461f7ad428f8b6
|
|
|
|
Supersede the
|
|
|
|
.IR /proc/pid/exe
|
|
|
|
symbolic link with a new one pointing to a new executable file
|
|
|
|
identified by the file descriptor provided in
|
|
|
|
.I arg3
|
|
|
|
argument.
|
|
|
|
The file descriptor should be obtained with a regular
|
|
|
|
.BR open (2)
|
|
|
|
call.
|
|
|
|
.IP
|
|
|
|
To change the symbolic link, one needs to unmap all existing
|
|
|
|
executable memory areas, including those created by the kernel itself
|
|
|
|
(for example the kernel usually creates at least one executable
|
|
|
|
memory area for the ELF
|
|
|
|
.IR \.text
|
|
|
|
section).
|
|
|
|
.IP
|
2018-11-05 07:21:54 +00:00
|
|
|
In Linux 4.9 and earlier, the
|
2018-11-05 02:21:47 +00:00
|
|
|
.\" commit 3fb4afd9a504c2386b8435028d43283216bf588e
|
|
|
|
.BR PR_SET_MM_EXE_FILE
|
2018-11-05 07:21:54 +00:00
|
|
|
operation can be performed only once in a process's lifetime;
|
|
|
|
attempting to perform the operation a second time results in the error
|
|
|
|
.BR EPERM .
|
|
|
|
This restriction was enforced for security reasons that were subsequently
|
|
|
|
deemed specious,
|
|
|
|
and the restriction was removed in Linux 4.10 because some
|
|
|
|
user-space applications needed to perform this operation more than once.
|
add_key.2, bpf.2, fcntl.2, futex.2, listxattr.2, perf_event_open.2, prctl.2, request_key.2, sigaltstack.2, __ppc_set_ppr_med.3, __ppc_yield.3, getw.3, setbuf.3, setjmp.3, lirc.4, core.5, securetty.5, inode.7, keyrings.7, process-keyring.7, user-keyring.7, ld.so.8: srcfix: use .PP instead of .P
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-17 23:13:44 +00:00
|
|
|
.PP
|
2017-02-15 20:14:42 +00:00
|
|
|
The following options are available since Linux 3.18.
|
|
|
|
.\" commit f606b77f1a9e362451aca8f81d8f36a3a112139e
|
|
|
|
.TP
|
|
|
|
.BR PR_SET_MM_MAP
|
|
|
|
Provides one-shot access to all the addresses by passing in a
|
|
|
|
.I struct prctl_mm_map
|
|
|
|
(as defined in \fI<linux/prctl.h>\fP).
|
|
|
|
The
|
|
|
|
.I arg4
|
|
|
|
argument should provide the size of the struct.
|
_syscall.2, bpf.2, cacheflush.2, capget.2, chdir.2, chmod.2, chroot.2, clock_getres.2, clock_nanosleep.2, clone.2, close.2, connect.2, copy_file_range.2, create_module.2, delete_module.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, eventfd.2, execve.2, execveat.2, fallocate.2, flock.2, fork.2, fsync.2, futex.2, futimesat.2, get_kernel_syms.2, get_mempolicy.2, get_robust_list.2, getcpu.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getitimer.2, getpagesize.2, getpeername.2, getpriority.2, getrandom.2, getresuid.2, getrlimit.2, getrusage.2, getsid.2, getsockname.2, getsockopt.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, init_module.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, intro.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl_fat.2, ioctl_ficlonerange.2, ioctl_fideduperange.2, ioctl_tty.2, ioctl_userfaultfd.2, ioperm.2, iopl.2, ioprio_set.2, kcmp.2, kexec_load.2, keyctl.2, kill.2, link.2, listen.2, listxattr.2, llseek.2, lookup_dcookie.2, lseek.2, madvise.2, mbind.2, membarrier.2, memfd_create.2, migrate_pages.2, mincore.2, mkdir.2, mknod.2, mlock.2, mmap.2, mmap2.2, modify_ldt.2, move_pages.2, mprotect.2, mq_getsetattr.2, mremap.2, msgctl.2, msgget.2, msgop.2, msync.2, nanosleep.2, nfsservctl.2, nice.2, open_by_handle_at.2, outb.2, perf_event_open.2, perfmonctl.2, personality.2, pivot_root.2, pkey_alloc.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, ptrace.2, query_module.2, quotactl.2, read.2, readahead.2, readdir.2, readv.2, reboot.2, recv.2, recvmmsg.2, remap_file_pages.2, rename.2, request_key.2, restart_syscall.2, rt_sigqueueinfo.2, s390_pci_mmio_write.2, s390_runtime_instr.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setattr.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, seccomp.2, select.2, select_tut.2, semctl.2, semget.2, semop.2, send.2, sendfile.2, sendmmsg.2, set_mempolicy.2, set_thread_area.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setns.2, setpgid.2, setresuid.2, setreuid.2, setsid.2, setuid.2, sgetmask.2, shmctl.2, shmget.2, shmop.2, sigaction.2, sigaltstack.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, socket.2, socketcall.2, socketpair.2, splice.2, spu_create.2, spu_run.2, stat.2, statfs.2, statx.2, subpage_prot.2, swapon.2, symlink.2, sync.2, sync_file_range.2, syscalls.2, sysctl.2, sysinfo.2, syslog.2, tee.2, time.2, timer_create.2, timer_getoverrun.2, timer_settime.2, timerfd_create.2, times.2, tkill.2, truncate.2, umask.2, umount.2, unimplemented.2, unlink.2, unshare.2, uselib.2, userfaultfd.2, utime.2, utimensat.2, vfork.2, vmsplice.2, wait.2, wait4.2, write.2: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 07:30:51 +00:00
|
|
|
.IP
|
2017-02-15 20:14:42 +00:00
|
|
|
This feature is available only if the kernel is built with the
|
|
|
|
.BR CONFIG_CHECKPOINT_RESTORE
|
|
|
|
option enabled.
|
|
|
|
.TP
|
|
|
|
.BR PR_SET_MM_MAP_SIZE
|
|
|
|
Returns the size of the
|
|
|
|
.I struct prctl_mm_map
|
|
|
|
the kernel expects.
|
|
|
|
This allows user space to find a compatible struct.
|
|
|
|
The
|
|
|
|
.I arg4
|
|
|
|
argument should be a pointer to an unsigned int.
|
_syscall.2, bpf.2, cacheflush.2, capget.2, chdir.2, chmod.2, chroot.2, clock_getres.2, clock_nanosleep.2, clone.2, close.2, connect.2, copy_file_range.2, create_module.2, delete_module.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, eventfd.2, execve.2, execveat.2, fallocate.2, flock.2, fork.2, fsync.2, futex.2, futimesat.2, get_kernel_syms.2, get_mempolicy.2, get_robust_list.2, getcpu.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getitimer.2, getpagesize.2, getpeername.2, getpriority.2, getrandom.2, getresuid.2, getrlimit.2, getrusage.2, getsid.2, getsockname.2, getsockopt.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, init_module.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, intro.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl_fat.2, ioctl_ficlonerange.2, ioctl_fideduperange.2, ioctl_tty.2, ioctl_userfaultfd.2, ioperm.2, iopl.2, ioprio_set.2, kcmp.2, kexec_load.2, keyctl.2, kill.2, link.2, listen.2, listxattr.2, llseek.2, lookup_dcookie.2, lseek.2, madvise.2, mbind.2, membarrier.2, memfd_create.2, migrate_pages.2, mincore.2, mkdir.2, mknod.2, mlock.2, mmap.2, mmap2.2, modify_ldt.2, move_pages.2, mprotect.2, mq_getsetattr.2, mremap.2, msgctl.2, msgget.2, msgop.2, msync.2, nanosleep.2, nfsservctl.2, nice.2, open_by_handle_at.2, outb.2, perf_event_open.2, perfmonctl.2, personality.2, pivot_root.2, pkey_alloc.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, ptrace.2, query_module.2, quotactl.2, read.2, readahead.2, readdir.2, readv.2, reboot.2, recv.2, recvmmsg.2, remap_file_pages.2, rename.2, request_key.2, restart_syscall.2, rt_sigqueueinfo.2, s390_pci_mmio_write.2, s390_runtime_instr.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setattr.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, seccomp.2, select.2, select_tut.2, semctl.2, semget.2, semop.2, send.2, sendfile.2, sendmmsg.2, set_mempolicy.2, set_thread_area.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setns.2, setpgid.2, setresuid.2, setreuid.2, setsid.2, setuid.2, sgetmask.2, shmctl.2, shmget.2, shmop.2, sigaction.2, sigaltstack.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, socket.2, socketcall.2, socketpair.2, splice.2, spu_create.2, spu_run.2, stat.2, statfs.2, statx.2, subpage_prot.2, swapon.2, symlink.2, sync.2, sync_file_range.2, syscalls.2, sysctl.2, sysinfo.2, syslog.2, tee.2, time.2, timer_create.2, timer_getoverrun.2, timer_settime.2, timerfd_create.2, times.2, tkill.2, truncate.2, umask.2, umount.2, unimplemented.2, unlink.2, unshare.2, uselib.2, userfaultfd.2, utime.2, utimensat.2, vfork.2, vmsplice.2, wait.2, wait4.2, write.2: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 07:30:51 +00:00
|
|
|
.IP
|
2017-02-15 20:14:42 +00:00
|
|
|
This feature is available only if the kernel is built with the
|
|
|
|
.BR CONFIG_CHECKPOINT_RESTORE
|
|
|
|
option enabled.
|
2015-12-04 09:30:46 +00:00
|
|
|
.RE
|
2020-05-12 16:36:49 +00:00
|
|
|
.\" prctl PR_MPX_ENABLE_MANAGEMENT
|
2015-12-04 09:30:46 +00:00
|
|
|
.TP
|
2020-06-12 03:23:23 +00:00
|
|
|
.BR PR_MPX_ENABLE_MANAGEMENT ", " PR_MPX_DISABLE_MANAGEMENT " (since Linux 3.19, removed in Linux 5.4; only on x86)"
|
2015-12-04 09:30:46 +00:00
|
|
|
.\" commit fe3d197f84319d3bce379a9c0dc17b1f48ad358c
|
|
|
|
.\" See also http://lwn.net/Articles/582712/
|
|
|
|
.\" See also https://gcc.gnu.org/wiki/Intel%20MPX%20support%20in%20the%20GCC%20compiler
|
|
|
|
Enable or disable kernel management of Memory Protection eXtensions (MPX)
|
|
|
|
bounds tables.
|
|
|
|
The
|
|
|
|
.IR arg2 ,
|
|
|
|
.IR arg3 ,
|
|
|
|
.IR arg4 ,
|
|
|
|
and
|
|
|
|
.IR arg5
|
|
|
|
.\" commit e9d1b4f3c60997fe197bf0243cb4a41a44387a88
|
|
|
|
arguments must be zero.
|
_syscall.2, bpf.2, cacheflush.2, capget.2, chdir.2, chmod.2, chroot.2, clock_getres.2, clock_nanosleep.2, clone.2, close.2, connect.2, copy_file_range.2, create_module.2, delete_module.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, eventfd.2, execve.2, execveat.2, fallocate.2, flock.2, fork.2, fsync.2, futex.2, futimesat.2, get_kernel_syms.2, get_mempolicy.2, get_robust_list.2, getcpu.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getitimer.2, getpagesize.2, getpeername.2, getpriority.2, getrandom.2, getresuid.2, getrlimit.2, getrusage.2, getsid.2, getsockname.2, getsockopt.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, init_module.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, intro.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl_fat.2, ioctl_ficlonerange.2, ioctl_fideduperange.2, ioctl_tty.2, ioctl_userfaultfd.2, ioperm.2, iopl.2, ioprio_set.2, kcmp.2, kexec_load.2, keyctl.2, kill.2, link.2, listen.2, listxattr.2, llseek.2, lookup_dcookie.2, lseek.2, madvise.2, mbind.2, membarrier.2, memfd_create.2, migrate_pages.2, mincore.2, mkdir.2, mknod.2, mlock.2, mmap.2, mmap2.2, modify_ldt.2, move_pages.2, mprotect.2, mq_getsetattr.2, mremap.2, msgctl.2, msgget.2, msgop.2, msync.2, nanosleep.2, nfsservctl.2, nice.2, open_by_handle_at.2, outb.2, perf_event_open.2, perfmonctl.2, personality.2, pivot_root.2, pkey_alloc.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, ptrace.2, query_module.2, quotactl.2, read.2, readahead.2, readdir.2, readv.2, reboot.2, recv.2, recvmmsg.2, remap_file_pages.2, rename.2, request_key.2, restart_syscall.2, rt_sigqueueinfo.2, s390_pci_mmio_write.2, s390_runtime_instr.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setattr.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, seccomp.2, select.2, select_tut.2, semctl.2, semget.2, semop.2, send.2, sendfile.2, sendmmsg.2, set_mempolicy.2, set_thread_area.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setns.2, setpgid.2, setresuid.2, setreuid.2, setsid.2, setuid.2, sgetmask.2, shmctl.2, shmget.2, shmop.2, sigaction.2, sigaltstack.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, socket.2, socketcall.2, socketpair.2, splice.2, spu_create.2, spu_run.2, stat.2, statfs.2, statx.2, subpage_prot.2, swapon.2, symlink.2, sync.2, sync_file_range.2, syscalls.2, sysctl.2, sysinfo.2, syslog.2, tee.2, time.2, timer_create.2, timer_getoverrun.2, timer_settime.2, timerfd_create.2, times.2, tkill.2, truncate.2, umask.2, umount.2, unimplemented.2, unlink.2, unshare.2, uselib.2, userfaultfd.2, utime.2, utimensat.2, vfork.2, vmsplice.2, wait.2, wait4.2, write.2: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 07:30:51 +00:00
|
|
|
.IP
|
2015-12-04 09:30:46 +00:00
|
|
|
MPX is a hardware-assisted mechanism for performing bounds checking on
|
|
|
|
pointers.
|
|
|
|
It consists of a set of registers storing bounds information
|
|
|
|
and a set of special instruction prefixes that tell the CPU on which
|
|
|
|
instructions it should do bounds enforcement.
|
|
|
|
There is a limited number of these registers and
|
|
|
|
when there are more pointers than registers,
|
|
|
|
their contents must be "spilled" into a set of tables.
|
|
|
|
These tables are called "bounds tables" and the MPX
|
|
|
|
.BR prctl ()
|
|
|
|
operations control
|
|
|
|
whether the kernel manages their allocation and freeing.
|
_syscall.2, bpf.2, cacheflush.2, capget.2, chdir.2, chmod.2, chroot.2, clock_getres.2, clock_nanosleep.2, clone.2, close.2, connect.2, copy_file_range.2, create_module.2, delete_module.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, eventfd.2, execve.2, execveat.2, fallocate.2, flock.2, fork.2, fsync.2, futex.2, futimesat.2, get_kernel_syms.2, get_mempolicy.2, get_robust_list.2, getcpu.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getitimer.2, getpagesize.2, getpeername.2, getpriority.2, getrandom.2, getresuid.2, getrlimit.2, getrusage.2, getsid.2, getsockname.2, getsockopt.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, init_module.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, intro.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl_fat.2, ioctl_ficlonerange.2, ioctl_fideduperange.2, ioctl_tty.2, ioctl_userfaultfd.2, ioperm.2, iopl.2, ioprio_set.2, kcmp.2, kexec_load.2, keyctl.2, kill.2, link.2, listen.2, listxattr.2, llseek.2, lookup_dcookie.2, lseek.2, madvise.2, mbind.2, membarrier.2, memfd_create.2, migrate_pages.2, mincore.2, mkdir.2, mknod.2, mlock.2, mmap.2, mmap2.2, modify_ldt.2, move_pages.2, mprotect.2, mq_getsetattr.2, mremap.2, msgctl.2, msgget.2, msgop.2, msync.2, nanosleep.2, nfsservctl.2, nice.2, open_by_handle_at.2, outb.2, perf_event_open.2, perfmonctl.2, personality.2, pivot_root.2, pkey_alloc.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, ptrace.2, query_module.2, quotactl.2, read.2, readahead.2, readdir.2, readv.2, reboot.2, recv.2, recvmmsg.2, remap_file_pages.2, rename.2, request_key.2, restart_syscall.2, rt_sigqueueinfo.2, s390_pci_mmio_write.2, s390_runtime_instr.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setattr.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, seccomp.2, select.2, select_tut.2, semctl.2, semget.2, semop.2, send.2, sendfile.2, sendmmsg.2, set_mempolicy.2, set_thread_area.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setns.2, setpgid.2, setresuid.2, setreuid.2, setsid.2, setuid.2, sgetmask.2, shmctl.2, shmget.2, shmop.2, sigaction.2, sigaltstack.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, socket.2, socketcall.2, socketpair.2, splice.2, spu_create.2, spu_run.2, stat.2, statfs.2, statx.2, subpage_prot.2, swapon.2, symlink.2, sync.2, sync_file_range.2, syscalls.2, sysctl.2, sysinfo.2, syslog.2, tee.2, time.2, timer_create.2, timer_getoverrun.2, timer_settime.2, timerfd_create.2, times.2, tkill.2, truncate.2, umask.2, umount.2, unimplemented.2, unlink.2, unshare.2, uselib.2, userfaultfd.2, utime.2, utimensat.2, vfork.2, vmsplice.2, wait.2, wait4.2, write.2: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 07:30:51 +00:00
|
|
|
.IP
|
2015-12-04 09:30:46 +00:00
|
|
|
When management is enabled, the kernel will take over allocation
|
|
|
|
and freeing of the bounds tables.
|
|
|
|
It does this by trapping the #BR exceptions that result
|
|
|
|
at first use of missing bounds tables and
|
|
|
|
instead of delivering the exception to user space,
|
|
|
|
it allocates the table and populates the bounds directory
|
|
|
|
with the location of the new table.
|
|
|
|
For freeing, the kernel checks to see if bounds tables are
|
|
|
|
present for memory which is not allocated, and frees them if so.
|
_syscall.2, bpf.2, cacheflush.2, capget.2, chdir.2, chmod.2, chroot.2, clock_getres.2, clock_nanosleep.2, clone.2, close.2, connect.2, copy_file_range.2, create_module.2, delete_module.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, eventfd.2, execve.2, execveat.2, fallocate.2, flock.2, fork.2, fsync.2, futex.2, futimesat.2, get_kernel_syms.2, get_mempolicy.2, get_robust_list.2, getcpu.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getitimer.2, getpagesize.2, getpeername.2, getpriority.2, getrandom.2, getresuid.2, getrlimit.2, getrusage.2, getsid.2, getsockname.2, getsockopt.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, init_module.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, intro.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl_fat.2, ioctl_ficlonerange.2, ioctl_fideduperange.2, ioctl_tty.2, ioctl_userfaultfd.2, ioperm.2, iopl.2, ioprio_set.2, kcmp.2, kexec_load.2, keyctl.2, kill.2, link.2, listen.2, listxattr.2, llseek.2, lookup_dcookie.2, lseek.2, madvise.2, mbind.2, membarrier.2, memfd_create.2, migrate_pages.2, mincore.2, mkdir.2, mknod.2, mlock.2, mmap.2, mmap2.2, modify_ldt.2, move_pages.2, mprotect.2, mq_getsetattr.2, mremap.2, msgctl.2, msgget.2, msgop.2, msync.2, nanosleep.2, nfsservctl.2, nice.2, open_by_handle_at.2, outb.2, perf_event_open.2, perfmonctl.2, personality.2, pivot_root.2, pkey_alloc.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, ptrace.2, query_module.2, quotactl.2, read.2, readahead.2, readdir.2, readv.2, reboot.2, recv.2, recvmmsg.2, remap_file_pages.2, rename.2, request_key.2, restart_syscall.2, rt_sigqueueinfo.2, s390_pci_mmio_write.2, s390_runtime_instr.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setattr.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, seccomp.2, select.2, select_tut.2, semctl.2, semget.2, semop.2, send.2, sendfile.2, sendmmsg.2, set_mempolicy.2, set_thread_area.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setns.2, setpgid.2, setresuid.2, setreuid.2, setsid.2, setuid.2, sgetmask.2, shmctl.2, shmget.2, shmop.2, sigaction.2, sigaltstack.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, socket.2, socketcall.2, socketpair.2, splice.2, spu_create.2, spu_run.2, stat.2, statfs.2, statx.2, subpage_prot.2, swapon.2, symlink.2, sync.2, sync_file_range.2, syscalls.2, sysctl.2, sysinfo.2, syslog.2, tee.2, time.2, timer_create.2, timer_getoverrun.2, timer_settime.2, timerfd_create.2, times.2, tkill.2, truncate.2, umask.2, umount.2, unimplemented.2, unlink.2, unshare.2, uselib.2, userfaultfd.2, utime.2, utimensat.2, vfork.2, vmsplice.2, wait.2, wait4.2, write.2: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 07:30:51 +00:00
|
|
|
.IP
|
2015-12-04 09:30:46 +00:00
|
|
|
Before enabling MPX management using
|
|
|
|
.BR PR_MPX_ENABLE_MANAGEMENT ,
|
|
|
|
the application must first have allocated a user-space buffer for
|
|
|
|
the bounds directory and placed the location of that directory in the
|
|
|
|
.I bndcfgu
|
|
|
|
register.
|
_syscall.2, bpf.2, cacheflush.2, capget.2, chdir.2, chmod.2, chroot.2, clock_getres.2, clock_nanosleep.2, clone.2, close.2, connect.2, copy_file_range.2, create_module.2, delete_module.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, eventfd.2, execve.2, execveat.2, fallocate.2, flock.2, fork.2, fsync.2, futex.2, futimesat.2, get_kernel_syms.2, get_mempolicy.2, get_robust_list.2, getcpu.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getitimer.2, getpagesize.2, getpeername.2, getpriority.2, getrandom.2, getresuid.2, getrlimit.2, getrusage.2, getsid.2, getsockname.2, getsockopt.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, init_module.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, intro.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl_fat.2, ioctl_ficlonerange.2, ioctl_fideduperange.2, ioctl_tty.2, ioctl_userfaultfd.2, ioperm.2, iopl.2, ioprio_set.2, kcmp.2, kexec_load.2, keyctl.2, kill.2, link.2, listen.2, listxattr.2, llseek.2, lookup_dcookie.2, lseek.2, madvise.2, mbind.2, membarrier.2, memfd_create.2, migrate_pages.2, mincore.2, mkdir.2, mknod.2, mlock.2, mmap.2, mmap2.2, modify_ldt.2, move_pages.2, mprotect.2, mq_getsetattr.2, mremap.2, msgctl.2, msgget.2, msgop.2, msync.2, nanosleep.2, nfsservctl.2, nice.2, open_by_handle_at.2, outb.2, perf_event_open.2, perfmonctl.2, personality.2, pivot_root.2, pkey_alloc.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, ptrace.2, query_module.2, quotactl.2, read.2, readahead.2, readdir.2, readv.2, reboot.2, recv.2, recvmmsg.2, remap_file_pages.2, rename.2, request_key.2, restart_syscall.2, rt_sigqueueinfo.2, s390_pci_mmio_write.2, s390_runtime_instr.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setattr.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, seccomp.2, select.2, select_tut.2, semctl.2, semget.2, semop.2, send.2, sendfile.2, sendmmsg.2, set_mempolicy.2, set_thread_area.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setns.2, setpgid.2, setresuid.2, setreuid.2, setsid.2, setuid.2, sgetmask.2, shmctl.2, shmget.2, shmop.2, sigaction.2, sigaltstack.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, socket.2, socketcall.2, socketpair.2, splice.2, spu_create.2, spu_run.2, stat.2, statfs.2, statx.2, subpage_prot.2, swapon.2, symlink.2, sync.2, sync_file_range.2, syscalls.2, sysctl.2, sysinfo.2, syslog.2, tee.2, time.2, timer_create.2, timer_getoverrun.2, timer_settime.2, timerfd_create.2, times.2, tkill.2, truncate.2, umask.2, umount.2, unimplemented.2, unlink.2, unshare.2, uselib.2, userfaultfd.2, utime.2, utimensat.2, vfork.2, vmsplice.2, wait.2, wait4.2, write.2: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 07:30:51 +00:00
|
|
|
.IP
|
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 10:36:42 +00:00
|
|
|
These calls fail if the CPU or kernel does not support MPX.
|
2015-12-04 09:30:46 +00:00
|
|
|
Kernel support for MPX is enabled via the
|
|
|
|
.BR CONFIG_X86_INTEL_MPX
|
|
|
|
configuration option.
|
2020-05-13 11:44:06 +00:00
|
|
|
You can check whether the CPU supports MPX by looking for the
|
|
|
|
.I mpx
|
2015-12-04 09:30:46 +00:00
|
|
|
CPUID bit, like with the following command:
|
_syscall.2, bpf.2, cacheflush.2, capget.2, chdir.2, chmod.2, chroot.2, clock_getres.2, clock_nanosleep.2, clone.2, close.2, connect.2, copy_file_range.2, create_module.2, delete_module.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, eventfd.2, execve.2, execveat.2, fallocate.2, flock.2, fork.2, fsync.2, futex.2, futimesat.2, get_kernel_syms.2, get_mempolicy.2, get_robust_list.2, getcpu.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getitimer.2, getpagesize.2, getpeername.2, getpriority.2, getrandom.2, getresuid.2, getrlimit.2, getrusage.2, getsid.2, getsockname.2, getsockopt.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, init_module.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, intro.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl_fat.2, ioctl_ficlonerange.2, ioctl_fideduperange.2, ioctl_tty.2, ioctl_userfaultfd.2, ioperm.2, iopl.2, ioprio_set.2, kcmp.2, kexec_load.2, keyctl.2, kill.2, link.2, listen.2, listxattr.2, llseek.2, lookup_dcookie.2, lseek.2, madvise.2, mbind.2, membarrier.2, memfd_create.2, migrate_pages.2, mincore.2, mkdir.2, mknod.2, mlock.2, mmap.2, mmap2.2, modify_ldt.2, move_pages.2, mprotect.2, mq_getsetattr.2, mremap.2, msgctl.2, msgget.2, msgop.2, msync.2, nanosleep.2, nfsservctl.2, nice.2, open_by_handle_at.2, outb.2, perf_event_open.2, perfmonctl.2, personality.2, pivot_root.2, pkey_alloc.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, ptrace.2, query_module.2, quotactl.2, read.2, readahead.2, readdir.2, readv.2, reboot.2, recv.2, recvmmsg.2, remap_file_pages.2, rename.2, request_key.2, restart_syscall.2, rt_sigqueueinfo.2, s390_pci_mmio_write.2, s390_runtime_instr.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setattr.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, seccomp.2, select.2, select_tut.2, semctl.2, semget.2, semop.2, send.2, sendfile.2, sendmmsg.2, set_mempolicy.2, set_thread_area.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setns.2, setpgid.2, setresuid.2, setreuid.2, setsid.2, setuid.2, sgetmask.2, shmctl.2, shmget.2, shmop.2, sigaction.2, sigaltstack.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, socket.2, socketcall.2, socketpair.2, splice.2, spu_create.2, spu_run.2, stat.2, statfs.2, statx.2, subpage_prot.2, swapon.2, symlink.2, sync.2, sync_file_range.2, syscalls.2, sysctl.2, sysinfo.2, syslog.2, tee.2, time.2, timer_create.2, timer_getoverrun.2, timer_settime.2, timerfd_create.2, times.2, tkill.2, truncate.2, umask.2, umount.2, unimplemented.2, unlink.2, unshare.2, uselib.2, userfaultfd.2, utime.2, utimensat.2, vfork.2, vmsplice.2, wait.2, wait4.2, write.2: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 07:30:51 +00:00
|
|
|
.IP
|
2018-11-24 10:23:51 +00:00
|
|
|
.in +4n
|
|
|
|
.EX
|
2020-05-13 11:44:06 +00:00
|
|
|
cat /proc/cpuinfo | grep \(aq mpx \(aq
|
2018-11-24 10:23:51 +00:00
|
|
|
.EE
|
|
|
|
.in
|
_syscall.2, bpf.2, cacheflush.2, capget.2, chdir.2, chmod.2, chroot.2, clock_getres.2, clock_nanosleep.2, clone.2, close.2, connect.2, copy_file_range.2, create_module.2, delete_module.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, eventfd.2, execve.2, execveat.2, fallocate.2, flock.2, fork.2, fsync.2, futex.2, futimesat.2, get_kernel_syms.2, get_mempolicy.2, get_robust_list.2, getcpu.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getitimer.2, getpagesize.2, getpeername.2, getpriority.2, getrandom.2, getresuid.2, getrlimit.2, getrusage.2, getsid.2, getsockname.2, getsockopt.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, init_module.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, intro.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl_fat.2, ioctl_ficlonerange.2, ioctl_fideduperange.2, ioctl_tty.2, ioctl_userfaultfd.2, ioperm.2, iopl.2, ioprio_set.2, kcmp.2, kexec_load.2, keyctl.2, kill.2, link.2, listen.2, listxattr.2, llseek.2, lookup_dcookie.2, lseek.2, madvise.2, mbind.2, membarrier.2, memfd_create.2, migrate_pages.2, mincore.2, mkdir.2, mknod.2, mlock.2, mmap.2, mmap2.2, modify_ldt.2, move_pages.2, mprotect.2, mq_getsetattr.2, mremap.2, msgctl.2, msgget.2, msgop.2, msync.2, nanosleep.2, nfsservctl.2, nice.2, open_by_handle_at.2, outb.2, perf_event_open.2, perfmonctl.2, personality.2, pivot_root.2, pkey_alloc.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, ptrace.2, query_module.2, quotactl.2, read.2, readahead.2, readdir.2, readv.2, reboot.2, recv.2, recvmmsg.2, remap_file_pages.2, rename.2, request_key.2, restart_syscall.2, rt_sigqueueinfo.2, s390_pci_mmio_write.2, s390_runtime_instr.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setattr.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, seccomp.2, select.2, select_tut.2, semctl.2, semget.2, semop.2, send.2, sendfile.2, sendmmsg.2, set_mempolicy.2, set_thread_area.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setns.2, setpgid.2, setresuid.2, setreuid.2, setsid.2, setuid.2, sgetmask.2, shmctl.2, shmget.2, shmop.2, sigaction.2, sigaltstack.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, socket.2, socketcall.2, socketpair.2, splice.2, spu_create.2, spu_run.2, stat.2, statfs.2, statx.2, subpage_prot.2, swapon.2, symlink.2, sync.2, sync_file_range.2, syscalls.2, sysctl.2, sysinfo.2, syslog.2, tee.2, time.2, timer_create.2, timer_getoverrun.2, timer_settime.2, timerfd_create.2, times.2, tkill.2, truncate.2, umask.2, umount.2, unimplemented.2, unlink.2, unshare.2, uselib.2, userfaultfd.2, utime.2, utimensat.2, vfork.2, vmsplice.2, wait.2, wait4.2, write.2: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 07:30:51 +00:00
|
|
|
.IP
|
2015-12-04 09:30:46 +00:00
|
|
|
A thread may not switch in or out of long (64-bit) mode while MPX is
|
|
|
|
enabled.
|
_syscall.2, bpf.2, cacheflush.2, capget.2, chdir.2, chmod.2, chroot.2, clock_getres.2, clock_nanosleep.2, clone.2, close.2, connect.2, copy_file_range.2, create_module.2, delete_module.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, eventfd.2, execve.2, execveat.2, fallocate.2, flock.2, fork.2, fsync.2, futex.2, futimesat.2, get_kernel_syms.2, get_mempolicy.2, get_robust_list.2, getcpu.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getitimer.2, getpagesize.2, getpeername.2, getpriority.2, getrandom.2, getresuid.2, getrlimit.2, getrusage.2, getsid.2, getsockname.2, getsockopt.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, init_module.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, intro.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl_fat.2, ioctl_ficlonerange.2, ioctl_fideduperange.2, ioctl_tty.2, ioctl_userfaultfd.2, ioperm.2, iopl.2, ioprio_set.2, kcmp.2, kexec_load.2, keyctl.2, kill.2, link.2, listen.2, listxattr.2, llseek.2, lookup_dcookie.2, lseek.2, madvise.2, mbind.2, membarrier.2, memfd_create.2, migrate_pages.2, mincore.2, mkdir.2, mknod.2, mlock.2, mmap.2, mmap2.2, modify_ldt.2, move_pages.2, mprotect.2, mq_getsetattr.2, mremap.2, msgctl.2, msgget.2, msgop.2, msync.2, nanosleep.2, nfsservctl.2, nice.2, open_by_handle_at.2, outb.2, perf_event_open.2, perfmonctl.2, personality.2, pivot_root.2, pkey_alloc.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, ptrace.2, query_module.2, quotactl.2, read.2, readahead.2, readdir.2, readv.2, reboot.2, recv.2, recvmmsg.2, remap_file_pages.2, rename.2, request_key.2, restart_syscall.2, rt_sigqueueinfo.2, s390_pci_mmio_write.2, s390_runtime_instr.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setattr.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, seccomp.2, select.2, select_tut.2, semctl.2, semget.2, semop.2, send.2, sendfile.2, sendmmsg.2, set_mempolicy.2, set_thread_area.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setns.2, setpgid.2, setresuid.2, setreuid.2, setsid.2, setuid.2, sgetmask.2, shmctl.2, shmget.2, shmop.2, sigaction.2, sigaltstack.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, socket.2, socketcall.2, socketpair.2, splice.2, spu_create.2, spu_run.2, stat.2, statfs.2, statx.2, subpage_prot.2, swapon.2, symlink.2, sync.2, sync_file_range.2, syscalls.2, sysctl.2, sysinfo.2, syslog.2, tee.2, time.2, timer_create.2, timer_getoverrun.2, timer_settime.2, timerfd_create.2, times.2, tkill.2, truncate.2, umask.2, umount.2, unimplemented.2, unlink.2, unshare.2, uselib.2, userfaultfd.2, utime.2, utimensat.2, vfork.2, vmsplice.2, wait.2, wait4.2, write.2: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 07:30:51 +00:00
|
|
|
.IP
|
2015-12-04 09:30:46 +00:00
|
|
|
All threads in a process are affected by these calls.
|
_syscall.2, bpf.2, cacheflush.2, capget.2, chdir.2, chmod.2, chroot.2, clock_getres.2, clock_nanosleep.2, clone.2, close.2, connect.2, copy_file_range.2, create_module.2, delete_module.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, eventfd.2, execve.2, execveat.2, fallocate.2, flock.2, fork.2, fsync.2, futex.2, futimesat.2, get_kernel_syms.2, get_mempolicy.2, get_robust_list.2, getcpu.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getitimer.2, getpagesize.2, getpeername.2, getpriority.2, getrandom.2, getresuid.2, getrlimit.2, getrusage.2, getsid.2, getsockname.2, getsockopt.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, init_module.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, intro.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl_fat.2, ioctl_ficlonerange.2, ioctl_fideduperange.2, ioctl_tty.2, ioctl_userfaultfd.2, ioperm.2, iopl.2, ioprio_set.2, kcmp.2, kexec_load.2, keyctl.2, kill.2, link.2, listen.2, listxattr.2, llseek.2, lookup_dcookie.2, lseek.2, madvise.2, mbind.2, membarrier.2, memfd_create.2, migrate_pages.2, mincore.2, mkdir.2, mknod.2, mlock.2, mmap.2, mmap2.2, modify_ldt.2, move_pages.2, mprotect.2, mq_getsetattr.2, mremap.2, msgctl.2, msgget.2, msgop.2, msync.2, nanosleep.2, nfsservctl.2, nice.2, open_by_handle_at.2, outb.2, perf_event_open.2, perfmonctl.2, personality.2, pivot_root.2, pkey_alloc.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, ptrace.2, query_module.2, quotactl.2, read.2, readahead.2, readdir.2, readv.2, reboot.2, recv.2, recvmmsg.2, remap_file_pages.2, rename.2, request_key.2, restart_syscall.2, rt_sigqueueinfo.2, s390_pci_mmio_write.2, s390_runtime_instr.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setattr.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, seccomp.2, select.2, select_tut.2, semctl.2, semget.2, semop.2, send.2, sendfile.2, sendmmsg.2, set_mempolicy.2, set_thread_area.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setns.2, setpgid.2, setresuid.2, setreuid.2, setsid.2, setuid.2, sgetmask.2, shmctl.2, shmget.2, shmop.2, sigaction.2, sigaltstack.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, socket.2, socketcall.2, socketpair.2, splice.2, spu_create.2, spu_run.2, stat.2, statfs.2, statx.2, subpage_prot.2, swapon.2, symlink.2, sync.2, sync_file_range.2, syscalls.2, sysctl.2, sysinfo.2, syslog.2, tee.2, time.2, timer_create.2, timer_getoverrun.2, timer_settime.2, timerfd_create.2, times.2, tkill.2, truncate.2, umask.2, umount.2, unimplemented.2, unlink.2, unshare.2, uselib.2, userfaultfd.2, utime.2, utimensat.2, vfork.2, vmsplice.2, wait.2, wait4.2, write.2: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 07:30:51 +00:00
|
|
|
.IP
|
2015-12-04 09:30:46 +00:00
|
|
|
The child of a
|
|
|
|
.BR fork (2)
|
|
|
|
inherits the state of MPX management.
|
|
|
|
During
|
|
|
|
.BR execve (2),
|
|
|
|
MPX management is reset to a state as if
|
|
|
|
.BR PR_MPX_DISABLE_MANAGEMENT
|
|
|
|
had been called.
|
_syscall.2, bpf.2, cacheflush.2, capget.2, chdir.2, chmod.2, chroot.2, clock_getres.2, clock_nanosleep.2, clone.2, close.2, connect.2, copy_file_range.2, create_module.2, delete_module.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, eventfd.2, execve.2, execveat.2, fallocate.2, flock.2, fork.2, fsync.2, futex.2, futimesat.2, get_kernel_syms.2, get_mempolicy.2, get_robust_list.2, getcpu.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getitimer.2, getpagesize.2, getpeername.2, getpriority.2, getrandom.2, getresuid.2, getrlimit.2, getrusage.2, getsid.2, getsockname.2, getsockopt.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, init_module.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, intro.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl_fat.2, ioctl_ficlonerange.2, ioctl_fideduperange.2, ioctl_tty.2, ioctl_userfaultfd.2, ioperm.2, iopl.2, ioprio_set.2, kcmp.2, kexec_load.2, keyctl.2, kill.2, link.2, listen.2, listxattr.2, llseek.2, lookup_dcookie.2, lseek.2, madvise.2, mbind.2, membarrier.2, memfd_create.2, migrate_pages.2, mincore.2, mkdir.2, mknod.2, mlock.2, mmap.2, mmap2.2, modify_ldt.2, move_pages.2, mprotect.2, mq_getsetattr.2, mremap.2, msgctl.2, msgget.2, msgop.2, msync.2, nanosleep.2, nfsservctl.2, nice.2, open_by_handle_at.2, outb.2, perf_event_open.2, perfmonctl.2, personality.2, pivot_root.2, pkey_alloc.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, ptrace.2, query_module.2, quotactl.2, read.2, readahead.2, readdir.2, readv.2, reboot.2, recv.2, recvmmsg.2, remap_file_pages.2, rename.2, request_key.2, restart_syscall.2, rt_sigqueueinfo.2, s390_pci_mmio_write.2, s390_runtime_instr.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setattr.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, seccomp.2, select.2, select_tut.2, semctl.2, semget.2, semop.2, send.2, sendfile.2, sendmmsg.2, set_mempolicy.2, set_thread_area.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setns.2, setpgid.2, setresuid.2, setreuid.2, setsid.2, setuid.2, sgetmask.2, shmctl.2, shmget.2, shmop.2, sigaction.2, sigaltstack.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, socket.2, socketcall.2, socketpair.2, splice.2, spu_create.2, spu_run.2, stat.2, statfs.2, statx.2, subpage_prot.2, swapon.2, symlink.2, sync.2, sync_file_range.2, syscalls.2, sysctl.2, sysinfo.2, syslog.2, tee.2, time.2, timer_create.2, timer_getoverrun.2, timer_settime.2, timerfd_create.2, times.2, tkill.2, truncate.2, umask.2, umount.2, unimplemented.2, unlink.2, unshare.2, uselib.2, userfaultfd.2, utime.2, utimensat.2, vfork.2, vmsplice.2, wait.2, wait4.2, write.2: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 07:30:51 +00:00
|
|
|
.IP
|
2015-12-04 09:30:46 +00:00
|
|
|
For further information on Intel MPX, see the kernel source file
|
|
|
|
.IR Documentation/x86/intel_mpx.txt .
|
2020-05-12 16:36:52 +00:00
|
|
|
.IP
|
|
|
|
.\" commit f240652b6032b48ad7fa35c5e701cc4c8d697c0b
|
|
|
|
.\" See also https://lkml.kernel.org/r/20190705175321.DB42F0AD@viggo.jf.intel.com
|
|
|
|
Due to a lack of toolchain support,
|
|
|
|
.BR PR_MPX_ENABLE_MANAGEMENT " and " PR_MPX_DISABLE_MANAGEMENT
|
2020-05-13 10:41:31 +00:00
|
|
|
are not supported in Linux 5.4 and later.
|
2020-05-12 16:36:49 +00:00
|
|
|
.\" prctl PR_SET_NAME
|
2015-12-04 09:30:46 +00:00
|
|
|
.TP
|
|
|
|
.BR PR_SET_NAME " (since Linux 2.6.9)"
|
|
|
|
Set the name of the calling thread,
|
|
|
|
using the value in the location pointed to by
|
|
|
|
.IR "(char\ *) arg2" .
|
|
|
|
The name can be up to 16 bytes long,
|
|
|
|
.\" TASK_COMM_LEN in include/linux/sched.h
|
|
|
|
including the terminating null byte.
|
|
|
|
(If the length of the string, including the terminating null byte,
|
|
|
|
exceeds 16 bytes, the string is silently truncated.)
|
|
|
|
This is the same attribute that can be set via
|
|
|
|
.BR pthread_setname_np (3)
|
|
|
|
and retrieved using
|
|
|
|
.BR pthread_getname_np (3).
|
|
|
|
The attribute is likewise accessible via
|
2020-06-09 10:38:45 +00:00
|
|
|
.IR /proc/self/task/[tid]/comm
|
|
|
|
(see
|
|
|
|
.BR proc (5)),
|
2015-12-04 09:30:46 +00:00
|
|
|
where
|
2020-05-12 16:36:48 +00:00
|
|
|
.I [tid]
|
2020-05-25 13:21:48 +00:00
|
|
|
is the thread ID of the calling thread, as returned by
|
2020-05-12 16:36:48 +00:00
|
|
|
.BR gettid (2).
|
|
|
|
.\" prctl PR_GET_NAME
|
2015-12-04 09:30:46 +00:00
|
|
|
.TP
|
|
|
|
.BR PR_GET_NAME " (since Linux 2.6.11)"
|
|
|
|
Return the name of the calling thread,
|
|
|
|
in the buffer pointed to by
|
|
|
|
.IR "(char\ *) arg2" .
|
|
|
|
The buffer should allow space for up to 16 bytes;
|
|
|
|
the returned string will be null-terminated.
|
2020-05-12 16:36:49 +00:00
|
|
|
.\" prctl PR_SET_NO_NEW_PRIVS
|
2015-12-04 09:30:46 +00:00
|
|
|
.TP
|
|
|
|
.BR PR_SET_NO_NEW_PRIVS " (since Linux 3.5)"
|
2016-12-15 08:06:05 +00:00
|
|
|
Set the calling thread's
|
2015-12-04 09:30:46 +00:00
|
|
|
.I no_new_privs
|
2018-11-24 10:25:28 +00:00
|
|
|
attribute to the value in
|
2015-12-04 09:30:46 +00:00
|
|
|
.IR arg2 .
|
|
|
|
With
|
|
|
|
.I no_new_privs
|
|
|
|
set to 1,
|
|
|
|
.BR execve (2)
|
|
|
|
promises not to grant privileges to do anything
|
|
|
|
that could not have been done without the
|
|
|
|
.BR execve (2)
|
|
|
|
call (for example,
|
|
|
|
rendering the set-user-ID and set-group-ID mode bits,
|
|
|
|
and file capabilities non-functional).
|
2020-04-24 19:53:10 +00:00
|
|
|
Once set, the
|
2018-11-24 10:25:28 +00:00
|
|
|
.I no_new_privs
|
|
|
|
attribute cannot be unset.
|
|
|
|
The setting of this attribute is inherited by children created by
|
2015-12-04 09:30:46 +00:00
|
|
|
.BR fork (2)
|
|
|
|
and
|
|
|
|
.BR clone (2),
|
|
|
|
and preserved across
|
|
|
|
.BR execve (2).
|
_syscall.2, bpf.2, cacheflush.2, capget.2, chdir.2, chmod.2, chroot.2, clock_getres.2, clock_nanosleep.2, clone.2, close.2, connect.2, copy_file_range.2, create_module.2, delete_module.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, eventfd.2, execve.2, execveat.2, fallocate.2, flock.2, fork.2, fsync.2, futex.2, futimesat.2, get_kernel_syms.2, get_mempolicy.2, get_robust_list.2, getcpu.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getitimer.2, getpagesize.2, getpeername.2, getpriority.2, getrandom.2, getresuid.2, getrlimit.2, getrusage.2, getsid.2, getsockname.2, getsockopt.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, init_module.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, intro.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl_fat.2, ioctl_ficlonerange.2, ioctl_fideduperange.2, ioctl_tty.2, ioctl_userfaultfd.2, ioperm.2, iopl.2, ioprio_set.2, kcmp.2, kexec_load.2, keyctl.2, kill.2, link.2, listen.2, listxattr.2, llseek.2, lookup_dcookie.2, lseek.2, madvise.2, mbind.2, membarrier.2, memfd_create.2, migrate_pages.2, mincore.2, mkdir.2, mknod.2, mlock.2, mmap.2, mmap2.2, modify_ldt.2, move_pages.2, mprotect.2, mq_getsetattr.2, mremap.2, msgctl.2, msgget.2, msgop.2, msync.2, nanosleep.2, nfsservctl.2, nice.2, open_by_handle_at.2, outb.2, perf_event_open.2, perfmonctl.2, personality.2, pivot_root.2, pkey_alloc.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, ptrace.2, query_module.2, quotactl.2, read.2, readahead.2, readdir.2, readv.2, reboot.2, recv.2, recvmmsg.2, remap_file_pages.2, rename.2, request_key.2, restart_syscall.2, rt_sigqueueinfo.2, s390_pci_mmio_write.2, s390_runtime_instr.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setattr.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, seccomp.2, select.2, select_tut.2, semctl.2, semget.2, semop.2, send.2, sendfile.2, sendmmsg.2, set_mempolicy.2, set_thread_area.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setns.2, setpgid.2, setresuid.2, setreuid.2, setsid.2, setuid.2, sgetmask.2, shmctl.2, shmget.2, shmop.2, sigaction.2, sigaltstack.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, socket.2, socketcall.2, socketpair.2, splice.2, spu_create.2, spu_run.2, stat.2, statfs.2, statx.2, subpage_prot.2, swapon.2, symlink.2, sync.2, sync_file_range.2, syscalls.2, sysctl.2, sysinfo.2, syslog.2, tee.2, time.2, timer_create.2, timer_getoverrun.2, timer_settime.2, timerfd_create.2, times.2, tkill.2, truncate.2, umask.2, umount.2, unimplemented.2, unlink.2, unshare.2, uselib.2, userfaultfd.2, utime.2, utimensat.2, vfork.2, vmsplice.2, wait.2, wait4.2, write.2: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 07:30:51 +00:00
|
|
|
.IP
|
2016-12-15 07:39:29 +00:00
|
|
|
Since Linux 4.10,
|
|
|
|
the value of a thread's
|
|
|
|
.I no_new_privs
|
2018-11-24 10:25:28 +00:00
|
|
|
attribute can be viewed via the
|
2016-12-15 07:39:29 +00:00
|
|
|
.I NoNewPrivs
|
|
|
|
field in the
|
|
|
|
.IR /proc/[pid]/status
|
|
|
|
file.
|
_syscall.2, bpf.2, cacheflush.2, capget.2, chdir.2, chmod.2, chroot.2, clock_getres.2, clock_nanosleep.2, clone.2, close.2, connect.2, copy_file_range.2, create_module.2, delete_module.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, eventfd.2, execve.2, execveat.2, fallocate.2, flock.2, fork.2, fsync.2, futex.2, futimesat.2, get_kernel_syms.2, get_mempolicy.2, get_robust_list.2, getcpu.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getitimer.2, getpagesize.2, getpeername.2, getpriority.2, getrandom.2, getresuid.2, getrlimit.2, getrusage.2, getsid.2, getsockname.2, getsockopt.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, init_module.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, intro.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl_fat.2, ioctl_ficlonerange.2, ioctl_fideduperange.2, ioctl_tty.2, ioctl_userfaultfd.2, ioperm.2, iopl.2, ioprio_set.2, kcmp.2, kexec_load.2, keyctl.2, kill.2, link.2, listen.2, listxattr.2, llseek.2, lookup_dcookie.2, lseek.2, madvise.2, mbind.2, membarrier.2, memfd_create.2, migrate_pages.2, mincore.2, mkdir.2, mknod.2, mlock.2, mmap.2, mmap2.2, modify_ldt.2, move_pages.2, mprotect.2, mq_getsetattr.2, mremap.2, msgctl.2, msgget.2, msgop.2, msync.2, nanosleep.2, nfsservctl.2, nice.2, open_by_handle_at.2, outb.2, perf_event_open.2, perfmonctl.2, personality.2, pivot_root.2, pkey_alloc.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, ptrace.2, query_module.2, quotactl.2, read.2, readahead.2, readdir.2, readv.2, reboot.2, recv.2, recvmmsg.2, remap_file_pages.2, rename.2, request_key.2, restart_syscall.2, rt_sigqueueinfo.2, s390_pci_mmio_write.2, s390_runtime_instr.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setattr.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, seccomp.2, select.2, select_tut.2, semctl.2, semget.2, semop.2, send.2, sendfile.2, sendmmsg.2, set_mempolicy.2, set_thread_area.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setns.2, setpgid.2, setresuid.2, setreuid.2, setsid.2, setuid.2, sgetmask.2, shmctl.2, shmget.2, shmop.2, sigaction.2, sigaltstack.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, socket.2, socketcall.2, socketpair.2, splice.2, spu_create.2, spu_run.2, stat.2, statfs.2, statx.2, subpage_prot.2, swapon.2, symlink.2, sync.2, sync_file_range.2, syscalls.2, sysctl.2, sysinfo.2, syslog.2, tee.2, time.2, timer_create.2, timer_getoverrun.2, timer_settime.2, timerfd_create.2, times.2, tkill.2, truncate.2, umask.2, umount.2, unimplemented.2, unlink.2, unshare.2, uselib.2, userfaultfd.2, utime.2, utimensat.2, vfork.2, vmsplice.2, wait.2, wait4.2, write.2: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 07:30:51 +00:00
|
|
|
.IP
|
2015-12-04 09:30:46 +00:00
|
|
|
For more information, see the kernel source file
|
2017-09-11 03:03:54 +00:00
|
|
|
.IR Documentation/userspace\-api/no_new_privs.rst
|
|
|
|
.\" commit 40fde647ccb0ae8c11d256d271e24d385eed595b
|
|
|
|
(or
|
|
|
|
.IR Documentation/prctl/no_new_privs.txt
|
|
|
|
before Linux 4.13).
|
2016-12-15 07:45:54 +00:00
|
|
|
See also
|
|
|
|
.BR seccomp (2).
|
2020-05-12 16:36:49 +00:00
|
|
|
.\" prctl PR_GET_NO_NEW_PRIVS
|
2015-12-04 09:30:46 +00:00
|
|
|
.TP
|
|
|
|
.BR PR_GET_NO_NEW_PRIVS " (since Linux 3.5)"
|
|
|
|
Return (as the function result) the value of the
|
|
|
|
.I no_new_privs
|
2018-11-24 10:25:28 +00:00
|
|
|
attribute for the calling thread.
|
2015-12-04 09:30:46 +00:00
|
|
|
A value of 0 indicates the regular
|
|
|
|
.BR execve (2)
|
|
|
|
behavior.
|
|
|
|
A value of 1 indicates
|
|
|
|
.BR execve (2)
|
|
|
|
will operate in the privilege-restricting mode described above.
|
2020-06-09 11:30:57 +00:00
|
|
|
.\" prctl PR_PAC_RESET_KEYS
|
|
|
|
.\" commit ba830885656414101b2f8ca88786524d4bb5e8c1
|
|
|
|
.TP
|
|
|
|
.BR PR_PAC_RESET_KEYS " (since Linux 5.0, only on arm64)"
|
|
|
|
Securely reset the thread's pointer authentication keys
|
|
|
|
to fresh random values generated by the kernel.
|
|
|
|
.IP
|
|
|
|
The set of keys to be reset is specified by
|
|
|
|
.IR arg2 ,
|
|
|
|
which must be a logical OR of zero or more of the following:
|
|
|
|
.RS
|
|
|
|
.TP
|
|
|
|
.B PR_PAC_APIAKEY
|
|
|
|
instruction authentication key A
|
|
|
|
.TP
|
|
|
|
.B PR_PAC_APIBKEY
|
|
|
|
instruction authentication key B
|
|
|
|
.TP
|
|
|
|
.B PR_PAC_APDAKEY
|
|
|
|
data authentication key A
|
|
|
|
.TP
|
|
|
|
.B PR_PAC_APDBKEY
|
|
|
|
data authentication key B
|
|
|
|
.TP
|
|
|
|
.B PR_PAC_APGAKEY
|
|
|
|
generic authentication \(lqA\(rq key.
|
|
|
|
.IP
|
|
|
|
(Yes folks, there really is no generic B key.)
|
|
|
|
.RE
|
|
|
|
.IP
|
|
|
|
As a special case, if
|
|
|
|
.I arg2
|
2020-06-09 11:33:23 +00:00
|
|
|
is zero, then all the keys are reset.
|
2020-06-09 11:30:57 +00:00
|
|
|
Since new keys could be added in future,
|
|
|
|
this is the recommended way to completely wipe the existing keys
|
|
|
|
when establishing a clean execution context.
|
|
|
|
Note that there is no need to use
|
|
|
|
.BR PR_PAC_RESET_KEYS
|
|
|
|
in preparation for calling
|
|
|
|
.BR execve (2),
|
|
|
|
since
|
|
|
|
.BR execve (2)
|
|
|
|
resets all the pointer authentication keys.
|
|
|
|
.IP
|
|
|
|
The remaining arguments
|
2020-06-09 11:33:23 +00:00
|
|
|
.IR arg3 ", " arg4 ", and " arg5
|
2020-06-09 11:30:57 +00:00
|
|
|
must all be zero.
|
|
|
|
.IP
|
|
|
|
If the arguments are invalid,
|
|
|
|
and in particular if
|
|
|
|
.I arg2
|
|
|
|
contains set bits that are unrecognized
|
|
|
|
or that correspond to a key not available on this platform,
|
2020-06-09 11:33:23 +00:00
|
|
|
then the call fails with error
|
2020-06-09 11:30:57 +00:00
|
|
|
.BR EINVAL .
|
|
|
|
.IP
|
|
|
|
.B Warning:
|
|
|
|
Because the compiler or run-time environment
|
|
|
|
may be using some or all of the keys,
|
|
|
|
a successful
|
2020-06-09 18:09:48 +00:00
|
|
|
.B PR_PAC_RESET_KEYS
|
2020-06-09 11:33:23 +00:00
|
|
|
may crash the calling process.
|
|
|
|
The conditions for using it safely are complex and system-dependent.
|
|
|
|
Don't use it unless you know what you are doing.
|
2020-06-09 11:30:57 +00:00
|
|
|
.IP
|
|
|
|
For more information, see the kernel source file
|
|
|
|
.I Documentation/arm64/pointer\-authentication.rst
|
|
|
|
.\"commit b693d0b372afb39432e1c49ad7b3454855bc6bed
|
|
|
|
(or
|
|
|
|
.I Documentation/arm64/pointer\-authentication.txt
|
|
|
|
before Linux 5.3).
|
2020-05-12 16:36:49 +00:00
|
|
|
.\" prctl PR_SET_PDEATHSIG
|
2015-12-04 09:30:46 +00:00
|
|
|
.TP
|
|
|
|
.BR PR_SET_PDEATHSIG " (since Linux 2.1.57)"
|
2018-11-24 11:44:27 +00:00
|
|
|
Set the parent-death signal
|
2015-12-04 09:30:46 +00:00
|
|
|
of the calling process to \fIarg2\fP (either a signal value
|
2020-05-13 10:44:23 +00:00
|
|
|
in the range 1..\c
|
|
|
|
.BR NSIG "\-1" ,
|
|
|
|
or 0 to clear).
|
2015-12-04 09:30:46 +00:00
|
|
|
This is the signal that the calling process will get when its
|
|
|
|
parent dies.
|
2018-11-24 09:38:07 +00:00
|
|
|
.IP
|
2015-12-04 09:30:46 +00:00
|
|
|
.IR Warning :
|
|
|
|
.\" https://bugzilla.kernel.org/show_bug.cgi?id=43300
|
|
|
|
the "parent" in this case is considered to be the
|
|
|
|
.I thread
|
|
|
|
that created this process.
|
|
|
|
In other words, the signal will be sent when that thread terminates
|
|
|
|
(via, for example,
|
|
|
|
.BR pthread_exit (3)),
|
|
|
|
rather than after all of the threads in the parent process terminate.
|
2018-11-24 09:47:21 +00:00
|
|
|
.IP
|
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 11:48:35 +00:00
|
|
|
The parent-death signal is sent upon subsequent termination of the parent
|
|
|
|
thread and also upon termination of each subreaper process
|
|
|
|
(see the description of
|
|
|
|
.B PR_SET_CHILD_SUBREAPER
|
|
|
|
above) to which the caller is subsequently reparented.
|
|
|
|
If the parent thread and all ancestor subreapers have already terminated
|
|
|
|
by the time of the
|
|
|
|
.BR PR_SET_PDEATHSIG
|
|
|
|
operation, then no parent-death signal is sent to the caller.
|
|
|
|
.IP
|
2018-11-24 09:56:25 +00:00
|
|
|
The parent-death signal is process-directed (see
|
|
|
|
.BR signal (7))
|
|
|
|
and, if the child installs a handler using the
|
|
|
|
.BR sigaction (2)
|
|
|
|
.B SA_SIGINFO
|
|
|
|
flag, the
|
|
|
|
.I si_pid
|
|
|
|
field of the
|
|
|
|
.I siginfo_t
|
|
|
|
argument of the handler contains the PID of the terminating parent process.
|
|
|
|
.IP
|
2018-11-24 11:44:27 +00:00
|
|
|
The parent-death signal setting is cleared for the child of a
|
2018-11-24 09:47:21 +00:00
|
|
|
.BR fork (2).
|
|
|
|
It is also
|
|
|
|
(since Linux 2.4.36 / 2.6.23)
|
|
|
|
.\" commit d2d56c5f51028cb9f3d800882eb6f4cbd3f9099f
|
|
|
|
cleared when executing a set-user-ID or set-group-ID binary,
|
|
|
|
or a binary that has associated capabilities (see
|
|
|
|
.BR capabilities (7));
|
|
|
|
otherwise, this value is preserved across
|
|
|
|
.BR execve (2).
|
2020-07-11 09:37:01 +00:00
|
|
|
The parent-death signal setting is also cleared upon changes to
|
|
|
|
any of the following thread credentials:
|
|
|
|
.\" FIXME capability changes can also trigger this; see
|
2020-07-20 05:49:38 +00:00
|
|
|
.\" kernel/cred.c::commit_creds in the Linux 5.6 source.
|
2020-07-11 09:37:01 +00:00
|
|
|
effective user ID, effective group ID, filesystem user ID,
|
|
|
|
or filesystem group ID.
|
2020-05-12 16:36:49 +00:00
|
|
|
.\" prctl PR_GET_PDEATHSIG
|
2015-12-04 09:30:46 +00:00
|
|
|
.TP
|
|
|
|
.BR PR_GET_PDEATHSIG " (since Linux 2.3.15)"
|
|
|
|
Return the current value of the parent process death signal,
|
|
|
|
in the location pointed to by
|
|
|
|
.IR "(int\ *) arg2" .
|
2020-05-12 16:36:49 +00:00
|
|
|
.\" prctl PR_SET_PTRACER
|
2015-12-04 09:30:46 +00:00
|
|
|
.TP
|
|
|
|
.BR PR_SET_PTRACER " (since Linux 3.4)"
|
|
|
|
.\" commit 2d514487faf188938a4ee4fb3464eeecfbdcf8eb
|
|
|
|
.\" commit bf06189e4d14641c0148bea16e9dd24943862215
|
|
|
|
This is meaningful only when the Yama LSM is enabled and in mode 1
|
|
|
|
("restricted ptrace", visible via
|
|
|
|
.IR /proc/sys/kernel/yama/ptrace_scope ).
|
|
|
|
When a "ptracer process ID" is passed in \fIarg2\fP,
|
|
|
|
the caller is declaring that the ptracer process can
|
|
|
|
.BR ptrace (2)
|
|
|
|
the calling process as if it were a direct process ancestor.
|
|
|
|
Each
|
|
|
|
.B PR_SET_PTRACER
|
|
|
|
operation replaces the previous "ptracer process ID".
|
|
|
|
Employing
|
|
|
|
.B PR_SET_PTRACER
|
|
|
|
with
|
|
|
|
.I arg2
|
|
|
|
set to 0 clears the caller's "ptracer process ID".
|
|
|
|
If
|
|
|
|
.I arg2
|
|
|
|
is
|
|
|
|
.BR PR_SET_PTRACER_ANY ,
|
|
|
|
the ptrace restrictions introduced by Yama are effectively disabled for the
|
|
|
|
calling process.
|
_syscall.2, bpf.2, cacheflush.2, capget.2, chdir.2, chmod.2, chroot.2, clock_getres.2, clock_nanosleep.2, clone.2, close.2, connect.2, copy_file_range.2, create_module.2, delete_module.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, eventfd.2, execve.2, execveat.2, fallocate.2, flock.2, fork.2, fsync.2, futex.2, futimesat.2, get_kernel_syms.2, get_mempolicy.2, get_robust_list.2, getcpu.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getitimer.2, getpagesize.2, getpeername.2, getpriority.2, getrandom.2, getresuid.2, getrlimit.2, getrusage.2, getsid.2, getsockname.2, getsockopt.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, init_module.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, intro.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl_fat.2, ioctl_ficlonerange.2, ioctl_fideduperange.2, ioctl_tty.2, ioctl_userfaultfd.2, ioperm.2, iopl.2, ioprio_set.2, kcmp.2, kexec_load.2, keyctl.2, kill.2, link.2, listen.2, listxattr.2, llseek.2, lookup_dcookie.2, lseek.2, madvise.2, mbind.2, membarrier.2, memfd_create.2, migrate_pages.2, mincore.2, mkdir.2, mknod.2, mlock.2, mmap.2, mmap2.2, modify_ldt.2, move_pages.2, mprotect.2, mq_getsetattr.2, mremap.2, msgctl.2, msgget.2, msgop.2, msync.2, nanosleep.2, nfsservctl.2, nice.2, open_by_handle_at.2, outb.2, perf_event_open.2, perfmonctl.2, personality.2, pivot_root.2, pkey_alloc.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, ptrace.2, query_module.2, quotactl.2, read.2, readahead.2, readdir.2, readv.2, reboot.2, recv.2, recvmmsg.2, remap_file_pages.2, rename.2, request_key.2, restart_syscall.2, rt_sigqueueinfo.2, s390_pci_mmio_write.2, s390_runtime_instr.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setattr.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, seccomp.2, select.2, select_tut.2, semctl.2, semget.2, semop.2, send.2, sendfile.2, sendmmsg.2, set_mempolicy.2, set_thread_area.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setns.2, setpgid.2, setresuid.2, setreuid.2, setsid.2, setuid.2, sgetmask.2, shmctl.2, shmget.2, shmop.2, sigaction.2, sigaltstack.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, socket.2, socketcall.2, socketpair.2, splice.2, spu_create.2, spu_run.2, stat.2, statfs.2, statx.2, subpage_prot.2, swapon.2, symlink.2, sync.2, sync_file_range.2, syscalls.2, sysctl.2, sysinfo.2, syslog.2, tee.2, time.2, timer_create.2, timer_getoverrun.2, timer_settime.2, timerfd_create.2, times.2, tkill.2, truncate.2, umask.2, umount.2, unimplemented.2, unlink.2, unshare.2, uselib.2, userfaultfd.2, utime.2, utimensat.2, vfork.2, vmsplice.2, wait.2, wait4.2, write.2: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 07:30:51 +00:00
|
|
|
.IP
|
2015-12-04 09:30:46 +00:00
|
|
|
For further information, see the kernel source file
|
2017-09-11 03:03:52 +00:00
|
|
|
.IR Documentation/admin\-guide/LSM/Yama.rst
|
|
|
|
.\" commit 90bb766440f2147486a2acc3e793d7b8348b0c22
|
|
|
|
(or
|
|
|
|
.IR Documentation/security/Yama.txt
|
|
|
|
before Linux 4.13).
|
2020-05-12 16:36:49 +00:00
|
|
|
.\" prctl PR_SET_SECCOMP
|
2015-12-04 09:30:46 +00:00
|
|
|
.TP
|
|
|
|
.BR PR_SET_SECCOMP " (since Linux 2.6.23)"
|
|
|
|
.\" See http://thread.gmane.org/gmane.linux.kernel/542632
|
|
|
|
.\" [PATCH 0 of 2] seccomp updates
|
|
|
|
.\" andrea@cpushare.com
|
|
|
|
Set the secure computing (seccomp) mode for the calling thread, to limit
|
|
|
|
the available system calls.
|
|
|
|
The more recent
|
|
|
|
.BR seccomp (2)
|
|
|
|
system call provides a superset of the functionality of
|
2021-09-01 21:57:17 +00:00
|
|
|
.BR PR_SET_SECCOMP ,
|
|
|
|
and is the preferred interface for new applications.
|
_syscall.2, bpf.2, cacheflush.2, capget.2, chdir.2, chmod.2, chroot.2, clock_getres.2, clock_nanosleep.2, clone.2, close.2, connect.2, copy_file_range.2, create_module.2, delete_module.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, eventfd.2, execve.2, execveat.2, fallocate.2, flock.2, fork.2, fsync.2, futex.2, futimesat.2, get_kernel_syms.2, get_mempolicy.2, get_robust_list.2, getcpu.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getitimer.2, getpagesize.2, getpeername.2, getpriority.2, getrandom.2, getresuid.2, getrlimit.2, getrusage.2, getsid.2, getsockname.2, getsockopt.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, init_module.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, intro.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl_fat.2, ioctl_ficlonerange.2, ioctl_fideduperange.2, ioctl_tty.2, ioctl_userfaultfd.2, ioperm.2, iopl.2, ioprio_set.2, kcmp.2, kexec_load.2, keyctl.2, kill.2, link.2, listen.2, listxattr.2, llseek.2, lookup_dcookie.2, lseek.2, madvise.2, mbind.2, membarrier.2, memfd_create.2, migrate_pages.2, mincore.2, mkdir.2, mknod.2, mlock.2, mmap.2, mmap2.2, modify_ldt.2, move_pages.2, mprotect.2, mq_getsetattr.2, mremap.2, msgctl.2, msgget.2, msgop.2, msync.2, nanosleep.2, nfsservctl.2, nice.2, open_by_handle_at.2, outb.2, perf_event_open.2, perfmonctl.2, personality.2, pivot_root.2, pkey_alloc.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, ptrace.2, query_module.2, quotactl.2, read.2, readahead.2, readdir.2, readv.2, reboot.2, recv.2, recvmmsg.2, remap_file_pages.2, rename.2, request_key.2, restart_syscall.2, rt_sigqueueinfo.2, s390_pci_mmio_write.2, s390_runtime_instr.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setattr.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, seccomp.2, select.2, select_tut.2, semctl.2, semget.2, semop.2, send.2, sendfile.2, sendmmsg.2, set_mempolicy.2, set_thread_area.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setns.2, setpgid.2, setresuid.2, setreuid.2, setsid.2, setuid.2, sgetmask.2, shmctl.2, shmget.2, shmop.2, sigaction.2, sigaltstack.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, socket.2, socketcall.2, socketpair.2, splice.2, spu_create.2, spu_run.2, stat.2, statfs.2, statx.2, subpage_prot.2, swapon.2, symlink.2, sync.2, sync_file_range.2, syscalls.2, sysctl.2, sysinfo.2, syslog.2, tee.2, time.2, timer_create.2, timer_getoverrun.2, timer_settime.2, timerfd_create.2, times.2, tkill.2, truncate.2, umask.2, umount.2, unimplemented.2, unlink.2, unshare.2, uselib.2, userfaultfd.2, utime.2, utimensat.2, vfork.2, vmsplice.2, wait.2, wait4.2, write.2: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 07:30:51 +00:00
|
|
|
.IP
|
2015-12-04 09:30:46 +00:00
|
|
|
The seccomp mode is selected via
|
|
|
|
.IR arg2 .
|
|
|
|
(The seccomp constants are defined in
|
|
|
|
.IR <linux/seccomp.h> .)
|
2021-09-01 22:07:23 +00:00
|
|
|
The following values can be specified:
|
|
|
|
.RS
|
|
|
|
.TP
|
|
|
|
.BR SECCOMP_MODE_STRICT " (since Linux 2.6.23)"
|
|
|
|
See the description of
|
|
|
|
.B SECCOMP_SET_MODE_STRICT
|
|
|
|
in
|
|
|
|
.BR seccomp (2).
|
_syscall.2, bpf.2, cacheflush.2, capget.2, chdir.2, chmod.2, chroot.2, clock_getres.2, clock_nanosleep.2, clone.2, close.2, connect.2, copy_file_range.2, create_module.2, delete_module.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, eventfd.2, execve.2, execveat.2, fallocate.2, flock.2, fork.2, fsync.2, futex.2, futimesat.2, get_kernel_syms.2, get_mempolicy.2, get_robust_list.2, getcpu.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getitimer.2, getpagesize.2, getpeername.2, getpriority.2, getrandom.2, getresuid.2, getrlimit.2, getrusage.2, getsid.2, getsockname.2, getsockopt.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, init_module.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, intro.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl_fat.2, ioctl_ficlonerange.2, ioctl_fideduperange.2, ioctl_tty.2, ioctl_userfaultfd.2, ioperm.2, iopl.2, ioprio_set.2, kcmp.2, kexec_load.2, keyctl.2, kill.2, link.2, listen.2, listxattr.2, llseek.2, lookup_dcookie.2, lseek.2, madvise.2, mbind.2, membarrier.2, memfd_create.2, migrate_pages.2, mincore.2, mkdir.2, mknod.2, mlock.2, mmap.2, mmap2.2, modify_ldt.2, move_pages.2, mprotect.2, mq_getsetattr.2, mremap.2, msgctl.2, msgget.2, msgop.2, msync.2, nanosleep.2, nfsservctl.2, nice.2, open_by_handle_at.2, outb.2, perf_event_open.2, perfmonctl.2, personality.2, pivot_root.2, pkey_alloc.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, ptrace.2, query_module.2, quotactl.2, read.2, readahead.2, readdir.2, readv.2, reboot.2, recv.2, recvmmsg.2, remap_file_pages.2, rename.2, request_key.2, restart_syscall.2, rt_sigqueueinfo.2, s390_pci_mmio_write.2, s390_runtime_instr.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setattr.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, seccomp.2, select.2, select_tut.2, semctl.2, semget.2, semop.2, send.2, sendfile.2, sendmmsg.2, set_mempolicy.2, set_thread_area.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setns.2, setpgid.2, setresuid.2, setreuid.2, setsid.2, setuid.2, sgetmask.2, shmctl.2, shmget.2, shmop.2, sigaction.2, sigaltstack.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, socket.2, socketcall.2, socketpair.2, splice.2, spu_create.2, spu_run.2, stat.2, statfs.2, statx.2, subpage_prot.2, swapon.2, symlink.2, sync.2, sync_file_range.2, syscalls.2, sysctl.2, sysinfo.2, syslog.2, tee.2, time.2, timer_create.2, timer_getoverrun.2, timer_settime.2, timerfd_create.2, times.2, tkill.2, truncate.2, umask.2, umount.2, unimplemented.2, unlink.2, unshare.2, uselib.2, userfaultfd.2, utime.2, utimensat.2, vfork.2, vmsplice.2, wait.2, wait4.2, write.2: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 07:30:51 +00:00
|
|
|
.IP
|
intro.1, _syscall.2, access.2, arch_prctl.2, cacheflush.2, chown.2, clock_getres.2, clone.2, create_module.2, fcntl.2, flock.2, get_kernel_syms.2, get_robust_list.2, get_thread_area.2, getcpu.2, getpriority.2, getrlimit.2, getrusage.2, ioprio_set.2, kexec_load.2, madvise.2, mbind.2, migrate_pages.2, mknod.2, mmap.2, mount.2, move_pages.2, mprotect.2, open.2, pause.2, pciconfig_read.2, perf_event_open.2, prctl.2, ptrace.2, query_module.2, read.2, reboot.2, recv.2, s390_runtime_instr.2, sched_setscheduler.2, select_tut.2, send.2, set_mempolicy.2, setfsgid.2, setfsuid.2, sigaction.2, spu_create.2, spu_run.2, stime.2, swapon.2, syslog.2, timer_create.2, timer_getoverrun.2, times.2, tkill.2, umount.2, unimplemented.2, ustat.2, vm86.2, wait.2, abs.3, aio_read.3, aio_write.3, bsd_signal.3, catgets.3, clearenv.3, cmsg.3, dbopen.3, dirfd.3, dlopen.3, exec.3, fenv.3, ferror.3, fmemopen.3, fnmatch.3, fopen.3, futimes.3, getaddrinfo.3, getifaddrs.3, getipnodebyname.3, hsearch.3, if_nameindex.3, inet_pton.3, mblen.3, mbrlen.3, mbsrtowcs.3, mbtowc.3, mcheck.3, memfrob.3, mq_notify.3, netlink.3, posix_memalign.3, printf.3, pthread_attr_setscope.3, pthread_cleanup_push.3, pthread_kill_other_threads_np.3, pthread_self.3, pthread_setcancelstate.3, pthread_setconcurrency.3, raise.3, resolver.3, rpc.3, rtime.3, rtnetlink.3, scanf.3, setbuf.3, setnetgrent.3, shm_open.3, sigpause.3, sigset.3, sigwait.3, sockatmark.3, strcasecmp.3, strcmp.3, strdup.3, strftime.3, strptime.3, strsignal.3, strverscmp.3, sysv_signal.3, termios.3, wcrtomb.3, wcsnlen.3, wcsnrtombs.3, wcsrtombs.3, wctomb.3, wprintf.3, console_codes.4, cpuid.4, msr.4, rtc.4, sk98lin.4, st.4, tty.4, charmap.5, core.5, elf.5, hosts.equiv.5, proc.5, resolv.conf.5, services.5, slabinfo.5, arp.7, bootparam.7, capabilities.7, charsets.7, cpuset.7, ddp.7, epoll.7, feature_test_macros.7, futex.7, hier.7, icmp.7, inotify.7, ip.7, ipv6.7, man-pages.7, mdoc.7, mdoc.samples.7, netdevice.7, netlink.7, numa.7, packet.7, path_resolution.7, posixoptions.7, pthreads.7, raw.7, rtld-audit.7, rtnetlink.7, sem_overview.7, sigevent.7, socket.7, spufs.7, tcp.7, udp.7, unicode.7, uri.7, utf-8.7, intro.8, ldconfig.8, sync.8: Global fix: fix placement of word "only"
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2013-03-31 08:53:00 +00:00
|
|
|
This operation is available only
|
2012-10-22 04:36:00 +00:00
|
|
|
if the kernel is configured with
|
|
|
|
.B CONFIG_SECCOMP
|
|
|
|
enabled.
|
2021-09-01 22:07:23 +00:00
|
|
|
.TP
|
|
|
|
.BR SECCOMP_MODE_FILTER " (since Linux 3.5)"
|
|
|
|
The allowed system calls are defined by a pointer
|
2012-10-22 04:53:59 +00:00
|
|
|
to a Berkeley Packet Filter passed in
|
|
|
|
.IR arg3 .
|
|
|
|
This argument is a pointer to
|
|
|
|
.IR "struct sock_fprog" ;
|
|
|
|
it can be designed to filter
|
2012-10-22 04:36:00 +00:00
|
|
|
arbitrary system calls and system call arguments.
|
2021-09-01 22:07:23 +00:00
|
|
|
See the description of
|
|
|
|
.B SECCOMP_SET_MODE_FILTER
|
|
|
|
in
|
|
|
|
.BR seccomp (2).
|
|
|
|
.IP
|
|
|
|
This operation is available only
|
|
|
|
if the kernel is configured with
|
2012-10-22 04:36:00 +00:00
|
|
|
.B CONFIG_SECCOMP_FILTER
|
|
|
|
enabled.
|
2021-09-01 22:07:23 +00:00
|
|
|
.RE
|
_syscall.2, bpf.2, cacheflush.2, capget.2, chdir.2, chmod.2, chroot.2, clock_getres.2, clock_nanosleep.2, clone.2, close.2, connect.2, copy_file_range.2, create_module.2, delete_module.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, eventfd.2, execve.2, execveat.2, fallocate.2, flock.2, fork.2, fsync.2, futex.2, futimesat.2, get_kernel_syms.2, get_mempolicy.2, get_robust_list.2, getcpu.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getitimer.2, getpagesize.2, getpeername.2, getpriority.2, getrandom.2, getresuid.2, getrlimit.2, getrusage.2, getsid.2, getsockname.2, getsockopt.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, init_module.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, intro.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl_fat.2, ioctl_ficlonerange.2, ioctl_fideduperange.2, ioctl_tty.2, ioctl_userfaultfd.2, ioperm.2, iopl.2, ioprio_set.2, kcmp.2, kexec_load.2, keyctl.2, kill.2, link.2, listen.2, listxattr.2, llseek.2, lookup_dcookie.2, lseek.2, madvise.2, mbind.2, membarrier.2, memfd_create.2, migrate_pages.2, mincore.2, mkdir.2, mknod.2, mlock.2, mmap.2, mmap2.2, modify_ldt.2, move_pages.2, mprotect.2, mq_getsetattr.2, mremap.2, msgctl.2, msgget.2, msgop.2, msync.2, nanosleep.2, nfsservctl.2, nice.2, open_by_handle_at.2, outb.2, perf_event_open.2, perfmonctl.2, personality.2, pivot_root.2, pkey_alloc.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, ptrace.2, query_module.2, quotactl.2, read.2, readahead.2, readdir.2, readv.2, reboot.2, recv.2, recvmmsg.2, remap_file_pages.2, rename.2, request_key.2, restart_syscall.2, rt_sigqueueinfo.2, s390_pci_mmio_write.2, s390_runtime_instr.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setattr.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, seccomp.2, select.2, select_tut.2, semctl.2, semget.2, semop.2, send.2, sendfile.2, sendmmsg.2, set_mempolicy.2, set_thread_area.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setns.2, setpgid.2, setresuid.2, setreuid.2, setsid.2, setuid.2, sgetmask.2, shmctl.2, shmget.2, shmop.2, sigaction.2, sigaltstack.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, socket.2, socketcall.2, socketpair.2, splice.2, spu_create.2, spu_run.2, stat.2, statfs.2, statx.2, subpage_prot.2, swapon.2, symlink.2, sync.2, sync_file_range.2, syscalls.2, sysctl.2, sysinfo.2, syslog.2, tee.2, time.2, timer_create.2, timer_getoverrun.2, timer_settime.2, timerfd_create.2, times.2, tkill.2, truncate.2, umask.2, umount.2, unimplemented.2, unlink.2, unshare.2, uselib.2, userfaultfd.2, utime.2, utimensat.2, vfork.2, vmsplice.2, wait.2, wait4.2, write.2: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 07:30:51 +00:00
|
|
|
.IP
|
2021-09-01 22:07:23 +00:00
|
|
|
For further details on seccomp filtering, see
|
|
|
|
.BR seccomp (2).
|
2020-05-12 16:36:49 +00:00
|
|
|
.\" prctl PR_GET_SECCOMP
|
2008-07-09 11:53:48 +00:00
|
|
|
.TP
|
|
|
|
.BR PR_GET_SECCOMP " (since Linux 2.6.23)"
|
2014-02-22 08:44:02 +00:00
|
|
|
Return (as the function result)
|
|
|
|
the secure computing mode of the calling thread.
|
2012-10-22 04:28:15 +00:00
|
|
|
If the caller is not in secure computing mode, this operation returns 0;
|
|
|
|
if the caller is in strict secure computing mode, then the
|
2008-07-09 11:53:48 +00:00
|
|
|
.BR prctl ()
|
|
|
|
call will cause a
|
|
|
|
.B SIGKILL
|
|
|
|
signal to be sent to the process.
|
2012-10-22 04:36:00 +00:00
|
|
|
If the caller is in filter mode, and this system call is allowed by the
|
2015-01-07 10:23:02 +00:00
|
|
|
seccomp filters, it returns 2; otherwise, the process is killed with a
|
|
|
|
.BR SIGKILL
|
|
|
|
signal.
|
2021-09-01 22:07:23 +00:00
|
|
|
.IP
|
intro.1, _syscall.2, access.2, arch_prctl.2, cacheflush.2, chown.2, clock_getres.2, clone.2, create_module.2, fcntl.2, flock.2, get_kernel_syms.2, get_robust_list.2, get_thread_area.2, getcpu.2, getpriority.2, getrlimit.2, getrusage.2, ioprio_set.2, kexec_load.2, madvise.2, mbind.2, migrate_pages.2, mknod.2, mmap.2, mount.2, move_pages.2, mprotect.2, open.2, pause.2, pciconfig_read.2, perf_event_open.2, prctl.2, ptrace.2, query_module.2, read.2, reboot.2, recv.2, s390_runtime_instr.2, sched_setscheduler.2, select_tut.2, send.2, set_mempolicy.2, setfsgid.2, setfsuid.2, sigaction.2, spu_create.2, spu_run.2, stime.2, swapon.2, syslog.2, timer_create.2, timer_getoverrun.2, times.2, tkill.2, umount.2, unimplemented.2, ustat.2, vm86.2, wait.2, abs.3, aio_read.3, aio_write.3, bsd_signal.3, catgets.3, clearenv.3, cmsg.3, dbopen.3, dirfd.3, dlopen.3, exec.3, fenv.3, ferror.3, fmemopen.3, fnmatch.3, fopen.3, futimes.3, getaddrinfo.3, getifaddrs.3, getipnodebyname.3, hsearch.3, if_nameindex.3, inet_pton.3, mblen.3, mbrlen.3, mbsrtowcs.3, mbtowc.3, mcheck.3, memfrob.3, mq_notify.3, netlink.3, posix_memalign.3, printf.3, pthread_attr_setscope.3, pthread_cleanup_push.3, pthread_kill_other_threads_np.3, pthread_self.3, pthread_setcancelstate.3, pthread_setconcurrency.3, raise.3, resolver.3, rpc.3, rtime.3, rtnetlink.3, scanf.3, setbuf.3, setnetgrent.3, shm_open.3, sigpause.3, sigset.3, sigwait.3, sockatmark.3, strcasecmp.3, strcmp.3, strdup.3, strftime.3, strptime.3, strsignal.3, strverscmp.3, sysv_signal.3, termios.3, wcrtomb.3, wcsnlen.3, wcsnrtombs.3, wcsrtombs.3, wctomb.3, wprintf.3, console_codes.4, cpuid.4, msr.4, rtc.4, sk98lin.4, st.4, tty.4, charmap.5, core.5, elf.5, hosts.equiv.5, proc.5, resolv.conf.5, services.5, slabinfo.5, arp.7, bootparam.7, capabilities.7, charsets.7, cpuset.7, ddp.7, epoll.7, feature_test_macros.7, futex.7, hier.7, icmp.7, inotify.7, ip.7, ipv6.7, man-pages.7, mdoc.7, mdoc.samples.7, netdevice.7, netlink.7, numa.7, packet.7, path_resolution.7, posixoptions.7, pthreads.7, raw.7, rtld-audit.7, rtnetlink.7, sem_overview.7, sigevent.7, socket.7, spufs.7, tcp.7, udp.7, unicode.7, uri.7, utf-8.7, intro.8, ldconfig.8, sync.8: Global fix: fix placement of word "only"
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2013-03-31 08:53:00 +00:00
|
|
|
This operation is available only
|
2012-10-22 04:36:00 +00:00
|
|
|
if the kernel is configured with
|
|
|
|
.B CONFIG_SECCOMP
|
|
|
|
enabled.
|
_syscall.2, bpf.2, cacheflush.2, capget.2, chdir.2, chmod.2, chroot.2, clock_getres.2, clock_nanosleep.2, clone.2, close.2, connect.2, copy_file_range.2, create_module.2, delete_module.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, eventfd.2, execve.2, execveat.2, fallocate.2, flock.2, fork.2, fsync.2, futex.2, futimesat.2, get_kernel_syms.2, get_mempolicy.2, get_robust_list.2, getcpu.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getitimer.2, getpagesize.2, getpeername.2, getpriority.2, getrandom.2, getresuid.2, getrlimit.2, getrusage.2, getsid.2, getsockname.2, getsockopt.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, init_module.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, intro.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl_fat.2, ioctl_ficlonerange.2, ioctl_fideduperange.2, ioctl_tty.2, ioctl_userfaultfd.2, ioperm.2, iopl.2, ioprio_set.2, kcmp.2, kexec_load.2, keyctl.2, kill.2, link.2, listen.2, listxattr.2, llseek.2, lookup_dcookie.2, lseek.2, madvise.2, mbind.2, membarrier.2, memfd_create.2, migrate_pages.2, mincore.2, mkdir.2, mknod.2, mlock.2, mmap.2, mmap2.2, modify_ldt.2, move_pages.2, mprotect.2, mq_getsetattr.2, mremap.2, msgctl.2, msgget.2, msgop.2, msync.2, nanosleep.2, nfsservctl.2, nice.2, open_by_handle_at.2, outb.2, perf_event_open.2, perfmonctl.2, personality.2, pivot_root.2, pkey_alloc.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, ptrace.2, query_module.2, quotactl.2, read.2, readahead.2, readdir.2, readv.2, reboot.2, recv.2, recvmmsg.2, remap_file_pages.2, rename.2, request_key.2, restart_syscall.2, rt_sigqueueinfo.2, s390_pci_mmio_write.2, s390_runtime_instr.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setattr.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, seccomp.2, select.2, select_tut.2, semctl.2, semget.2, semop.2, send.2, sendfile.2, sendmmsg.2, set_mempolicy.2, set_thread_area.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setns.2, setpgid.2, setresuid.2, setreuid.2, setsid.2, setuid.2, sgetmask.2, shmctl.2, shmget.2, shmop.2, sigaction.2, sigaltstack.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, socket.2, socketcall.2, socketpair.2, splice.2, spu_create.2, spu_run.2, stat.2, statfs.2, statx.2, subpage_prot.2, swapon.2, symlink.2, sync.2, sync_file_range.2, syscalls.2, sysctl.2, sysinfo.2, syslog.2, tee.2, time.2, timer_create.2, timer_getoverrun.2, timer_settime.2, timerfd_create.2, times.2, tkill.2, truncate.2, umask.2, umount.2, unimplemented.2, unlink.2, unshare.2, uselib.2, userfaultfd.2, utime.2, utimensat.2, vfork.2, vmsplice.2, wait.2, wait4.2, write.2: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 07:30:51 +00:00
|
|
|
.IP
|
2015-01-07 10:26:40 +00:00
|
|
|
Since Linux 3.8, the
|
|
|
|
.IR Seccomp
|
|
|
|
field of the
|
|
|
|
.IR /proc/[pid]/status
|
|
|
|
file provides a method of obtaining the same information,
|
|
|
|
without the risk that the process is killed; see
|
|
|
|
.BR proc (5).
|
2020-05-12 16:36:49 +00:00
|
|
|
.\" prctl PR_SET_SECUREBITS
|
2008-07-16 14:01:02 +00:00
|
|
|
.TP
|
|
|
|
.BR PR_SET_SECUREBITS " (since Linux 2.6.26)"
|
|
|
|
Set the "securebits" flags of the calling thread to the value supplied in
|
2015-12-04 09:30:46 +00:00
|
|
|
.IR arg2 .
|
|
|
|
See
|
|
|
|
.BR capabilities (7).
|
2020-05-12 16:36:49 +00:00
|
|
|
.\" prctl PR_GET_SECUREBITS
|
2008-07-16 14:01:02 +00:00
|
|
|
.TP
|
2015-12-04 09:30:46 +00:00
|
|
|
.BR PR_GET_SECUREBITS " (since Linux 2.6.26)"
|
|
|
|
Return (as the function result)
|
|
|
|
the "securebits" flags of the calling thread.
|
|
|
|
See
|
|
|
|
.BR capabilities (7).
|
2020-05-12 16:36:49 +00:00
|
|
|
.\" prctl PR_GET_SPECULATION_CTRL
|
2015-12-04 09:30:46 +00:00
|
|
|
.TP
|
2018-05-28 11:52:41 +00:00
|
|
|
.BR PR_GET_SPECULATION_CTRL " (since Linux 4.17)"
|
2019-10-02 03:56:50 +00:00
|
|
|
Return (as the function result)
|
|
|
|
the state of the speculation misfeature specified in
|
2018-05-28 10:49:23 +00:00
|
|
|
.IR arg2 .
|
|
|
|
Currently, the only permitted value for this argument is
|
2018-05-28 10:21:57 +00:00
|
|
|
.BR PR_SPEC_STORE_BYPASS
|
|
|
|
(otherwise the call fails with the error
|
|
|
|
.BR ENODEV ).
|
|
|
|
.IP
|
|
|
|
The return value uses bits 0-3 with the following meaning:
|
2018-05-21 23:21:42 +00:00
|
|
|
.RS
|
|
|
|
.TP
|
|
|
|
.BR PR_SPEC_PRCTL
|
2018-05-28 10:21:57 +00:00
|
|
|
Mitigation can be controlled per thread by
|
2020-05-12 16:36:54 +00:00
|
|
|
.BR PR_SET_SPECULATION_CTRL .
|
2018-05-21 23:21:42 +00:00
|
|
|
.TP
|
|
|
|
.BR PR_SPEC_ENABLE
|
|
|
|
The speculation feature is enabled, mitigation is disabled.
|
|
|
|
.TP
|
|
|
|
.BR PR_SPEC_DISABLE
|
2020-05-12 16:36:54 +00:00
|
|
|
The speculation feature is disabled, mitigation is enabled.
|
2018-05-21 23:21:42 +00:00
|
|
|
.TP
|
|
|
|
.BR PR_SPEC_FORCE_DISABLE
|
|
|
|
Same as
|
|
|
|
.B PR_SPEC_DISABLE
|
|
|
|
but cannot be undone.
|
2020-05-12 16:36:56 +00:00
|
|
|
.TP
|
|
|
|
.BR PR_SPEC_DISABLE_NOEXEC " (since Linux 5.1)"
|
|
|
|
Same as
|
|
|
|
.BR PR_SPEC_DISABLE ,
|
2020-05-13 11:22:10 +00:00
|
|
|
but the state will be cleared on
|
2020-05-12 16:36:56 +00:00
|
|
|
.BR execve (2).
|
2018-05-21 23:21:42 +00:00
|
|
|
.RE
|
|
|
|
.IP
|
2018-05-28 10:21:57 +00:00
|
|
|
If all bits are 0,
|
2018-05-21 23:21:42 +00:00
|
|
|
then the CPU is not affected by the speculation misfeature.
|
|
|
|
.IP
|
|
|
|
If
|
|
|
|
.B PR_SPEC_PRCTL
|
2018-05-28 10:21:57 +00:00
|
|
|
is set, then per-thread control of the mitigation is available.
|
2018-05-28 10:23:30 +00:00
|
|
|
If not set,
|
2018-05-28 10:19:29 +00:00
|
|
|
.BR prctl ()
|
2018-05-21 23:21:42 +00:00
|
|
|
for the speculation misfeature will fail.
|
2018-05-28 10:49:23 +00:00
|
|
|
.IP
|
|
|
|
The
|
2018-05-28 10:19:29 +00:00
|
|
|
.IR arg3 ,
|
|
|
|
.IR arg4 ,
|
2018-05-21 23:21:42 +00:00
|
|
|
and
|
|
|
|
.I arg5
|
2018-05-28 10:49:23 +00:00
|
|
|
arguments must be specified as 0; otherwise the call fails with the error
|
2018-05-28 10:19:29 +00:00
|
|
|
.BR EINVAL .
|
2020-05-12 16:36:49 +00:00
|
|
|
.\" prctl PR_SET_SPECULATION_CTRL
|
2018-05-21 23:21:42 +00:00
|
|
|
.TP
|
2018-05-28 11:52:41 +00:00
|
|
|
.BR PR_SET_SPECULATION_CTRL " (since Linux 4.17)"
|
|
|
|
.\" commit b617cfc858161140d69cc0b5cc211996b557a1c7
|
|
|
|
.\" commit 356e4bfff2c5489e016fdb925adbf12a1e3950ee
|
2018-05-28 10:49:23 +00:00
|
|
|
Sets the state of the speculation misfeature specified in
|
|
|
|
.IR arg2 .
|
2020-05-13 11:19:50 +00:00
|
|
|
The speculation-misfeature settings are per-thread attributes.
|
|
|
|
.IP
|
|
|
|
Currently,
|
|
|
|
.I arg2
|
|
|
|
must be one of:
|
2020-05-12 16:36:55 +00:00
|
|
|
.RS
|
|
|
|
.TP
|
2018-05-28 10:21:57 +00:00
|
|
|
.B PR_SPEC_STORE_BYPASS
|
2020-05-13 11:19:50 +00:00
|
|
|
Set the state of the speculative store bypass misfeature.
|
2020-05-12 16:36:55 +00:00
|
|
|
.\" commit 9137bb27e60e554dab694eafa4cca241fa3a694f
|
|
|
|
.TP
|
|
|
|
.BR PR_SPEC_INDIRECT_BRANCH " (since Linux 4.20)"
|
2020-05-13 11:19:50 +00:00
|
|
|
Set the state of the indirect branch speculation misfeature.
|
2020-05-12 16:36:55 +00:00
|
|
|
.RE
|
|
|
|
.IP
|
2020-05-13 11:19:50 +00:00
|
|
|
If
|
|
|
|
.I arg2
|
|
|
|
does not have one of the above values,
|
|
|
|
then the call fails with the error
|
|
|
|
.BR ENODEV .
|
|
|
|
.IP
|
2018-05-28 10:23:30 +00:00
|
|
|
The
|
2018-05-21 23:21:42 +00:00
|
|
|
.IR arg3
|
2018-05-28 10:49:23 +00:00
|
|
|
argument is used to hand in the control value,
|
|
|
|
which is one of the following:
|
2018-05-21 23:21:42 +00:00
|
|
|
.RS
|
|
|
|
.TP
|
|
|
|
.BR PR_SPEC_ENABLE
|
|
|
|
The speculation feature is enabled, mitigation is disabled.
|
|
|
|
.TP
|
|
|
|
.BR PR_SPEC_DISABLE
|
2020-05-12 16:36:54 +00:00
|
|
|
The speculation feature is disabled, mitigation is enabled.
|
2018-05-21 23:21:42 +00:00
|
|
|
.TP
|
|
|
|
.BR PR_SPEC_FORCE_DISABLE
|
|
|
|
Same as
|
2020-05-12 16:36:54 +00:00
|
|
|
.BR PR_SPEC_DISABLE ,
|
2018-05-28 10:23:30 +00:00
|
|
|
but cannot be undone.
|
|
|
|
A subsequent
|
2020-05-12 16:36:55 +00:00
|
|
|
.BR prctl (\c
|
|
|
|
.IR arg2 ,
|
|
|
|
.BR PR_SPEC_ENABLE )
|
|
|
|
with the same value for
|
|
|
|
.I arg2
|
2018-05-28 10:21:57 +00:00
|
|
|
will fail with the error
|
2018-05-28 10:19:29 +00:00
|
|
|
.BR EPERM .
|
2020-05-12 16:36:56 +00:00
|
|
|
.\" commit 71368af9027f18fe5d1c6f372cfdff7e4bde8b48
|
|
|
|
.TP
|
|
|
|
.BR PR_SPEC_DISABLE_NOEXEC " (since Linux 5.1)"
|
|
|
|
Same as
|
|
|
|
.BR PR_SPEC_DISABLE ,
|
2020-05-13 11:22:10 +00:00
|
|
|
but the state will be cleared on
|
2020-05-12 16:36:56 +00:00
|
|
|
.BR execve (2).
|
|
|
|
Currently only supported for
|
|
|
|
.I arg2
|
|
|
|
equal to
|
|
|
|
.B PR_SPEC_STORE_BYPASS.
|
2018-05-21 23:21:42 +00:00
|
|
|
.RE
|
|
|
|
.IP
|
2020-05-12 16:36:55 +00:00
|
|
|
Any unsupported value in
|
2018-05-21 23:21:42 +00:00
|
|
|
.IR arg3
|
2018-05-28 10:21:57 +00:00
|
|
|
will result in the call failing with the error
|
2018-05-21 23:21:42 +00:00
|
|
|
.BR ERANGE .
|
2018-05-28 10:49:23 +00:00
|
|
|
.IP
|
|
|
|
The
|
2018-05-28 10:21:57 +00:00
|
|
|
.I arg4
|
2018-05-21 23:21:42 +00:00
|
|
|
and
|
|
|
|
.I arg5
|
2018-05-28 10:49:23 +00:00
|
|
|
arguments must be specified as 0; otherwise the call fails with the error
|
2018-05-28 10:19:29 +00:00
|
|
|
.BR EINVAL .
|
2018-05-21 23:21:42 +00:00
|
|
|
.IP
|
2018-05-28 10:49:23 +00:00
|
|
|
The speculation feature can also be controlled by the
|
|
|
|
.B spec_store_bypass_disable
|
|
|
|
boot parameter.
|
|
|
|
This parameter may enforce a read-only policy which will result in the
|
2019-09-27 12:00:13 +00:00
|
|
|
.BR prctl ()
|
2018-05-28 10:49:23 +00:00
|
|
|
call failing with the error
|
2018-05-21 23:21:42 +00:00
|
|
|
.BR ENXIO .
|
2018-05-28 10:49:23 +00:00
|
|
|
For further details, see the kernel source file
|
2020-05-27 21:17:33 +00:00
|
|
|
.IR Documentation/admin\-guide/kernel\-parameters.txt .
|
2020-06-24 17:36:01 +00:00
|
|
|
.\" prctl PR_SVE_SET_VL
|
|
|
|
.\" commit 2d2123bc7c7f843aa9db87720de159a049839862
|
|
|
|
.\" linux-5.6/Documentation/arm64/sve.rst
|
|
|
|
.TP
|
|
|
|
.BR PR_SVE_SET_VL " (since Linux 4.15, only on arm64)"
|
|
|
|
Configure the thread's SVE vector length,
|
|
|
|
as specified by
|
|
|
|
.IR "(int) arg2" .
|
|
|
|
Arguments
|
2020-06-24 17:36:02 +00:00
|
|
|
.IR arg3 ", " arg4 ", and " arg5
|
2020-06-24 17:36:01 +00:00
|
|
|
are ignored.
|
|
|
|
.IP
|
|
|
|
The bits of
|
|
|
|
.I arg2
|
|
|
|
corresponding to
|
|
|
|
.B PR_SVE_VL_LEN_MASK
|
|
|
|
must be set to the desired vector length in bytes.
|
|
|
|
This is interpreted as an upper bound:
|
|
|
|
the kernel will select the greatest available vector length
|
|
|
|
that does not exceed the value specified.
|
|
|
|
In particular, specifying
|
|
|
|
.B SVE_VL_MAX
|
|
|
|
(defined in
|
|
|
|
.I <asm/sigcontext.h>)
|
|
|
|
for the
|
|
|
|
.B PR_SVE_VL_LEN_MASK
|
|
|
|
bits requests the maximum supported vector length.
|
|
|
|
.IP
|
|
|
|
In addition, the other bits of
|
|
|
|
.I arg2
|
|
|
|
must be set to one of the following combinations of flags:
|
|
|
|
.RS
|
|
|
|
.TP
|
|
|
|
.B 0
|
|
|
|
Perform the change immediately.
|
|
|
|
At the next
|
|
|
|
.BR execve (2)
|
|
|
|
in the thread,
|
|
|
|
the vector length will be reset to the value configured in
|
|
|
|
.IR /proc/sys/abi/sve_default_vector_length .
|
|
|
|
.TP
|
|
|
|
.B PR_SVE_VL_INHERIT
|
|
|
|
Perform the change immediately.
|
|
|
|
Subsequent
|
|
|
|
.BR execve (2)
|
|
|
|
calls will preserve the new vector length.
|
|
|
|
.TP
|
|
|
|
.B PR_SVE_SET_VL_ONEXEC
|
|
|
|
Defer the change, so that it is performed at the next
|
|
|
|
.BR execve (2)
|
|
|
|
in the thread.
|
|
|
|
Further
|
|
|
|
.BR execve (2)
|
|
|
|
calls will reset the vector length to the value configured in
|
|
|
|
.IR /proc/sys/abi/sve_default_vector_length .
|
|
|
|
.TP
|
|
|
|
.B "PR_SVE_SET_VL_ONEXEC | PR_SVE_VL_INHERIT"
|
|
|
|
Defer the change, so that it is performed at the next
|
|
|
|
.BR execve (2)
|
|
|
|
in the thread.
|
|
|
|
Further
|
|
|
|
.BR execve (2)
|
|
|
|
calls will preserve the new vector length.
|
|
|
|
.RE
|
|
|
|
.IP
|
|
|
|
In all cases,
|
|
|
|
any previously pending deferred change is canceled.
|
|
|
|
.IP
|
|
|
|
The call fails with error
|
|
|
|
.B EINVAL
|
|
|
|
if SVE is not supported on the platform, if
|
|
|
|
.I arg2
|
|
|
|
is unrecognized or invalid, or the value in the bits of
|
|
|
|
.I arg2
|
|
|
|
corresponding to
|
|
|
|
.B PR_SVE_VL_LEN_MASK
|
|
|
|
is outside the range
|
|
|
|
.BR SVE_VL_MIN .. SVE_VL_MAX
|
|
|
|
or is not a multiple of 16.
|
|
|
|
.IP
|
|
|
|
On success,
|
|
|
|
a nonnegative value is returned that describes the
|
|
|
|
.I selected
|
|
|
|
configuration.
|
|
|
|
If
|
|
|
|
.B PR_SVE_SET_VL_ONEXEC
|
|
|
|
was included in
|
|
|
|
.IR arg2 ,
|
|
|
|
then the configuration described by the return value
|
|
|
|
will take effect at the next
|
2021-08-18 05:46:16 +00:00
|
|
|
.BR execve (2).
|
2020-06-24 17:36:01 +00:00
|
|
|
Otherwise, the configuration is already in effect when the
|
|
|
|
.B PR_SVE_SET_VL
|
|
|
|
call returns.
|
|
|
|
In either case, the value is encoded in the same way as the return value of
|
|
|
|
.BR PR_SVE_GET_VL .
|
|
|
|
Note that there is no explicit flag in the return value
|
|
|
|
corresponding to
|
|
|
|
.BR PR_SVE_SET_VL_ONEXEC .
|
|
|
|
.IP
|
|
|
|
The configuration (including any pending deferred change)
|
|
|
|
is inherited across
|
|
|
|
.BR fork (2)
|
|
|
|
and
|
|
|
|
.BR clone (2).
|
|
|
|
.IP
|
|
|
|
For more information, see the kernel source file
|
|
|
|
.I Documentation/arm64/sve.rst
|
|
|
|
.\"commit b693d0b372afb39432e1c49ad7b3454855bc6bed
|
|
|
|
(or
|
|
|
|
.I Documentation/arm64/sve.txt
|
|
|
|
before Linux 5.3).
|
|
|
|
.IP
|
|
|
|
.B Warning:
|
|
|
|
Because the compiler or run-time environment
|
|
|
|
may be using SVE, using this call without the
|
|
|
|
.B PR_SVE_SET_VL_ONEXEC
|
|
|
|
flag may crash the calling process.
|
|
|
|
The conditions for using it safely are complex and system-dependent.
|
|
|
|
Don't use it unless you really know what you are doing.
|
|
|
|
.\" prctl PR_SVE_GET_VL
|
|
|
|
.TP
|
|
|
|
.BR PR_SVE_GET_VL " (since Linux 4.15, only on arm64)"
|
|
|
|
Get the thread's current SVE vector length configuration.
|
|
|
|
.IP
|
|
|
|
Arguments
|
2020-06-24 17:36:02 +00:00
|
|
|
.IR arg2 ", " arg3 ", " arg4 ", and " arg5
|
2020-06-24 17:36:01 +00:00
|
|
|
are ignored.
|
|
|
|
.IP
|
2020-06-26 11:13:19 +00:00
|
|
|
Provided that the kernel and platform support SVE,
|
2020-06-24 17:36:01 +00:00
|
|
|
this operation always succeeds,
|
|
|
|
returning a nonnegative value that describes the
|
|
|
|
.I current
|
|
|
|
configuration.
|
|
|
|
The bits corresponding to
|
|
|
|
.B PR_SVE_VL_LEN_MASK
|
|
|
|
contain the currently configured vector length in bytes.
|
|
|
|
The bit corresponding to
|
|
|
|
.B PR_SVE_VL_INHERIT
|
|
|
|
indicates whether the vector length will be inherited
|
|
|
|
across
|
|
|
|
.BR execve (2).
|
|
|
|
.IP
|
|
|
|
Note that there is no way to determine whether there is
|
|
|
|
a pending vector length change that has not yet taken effect.
|
|
|
|
.IP
|
|
|
|
For more information, see the kernel source file
|
|
|
|
.I Documentation/arm64/sve.rst
|
|
|
|
.\"commit b693d0b372afb39432e1c49ad7b3454855bc6bed
|
|
|
|
(or
|
|
|
|
.I Documentation/arm64/sve.txt
|
|
|
|
before Linux 5.3).
|
2021-02-07 23:47:57 +00:00
|
|
|
.TP
|
|
|
|
.\" prctl PR_SET_SYSCALL_USER_DISPATCH
|
|
|
|
.\" commit 1446e1df9eb183fdf81c3f0715402f1d7595d4
|
|
|
|
.BR PR_SET_SYSCALL_USER_DISPATCH " (since Linux 5.11, x86 only)"
|
|
|
|
Configure the Syscall User Dispatch mechanism
|
|
|
|
for the calling thread.
|
|
|
|
This mechanism allows an application
|
|
|
|
to selectively intercept system calls
|
|
|
|
so that they can be handled within the application itself.
|
|
|
|
Interception takes the form of a thread-directed
|
|
|
|
.B SIGSYS
|
|
|
|
signal that is delivered to the thread
|
|
|
|
when it makes a system call.
|
|
|
|
If intercepted,
|
|
|
|
the system call is not executed by the kernel.
|
|
|
|
.IP
|
|
|
|
To enable this mechanism,
|
|
|
|
.I arg2
|
|
|
|
should be set to
|
|
|
|
.BR PR_SYS_DISPATCH_ON .
|
|
|
|
Once enabled, further system calls will be selectively intercepted,
|
|
|
|
depending on a control variable provided by user space.
|
|
|
|
In this case,
|
|
|
|
.I arg3
|
|
|
|
and
|
|
|
|
.I arg4
|
|
|
|
respectively identify the
|
|
|
|
.I offset
|
|
|
|
and
|
|
|
|
.I length
|
|
|
|
of a single contiguous memory region in the process address space
|
|
|
|
from where system calls are always allowed to be executed,
|
|
|
|
regardless of the control variable.
|
|
|
|
(Typically, this area would include the area of memory
|
|
|
|
containing the C library.)
|
|
|
|
.IP
|
|
|
|
.I arg5
|
|
|
|
points to a char-sized variable
|
|
|
|
that is a fast switch to allow/block system call execution
|
|
|
|
without the overhead of doing another system call
|
|
|
|
to re-configure Syscall User Dispatch.
|
|
|
|
This control variable can either be set to
|
|
|
|
.B SYSCALL_DISPATCH_FILTER_BLOCK
|
|
|
|
to block system calls from executing
|
|
|
|
or to
|
|
|
|
.B SYSCALL_DISPATCH_FILTER_ALLOW
|
|
|
|
to temporarily allow them to be executed.
|
|
|
|
This value is checked by the kernel
|
|
|
|
on every system call entry,
|
|
|
|
and any unexpected value will raise
|
|
|
|
an uncatchable
|
|
|
|
.B SIGSYS
|
|
|
|
at that time,
|
|
|
|
killing the application.
|
|
|
|
.IP
|
|
|
|
When a system call is intercepted,
|
|
|
|
the kernel sends a thread-directed
|
|
|
|
.B SIGSYS
|
|
|
|
signal to the triggering thread.
|
|
|
|
Various fields will be set in the
|
|
|
|
.I siginfo_t
|
|
|
|
structure (see
|
|
|
|
.BR sigaction (2))
|
|
|
|
associated with the signal:
|
|
|
|
.RS
|
|
|
|
.IP * 3
|
|
|
|
.I si_signo
|
|
|
|
will contain
|
|
|
|
.BR SIGSYS .
|
|
|
|
.IP *
|
|
|
|
.IR si_call_addr
|
|
|
|
will show the address of the system call instruction.
|
|
|
|
.IP *
|
|
|
|
.IR si_syscall
|
|
|
|
and
|
|
|
|
.IR si_arch
|
|
|
|
will indicate which system call was attempted.
|
|
|
|
.IP *
|
|
|
|
.I si_code
|
|
|
|
will contain
|
|
|
|
.BR SYS_USER_DISPATCH .
|
|
|
|
.IP *
|
|
|
|
.I si_errno
|
|
|
|
will be set to 0.
|
|
|
|
.RE
|
|
|
|
.IP
|
|
|
|
The program counter will be as though the system call happened
|
|
|
|
(i.e., the program counter will not point to the system call instruction).
|
|
|
|
.IP
|
|
|
|
When the signal handler returns to the kernel,
|
|
|
|
the system call completes immediately
|
|
|
|
and returns to the calling thread,
|
|
|
|
without actually being executed.
|
|
|
|
If necessary
|
|
|
|
(i.e., when emulating the system call on user space.),
|
|
|
|
the signal handler should set the system call return value
|
|
|
|
to a sane value,
|
|
|
|
by modifying the register context stored in the
|
|
|
|
.I ucontext
|
|
|
|
argument of the signal handler.
|
|
|
|
See
|
|
|
|
.BR sigaction (2),
|
|
|
|
.BR sigreturn (2),
|
|
|
|
and
|
|
|
|
.BR getcontext (3)
|
|
|
|
for more information.
|
|
|
|
.IP
|
|
|
|
If
|
|
|
|
.I arg2
|
|
|
|
is set to
|
|
|
|
.BR PR_SYS_DISPATCH_OFF ,
|
|
|
|
Syscall User Dispatch is disabled for that thread.
|
|
|
|
the remaining arguments must be set to 0.
|
|
|
|
.IP
|
|
|
|
The setting is not preserved across
|
|
|
|
.BR fork (2),
|
|
|
|
.BR clone (2),
|
|
|
|
or
|
|
|
|
.BR execve (2).
|
|
|
|
.IP
|
|
|
|
For more information,
|
|
|
|
see the kernel source file
|
|
|
|
.IR Documentation/admin-guide/syscall-user-dispatch.rst
|
2020-06-24 17:36:02 +00:00
|
|
|
.\" prctl PR_SET_TAGGED_ADDR_CTRL
|
|
|
|
.\" commit 63f0c60379650d82250f22e4cf4137ef3dc4f43d
|
|
|
|
.TP
|
|
|
|
.BR PR_SET_TAGGED_ADDR_CTRL " (since Linux 5.4, only on arm64)"
|
2020-06-26 11:21:15 +00:00
|
|
|
Controls support for passing tagged user-space addresses to the kernel
|
2020-06-24 17:36:02 +00:00
|
|
|
(i.e., addresses where bits 56\(em63 are not all zero).
|
|
|
|
.IP
|
|
|
|
The level of support is selected by
|
|
|
|
.IR "arg2" ,
|
|
|
|
which can be one of the following:
|
|
|
|
.RS
|
|
|
|
.TP
|
|
|
|
.B 0
|
|
|
|
Addresses that are passed
|
|
|
|
for the purpose of being dereferenced by the kernel
|
|
|
|
must be untagged.
|
|
|
|
.TP
|
|
|
|
.B PR_TAGGED_ADDR_ENABLE
|
|
|
|
Addresses that are passed
|
|
|
|
for the purpose of being dereferenced by the kernel
|
|
|
|
may be tagged, with the exceptions summarized below.
|
|
|
|
.RE
|
|
|
|
.IP
|
|
|
|
The remaining arguments
|
2020-06-26 11:21:15 +00:00
|
|
|
.IR arg3 ", " arg4 ", and " arg5
|
2020-06-24 17:36:02 +00:00
|
|
|
must all be zero.
|
|
|
|
.\" Enforcement added in
|
|
|
|
.\" commit 3e91ec89f527b9870fe42dcbdb74fd389d123a95
|
|
|
|
.IP
|
|
|
|
On success, the mode specified in
|
|
|
|
.I arg2
|
2020-07-06 04:39:05 +00:00
|
|
|
is set for the calling thread and the return value is 0.
|
2020-06-24 17:36:02 +00:00
|
|
|
If the arguments are invalid,
|
|
|
|
the mode specified in
|
|
|
|
.I arg2
|
|
|
|
is unrecognized,
|
|
|
|
or if this feature is unsupported by the kernel
|
|
|
|
or disabled via
|
|
|
|
.IR /proc/sys/abi/tagged_addr_disabled ,
|
2020-06-26 11:21:15 +00:00
|
|
|
the call fails with the error
|
2020-06-24 17:36:02 +00:00
|
|
|
.BR EINVAL .
|
|
|
|
.IP
|
|
|
|
In particular, if
|
|
|
|
.BR prctl ( PR_SET_TAGGED_ADDR_CTRL ,
|
|
|
|
0, 0, 0, 0)
|
|
|
|
fails with
|
2020-06-26 11:21:15 +00:00
|
|
|
.BR EINVAL ,
|
2020-06-24 17:36:02 +00:00
|
|
|
then all addresses passed to the kernel must be untagged.
|
|
|
|
.IP
|
|
|
|
Irrespective of which mode is set,
|
|
|
|
addresses passed to certain interfaces
|
|
|
|
must always be untagged:
|
|
|
|
.RS
|
2020-06-26 11:21:15 +00:00
|
|
|
.IP \(bu 2
|
2020-06-24 17:36:02 +00:00
|
|
|
.BR brk (2),
|
|
|
|
.BR mmap (2),
|
|
|
|
.BR shmat (2),
|
|
|
|
.BR shmdt (2),
|
|
|
|
and the
|
|
|
|
.I new_address
|
|
|
|
argument of
|
|
|
|
.BR mremap (2).
|
|
|
|
.IP
|
|
|
|
(Prior to Linux 5.6 these accepted tagged addresses,
|
|
|
|
but the behaviour may not be what you expect.
|
|
|
|
Don't rely on it.)
|
2020-06-26 11:21:15 +00:00
|
|
|
.IP \(bu
|
2020-06-24 17:36:02 +00:00
|
|
|
\(oqpolymorphic\(cq interfaces
|
|
|
|
that accept pointers to arbitrary types cast to a
|
|
|
|
.I void *
|
|
|
|
or other generic type, specifically
|
2020-11-16 06:43:02 +00:00
|
|
|
.BR prctl (),
|
2020-06-24 17:36:02 +00:00
|
|
|
.BR ioctl (2),
|
|
|
|
and in general
|
|
|
|
.BR setsockopt (2)
|
|
|
|
(only certain specific
|
|
|
|
.BR setsockopt (2)
|
|
|
|
options allow tagged addresses).
|
|
|
|
.RE
|
|
|
|
.IP
|
|
|
|
This list of exclusions may shrink
|
|
|
|
when moving from one kernel version to a later kernel version.
|
|
|
|
While the kernel may make some guarantees
|
|
|
|
for backwards compatibility reasons,
|
|
|
|
for the purposes of new software
|
|
|
|
the effect of passing tagged addresses to these interfaces
|
|
|
|
is unspecified.
|
|
|
|
.IP
|
|
|
|
The mode set by this call is inherited across
|
|
|
|
.BR fork (2)
|
|
|
|
and
|
|
|
|
.BR clone (2).
|
|
|
|
The mode is reset by
|
|
|
|
.BR execve (2)
|
|
|
|
to 0
|
|
|
|
(i.e., tagged addresses not permitted in the user/kernel ABI).
|
|
|
|
.IP
|
|
|
|
For more information, see the kernel source file
|
|
|
|
.IR Documentation/arm64/tagged\-address\-abi.rst .
|
|
|
|
.IP
|
|
|
|
.B Warning:
|
|
|
|
This call is primarily intended for use by the run-time environment.
|
|
|
|
A successful
|
|
|
|
.B PR_SET_TAGGED_ADDR_CTRL
|
|
|
|
call elsewhere may crash the calling process.
|
2020-06-26 11:21:15 +00:00
|
|
|
The conditions for using it safely are complex and system-dependent.
|
2020-06-24 17:36:02 +00:00
|
|
|
Don't use it unless you know what you are doing.
|
|
|
|
.\" prctl PR_GET_TAGGED_ADDR_CTRL
|
|
|
|
.\" commit 63f0c60379650d82250f22e4cf4137ef3dc4f43d
|
|
|
|
.TP
|
|
|
|
.BR PR_GET_TAGGED_ADDR_CTRL " (since Linux 5.4, only on arm64)"
|
|
|
|
Returns the current tagged address mode
|
|
|
|
for the calling thread.
|
|
|
|
.IP
|
|
|
|
Arguments
|
2020-06-26 11:21:15 +00:00
|
|
|
.IR arg2 ", " arg3 ", " arg4 ", and " arg5
|
2020-06-24 17:36:02 +00:00
|
|
|
must all be zero.
|
|
|
|
.IP
|
|
|
|
If the arguments are invalid
|
|
|
|
or this feature is disabled or unsupported by the kernel,
|
|
|
|
the call fails with
|
|
|
|
.BR EINVAL .
|
|
|
|
In particular, if
|
|
|
|
.BR prctl ( PR_GET_TAGGED_ADDR_CTRL ,
|
|
|
|
0, 0, 0, 0)
|
|
|
|
fails with
|
|
|
|
.BR EINVAL ,
|
|
|
|
then this feature is definitely either unsupported,
|
|
|
|
or disabled via
|
|
|
|
.IR /proc/sys/abi/tagged_addr_disabled .
|
|
|
|
In this case,
|
|
|
|
all addresses passed to the kernel must be untagged.
|
|
|
|
.IP
|
|
|
|
Otherwise, the call returns a nonnegative value
|
|
|
|
describing the current tagged address mode,
|
|
|
|
encoded in the same way as the
|
|
|
|
.I arg2
|
|
|
|
argument of
|
|
|
|
.BR PR_SET_TAGGED_ADDR_CTRL .
|
|
|
|
.IP
|
|
|
|
For more information, see the kernel source file
|
|
|
|
.IR Documentation/arm64/tagged\-address\-abi.rst .
|
2015-12-04 09:30:46 +00:00
|
|
|
.\"
|
2020-05-12 16:36:49 +00:00
|
|
|
.\" prctl PR_TASK_PERF_EVENTS_DISABLE
|
2012-04-24 16:38:04 +00:00
|
|
|
.TP
|
|
|
|
.BR PR_TASK_PERF_EVENTS_DISABLE " (since Linux 2.6.31)"
|
|
|
|
Disable all performance counters attached to the calling process,
|
|
|
|
regardless of whether the counters were created by
|
|
|
|
this process or another process.
|
|
|
|
Performance counters created by the calling process for other
|
|
|
|
processes are unaffected.
|
bdflush.2, get_robust_list.2, kexec_load.2, madvise.2, mmap.2, mount.2, prctl.2, query_module.2, rt_sigqueueinfo.2, shmget.2, sigaction.2, syscalls.2, umount.2, malloc.3, hpsa.4, initrd.4, proc.5, bootparam.7, icmp.7, netlink.7, signal.7: Global fix: use "Linux kernel source" consistently
Rather than "kernel source".
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2012-09-24 08:02:34 +00:00
|
|
|
For more information on performance counters, see the Linux kernel source file
|
2012-04-24 16:38:04 +00:00
|
|
|
.IR tools/perf/design.txt .
|
|
|
|
.IP
|
2015-12-04 09:30:46 +00:00
|
|
|
Originally called
|
|
|
|
.BR PR_TASK_PERF_COUNTERS_DISABLE ;
|
|
|
|
.\" commit 1d1c7ddbfab358445a542715551301b7fc363e28
|
2017-10-03 12:25:47 +00:00
|
|
|
renamed (retaining the same numerical value)
|
2015-12-04 09:30:46 +00:00
|
|
|
in Linux 2.6.32.
|
|
|
|
.\"
|
2020-05-12 16:36:49 +00:00
|
|
|
.\" prctl PR_TASK_PERF_EVENTS_ENABLE
|
2015-01-10 14:03:47 +00:00
|
|
|
.TP
|
2015-12-04 09:30:46 +00:00
|
|
|
.BR PR_TASK_PERF_EVENTS_ENABLE " (since Linux 2.6.31)"
|
|
|
|
The converse of
|
|
|
|
.BR PR_TASK_PERF_EVENTS_DISABLE ;
|
|
|
|
enable performance counters attached to the calling process.
|
|
|
|
.IP
|
|
|
|
Originally called
|
|
|
|
.BR PR_TASK_PERF_COUNTERS_ENABLE ;
|
|
|
|
.\" commit 1d1c7ddbfab358445a542715551301b7fc363e28
|
|
|
|
renamed
|
|
|
|
.\" commit cdd6c482c9ff9c55475ee7392ec8f672eddb7be6
|
|
|
|
in Linux 2.6.32.
|
|
|
|
.\"
|
2020-05-12 16:36:50 +00:00
|
|
|
.\" prctl PR_SET_THP_DISABLE
|
|
|
|
.TP
|
|
|
|
.BR PR_SET_THP_DISABLE " (since Linux 3.15)"
|
|
|
|
.\" commit a0715cc22601e8830ace98366c0c2bd8da52af52
|
|
|
|
Set the state of the "THP disable" flag for the calling thread.
|
|
|
|
If
|
|
|
|
.I arg2
|
|
|
|
has a nonzero value, the flag is set, otherwise it is cleared.
|
|
|
|
Setting this flag provides a method
|
|
|
|
for disabling transparent huge pages
|
|
|
|
for jobs where the code cannot be modified, and using a malloc hook with
|
|
|
|
.BR madvise (2)
|
|
|
|
is not an option (i.e., statically allocated data).
|
|
|
|
The setting of the "THP disable" flag is inherited by a child created via
|
|
|
|
.BR fork (2)
|
|
|
|
and is preserved across
|
|
|
|
.BR execve (2).
|
2020-05-12 16:36:49 +00:00
|
|
|
.\" prctl PR_GET_THP_DISABLE
|
2015-12-04 09:30:46 +00:00
|
|
|
.TP
|
|
|
|
.BR PR_GET_THP_DISABLE " (since Linux 3.15)"
|
2019-10-02 04:19:53 +00:00
|
|
|
Return (as the function result) the current setting of the "THP disable"
|
2015-12-04 09:30:46 +00:00
|
|
|
flag for the calling thread:
|
|
|
|
either 1, if the flag is set, or 0, if it is not.
|
2020-05-12 16:36:49 +00:00
|
|
|
.\" prctl PR_GET_TID_ADDRESS
|
2015-12-04 09:30:46 +00:00
|
|
|
.TP
|
|
|
|
.BR PR_GET_TID_ADDRESS " (since Linux 3.5)"
|
|
|
|
.\" commit 300f786b2683f8bb1ec0afb6e1851183a479c86d
|
2019-10-02 03:07:52 +00:00
|
|
|
Return the
|
2015-12-04 09:30:46 +00:00
|
|
|
.I clear_child_tid
|
|
|
|
address set by
|
|
|
|
.BR set_tid_address (2)
|
|
|
|
and the
|
|
|
|
.BR clone (2)
|
|
|
|
.B CLONE_CHILD_CLEARTID
|
|
|
|
flag, in the location pointed to by
|
|
|
|
.IR "(int\ **)\ arg2" .
|
|
|
|
This feature is available only if the kernel is built with the
|
|
|
|
.BR CONFIG_CHECKPOINT_RESTORE
|
2016-12-12 06:17:48 +00:00
|
|
|
option enabled.
|
|
|
|
Note that since the
|
|
|
|
.BR prctl ()
|
|
|
|
system call does not have a compat implementation for
|
|
|
|
the AMD64 x32 and MIPS n32 ABIs,
|
|
|
|
and the kernel writes out a pointer using the kernel's pointer size,
|
|
|
|
this operation expects a user-space buffer of 8 (not 4) bytes on these ABIs.
|
2020-05-12 16:36:49 +00:00
|
|
|
.\" prctl PR_SET_TIMERSLACK
|
2015-12-04 09:30:46 +00:00
|
|
|
.TP
|
|
|
|
.BR PR_SET_TIMERSLACK " (since Linux 2.6.28)"
|
|
|
|
.\" See https://lwn.net/Articles/369549/
|
|
|
|
.\" commit 6976675d94042fbd446231d1bd8b7de71a980ada
|
2016-06-09 09:46:43 +00:00
|
|
|
Each thread has two associated timer slack values:
|
|
|
|
a "default" value, and a "current" value.
|
|
|
|
This operation sets the "current" timer slack value for the calling thread.
|
2019-07-24 06:52:23 +00:00
|
|
|
.I arg2
|
|
|
|
is an unsigned long value, then maximum "current" value is ULONG_MAX and
|
|
|
|
the minimum "current" value is 1.
|
2016-06-09 09:46:43 +00:00
|
|
|
If the nanosecond value supplied in
|
|
|
|
.IR arg2
|
|
|
|
is greater than zero, then the "current" value is set to this value.
|
2015-12-04 09:30:46 +00:00
|
|
|
If
|
|
|
|
.I arg2
|
2019-07-24 06:52:23 +00:00
|
|
|
is equal to zero,
|
2016-06-09 09:46:43 +00:00
|
|
|
the "current" timer slack is reset to the
|
|
|
|
thread's "default" timer slack value.
|
_syscall.2, bpf.2, cacheflush.2, capget.2, chdir.2, chmod.2, chroot.2, clock_getres.2, clock_nanosleep.2, clone.2, close.2, connect.2, copy_file_range.2, create_module.2, delete_module.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, eventfd.2, execve.2, execveat.2, fallocate.2, flock.2, fork.2, fsync.2, futex.2, futimesat.2, get_kernel_syms.2, get_mempolicy.2, get_robust_list.2, getcpu.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getitimer.2, getpagesize.2, getpeername.2, getpriority.2, getrandom.2, getresuid.2, getrlimit.2, getrusage.2, getsid.2, getsockname.2, getsockopt.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, init_module.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, intro.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl_fat.2, ioctl_ficlonerange.2, ioctl_fideduperange.2, ioctl_tty.2, ioctl_userfaultfd.2, ioperm.2, iopl.2, ioprio_set.2, kcmp.2, kexec_load.2, keyctl.2, kill.2, link.2, listen.2, listxattr.2, llseek.2, lookup_dcookie.2, lseek.2, madvise.2, mbind.2, membarrier.2, memfd_create.2, migrate_pages.2, mincore.2, mkdir.2, mknod.2, mlock.2, mmap.2, mmap2.2, modify_ldt.2, move_pages.2, mprotect.2, mq_getsetattr.2, mremap.2, msgctl.2, msgget.2, msgop.2, msync.2, nanosleep.2, nfsservctl.2, nice.2, open_by_handle_at.2, outb.2, perf_event_open.2, perfmonctl.2, personality.2, pivot_root.2, pkey_alloc.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, ptrace.2, query_module.2, quotactl.2, read.2, readahead.2, readdir.2, readv.2, reboot.2, recv.2, recvmmsg.2, remap_file_pages.2, rename.2, request_key.2, restart_syscall.2, rt_sigqueueinfo.2, s390_pci_mmio_write.2, s390_runtime_instr.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setattr.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, seccomp.2, select.2, select_tut.2, semctl.2, semget.2, semop.2, send.2, sendfile.2, sendmmsg.2, set_mempolicy.2, set_thread_area.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setns.2, setpgid.2, setresuid.2, setreuid.2, setsid.2, setuid.2, sgetmask.2, shmctl.2, shmget.2, shmop.2, sigaction.2, sigaltstack.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, socket.2, socketcall.2, socketpair.2, splice.2, spu_create.2, spu_run.2, stat.2, statfs.2, statx.2, subpage_prot.2, swapon.2, symlink.2, sync.2, sync_file_range.2, syscalls.2, sysctl.2, sysinfo.2, syslog.2, tee.2, time.2, timer_create.2, timer_getoverrun.2, timer_settime.2, timerfd_create.2, times.2, tkill.2, truncate.2, umask.2, umount.2, unimplemented.2, unlink.2, unshare.2, uselib.2, userfaultfd.2, utime.2, utimensat.2, vfork.2, vmsplice.2, wait.2, wait4.2, write.2: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 07:30:51 +00:00
|
|
|
.IP
|
2016-06-09 09:46:43 +00:00
|
|
|
The "current" timer slack is used by the kernel to group timer expirations
|
2015-12-04 09:30:46 +00:00
|
|
|
for the calling thread that are close to one another;
|
|
|
|
as a consequence, timer expirations for the thread may be
|
|
|
|
up to the specified number of nanoseconds late (but will never expire early).
|
|
|
|
Grouping timer expirations can help reduce system power consumption
|
|
|
|
by minimizing CPU wake-ups.
|
_syscall.2, bpf.2, cacheflush.2, capget.2, chdir.2, chmod.2, chroot.2, clock_getres.2, clock_nanosleep.2, clone.2, close.2, connect.2, copy_file_range.2, create_module.2, delete_module.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, eventfd.2, execve.2, execveat.2, fallocate.2, flock.2, fork.2, fsync.2, futex.2, futimesat.2, get_kernel_syms.2, get_mempolicy.2, get_robust_list.2, getcpu.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getitimer.2, getpagesize.2, getpeername.2, getpriority.2, getrandom.2, getresuid.2, getrlimit.2, getrusage.2, getsid.2, getsockname.2, getsockopt.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, init_module.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, intro.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl_fat.2, ioctl_ficlonerange.2, ioctl_fideduperange.2, ioctl_tty.2, ioctl_userfaultfd.2, ioperm.2, iopl.2, ioprio_set.2, kcmp.2, kexec_load.2, keyctl.2, kill.2, link.2, listen.2, listxattr.2, llseek.2, lookup_dcookie.2, lseek.2, madvise.2, mbind.2, membarrier.2, memfd_create.2, migrate_pages.2, mincore.2, mkdir.2, mknod.2, mlock.2, mmap.2, mmap2.2, modify_ldt.2, move_pages.2, mprotect.2, mq_getsetattr.2, mremap.2, msgctl.2, msgget.2, msgop.2, msync.2, nanosleep.2, nfsservctl.2, nice.2, open_by_handle_at.2, outb.2, perf_event_open.2, perfmonctl.2, personality.2, pivot_root.2, pkey_alloc.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, ptrace.2, query_module.2, quotactl.2, read.2, readahead.2, readdir.2, readv.2, reboot.2, recv.2, recvmmsg.2, remap_file_pages.2, rename.2, request_key.2, restart_syscall.2, rt_sigqueueinfo.2, s390_pci_mmio_write.2, s390_runtime_instr.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setattr.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, seccomp.2, select.2, select_tut.2, semctl.2, semget.2, semop.2, send.2, sendfile.2, sendmmsg.2, set_mempolicy.2, set_thread_area.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setns.2, setpgid.2, setresuid.2, setreuid.2, setsid.2, setuid.2, sgetmask.2, shmctl.2, shmget.2, shmop.2, sigaction.2, sigaltstack.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, socket.2, socketcall.2, socketpair.2, splice.2, spu_create.2, spu_run.2, stat.2, statfs.2, statx.2, subpage_prot.2, swapon.2, symlink.2, sync.2, sync_file_range.2, syscalls.2, sysctl.2, sysinfo.2, syslog.2, tee.2, time.2, timer_create.2, timer_getoverrun.2, timer_settime.2, timerfd_create.2, times.2, tkill.2, truncate.2, umask.2, umount.2, unimplemented.2, unlink.2, unshare.2, uselib.2, userfaultfd.2, utime.2, utimensat.2, vfork.2, vmsplice.2, wait.2, wait4.2, write.2: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 07:30:51 +00:00
|
|
|
.IP
|
2015-12-04 09:30:46 +00:00
|
|
|
The timer expirations affected by timer slack are those set by
|
|
|
|
.BR select (2),
|
|
|
|
.BR pselect (2),
|
|
|
|
.BR poll (2),
|
|
|
|
.BR ppoll (2),
|
|
|
|
.BR epoll_wait (2),
|
|
|
|
.BR epoll_pwait (2),
|
|
|
|
.BR clock_nanosleep (2),
|
|
|
|
.BR nanosleep (2),
|
|
|
|
and
|
|
|
|
.BR futex (2)
|
|
|
|
(and thus the library functions implemented via futexes, including
|
|
|
|
.\" List obtained by grepping for futex usage in glibc source
|
|
|
|
.BR pthread_cond_timedwait (3),
|
|
|
|
.BR pthread_mutex_timedlock (3),
|
|
|
|
.BR pthread_rwlock_timedrdlock (3),
|
|
|
|
.BR pthread_rwlock_timedwrlock (3),
|
|
|
|
and
|
|
|
|
.BR sem_timedwait (3)).
|
_syscall.2, bpf.2, cacheflush.2, capget.2, chdir.2, chmod.2, chroot.2, clock_getres.2, clock_nanosleep.2, clone.2, close.2, connect.2, copy_file_range.2, create_module.2, delete_module.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, eventfd.2, execve.2, execveat.2, fallocate.2, flock.2, fork.2, fsync.2, futex.2, futimesat.2, get_kernel_syms.2, get_mempolicy.2, get_robust_list.2, getcpu.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getitimer.2, getpagesize.2, getpeername.2, getpriority.2, getrandom.2, getresuid.2, getrlimit.2, getrusage.2, getsid.2, getsockname.2, getsockopt.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, init_module.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, intro.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl_fat.2, ioctl_ficlonerange.2, ioctl_fideduperange.2, ioctl_tty.2, ioctl_userfaultfd.2, ioperm.2, iopl.2, ioprio_set.2, kcmp.2, kexec_load.2, keyctl.2, kill.2, link.2, listen.2, listxattr.2, llseek.2, lookup_dcookie.2, lseek.2, madvise.2, mbind.2, membarrier.2, memfd_create.2, migrate_pages.2, mincore.2, mkdir.2, mknod.2, mlock.2, mmap.2, mmap2.2, modify_ldt.2, move_pages.2, mprotect.2, mq_getsetattr.2, mremap.2, msgctl.2, msgget.2, msgop.2, msync.2, nanosleep.2, nfsservctl.2, nice.2, open_by_handle_at.2, outb.2, perf_event_open.2, perfmonctl.2, personality.2, pivot_root.2, pkey_alloc.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, ptrace.2, query_module.2, quotactl.2, read.2, readahead.2, readdir.2, readv.2, reboot.2, recv.2, recvmmsg.2, remap_file_pages.2, rename.2, request_key.2, restart_syscall.2, rt_sigqueueinfo.2, s390_pci_mmio_write.2, s390_runtime_instr.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setattr.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, seccomp.2, select.2, select_tut.2, semctl.2, semget.2, semop.2, send.2, sendfile.2, sendmmsg.2, set_mempolicy.2, set_thread_area.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setns.2, setpgid.2, setresuid.2, setreuid.2, setsid.2, setuid.2, sgetmask.2, shmctl.2, shmget.2, shmop.2, sigaction.2, sigaltstack.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, socket.2, socketcall.2, socketpair.2, splice.2, spu_create.2, spu_run.2, stat.2, statfs.2, statx.2, subpage_prot.2, swapon.2, symlink.2, sync.2, sync_file_range.2, syscalls.2, sysctl.2, sysinfo.2, syslog.2, tee.2, time.2, timer_create.2, timer_getoverrun.2, timer_settime.2, timerfd_create.2, times.2, tkill.2, truncate.2, umask.2, umount.2, unimplemented.2, unlink.2, unshare.2, uselib.2, userfaultfd.2, utime.2, utimensat.2, vfork.2, vmsplice.2, wait.2, wait4.2, write.2: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 07:30:51 +00:00
|
|
|
.IP
|
2015-12-04 09:30:46 +00:00
|
|
|
Timer slack is not applied to threads that are scheduled under
|
|
|
|
a real-time scheduling policy (see
|
|
|
|
.BR sched_setscheduler (2)).
|
_syscall.2, bpf.2, cacheflush.2, capget.2, chdir.2, chmod.2, chroot.2, clock_getres.2, clock_nanosleep.2, clone.2, close.2, connect.2, copy_file_range.2, create_module.2, delete_module.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, eventfd.2, execve.2, execveat.2, fallocate.2, flock.2, fork.2, fsync.2, futex.2, futimesat.2, get_kernel_syms.2, get_mempolicy.2, get_robust_list.2, getcpu.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getitimer.2, getpagesize.2, getpeername.2, getpriority.2, getrandom.2, getresuid.2, getrlimit.2, getrusage.2, getsid.2, getsockname.2, getsockopt.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, init_module.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, intro.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl_fat.2, ioctl_ficlonerange.2, ioctl_fideduperange.2, ioctl_tty.2, ioctl_userfaultfd.2, ioperm.2, iopl.2, ioprio_set.2, kcmp.2, kexec_load.2, keyctl.2, kill.2, link.2, listen.2, listxattr.2, llseek.2, lookup_dcookie.2, lseek.2, madvise.2, mbind.2, membarrier.2, memfd_create.2, migrate_pages.2, mincore.2, mkdir.2, mknod.2, mlock.2, mmap.2, mmap2.2, modify_ldt.2, move_pages.2, mprotect.2, mq_getsetattr.2, mremap.2, msgctl.2, msgget.2, msgop.2, msync.2, nanosleep.2, nfsservctl.2, nice.2, open_by_handle_at.2, outb.2, perf_event_open.2, perfmonctl.2, personality.2, pivot_root.2, pkey_alloc.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, ptrace.2, query_module.2, quotactl.2, read.2, readahead.2, readdir.2, readv.2, reboot.2, recv.2, recvmmsg.2, remap_file_pages.2, rename.2, request_key.2, restart_syscall.2, rt_sigqueueinfo.2, s390_pci_mmio_write.2, s390_runtime_instr.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setattr.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, seccomp.2, select.2, select_tut.2, semctl.2, semget.2, semop.2, send.2, sendfile.2, sendmmsg.2, set_mempolicy.2, set_thread_area.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setns.2, setpgid.2, setresuid.2, setreuid.2, setsid.2, setuid.2, sgetmask.2, shmctl.2, shmget.2, shmop.2, sigaction.2, sigaltstack.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, socket.2, socketcall.2, socketpair.2, splice.2, spu_create.2, spu_run.2, stat.2, statfs.2, statx.2, subpage_prot.2, swapon.2, symlink.2, sync.2, sync_file_range.2, syscalls.2, sysctl.2, sysinfo.2, syslog.2, tee.2, time.2, timer_create.2, timer_getoverrun.2, timer_settime.2, timerfd_create.2, times.2, tkill.2, truncate.2, umask.2, umount.2, unimplemented.2, unlink.2, unshare.2, uselib.2, userfaultfd.2, utime.2, utimensat.2, vfork.2, vmsplice.2, wait.2, wait4.2, write.2: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 07:30:51 +00:00
|
|
|
.IP
|
2015-12-04 09:30:46 +00:00
|
|
|
When a new thread is created,
|
2016-06-09 09:46:43 +00:00
|
|
|
the two timer slack values are made the same as the "current" value
|
2015-12-04 09:30:46 +00:00
|
|
|
of the creating thread.
|
2016-06-09 09:46:43 +00:00
|
|
|
Thereafter, a thread can adjust its "current" timer slack value via
|
|
|
|
.BR PR_SET_TIMERSLACK .
|
|
|
|
The "default" value can't be changed.
|
2015-12-04 09:30:46 +00:00
|
|
|
The timer slack values of
|
|
|
|
.IR init
|
|
|
|
(PID 1), the ancestor of all processes,
|
|
|
|
are 50,000 nanoseconds (50 microseconds).
|
2019-07-24 06:52:23 +00:00
|
|
|
The timer slack value is inherited by a child created via
|
2019-08-02 06:35:43 +00:00
|
|
|
.BR fork (2),
|
2019-07-24 06:52:23 +00:00
|
|
|
and is preserved across
|
2015-12-04 09:30:46 +00:00
|
|
|
.BR execve (2).
|
_syscall.2, bpf.2, cacheflush.2, capget.2, chdir.2, chmod.2, chroot.2, clock_getres.2, clock_nanosleep.2, clone.2, close.2, connect.2, copy_file_range.2, create_module.2, delete_module.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, eventfd.2, execve.2, execveat.2, fallocate.2, flock.2, fork.2, fsync.2, futex.2, futimesat.2, get_kernel_syms.2, get_mempolicy.2, get_robust_list.2, getcpu.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getitimer.2, getpagesize.2, getpeername.2, getpriority.2, getrandom.2, getresuid.2, getrlimit.2, getrusage.2, getsid.2, getsockname.2, getsockopt.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, init_module.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, intro.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl_fat.2, ioctl_ficlonerange.2, ioctl_fideduperange.2, ioctl_tty.2, ioctl_userfaultfd.2, ioperm.2, iopl.2, ioprio_set.2, kcmp.2, kexec_load.2, keyctl.2, kill.2, link.2, listen.2, listxattr.2, llseek.2, lookup_dcookie.2, lseek.2, madvise.2, mbind.2, membarrier.2, memfd_create.2, migrate_pages.2, mincore.2, mkdir.2, mknod.2, mlock.2, mmap.2, mmap2.2, modify_ldt.2, move_pages.2, mprotect.2, mq_getsetattr.2, mremap.2, msgctl.2, msgget.2, msgop.2, msync.2, nanosleep.2, nfsservctl.2, nice.2, open_by_handle_at.2, outb.2, perf_event_open.2, perfmonctl.2, personality.2, pivot_root.2, pkey_alloc.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, ptrace.2, query_module.2, quotactl.2, read.2, readahead.2, readdir.2, readv.2, reboot.2, recv.2, recvmmsg.2, remap_file_pages.2, rename.2, request_key.2, restart_syscall.2, rt_sigqueueinfo.2, s390_pci_mmio_write.2, s390_runtime_instr.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setattr.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, seccomp.2, select.2, select_tut.2, semctl.2, semget.2, semop.2, send.2, sendfile.2, sendmmsg.2, set_mempolicy.2, set_thread_area.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setns.2, setpgid.2, setresuid.2, setreuid.2, setsid.2, setuid.2, sgetmask.2, shmctl.2, shmget.2, shmop.2, sigaction.2, sigaltstack.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, socket.2, socketcall.2, socketpair.2, splice.2, spu_create.2, spu_run.2, stat.2, statfs.2, statx.2, subpage_prot.2, swapon.2, symlink.2, sync.2, sync_file_range.2, syscalls.2, sysctl.2, sysinfo.2, syslog.2, tee.2, time.2, timer_create.2, timer_getoverrun.2, timer_settime.2, timerfd_create.2, times.2, tkill.2, truncate.2, umask.2, umount.2, unimplemented.2, unlink.2, unshare.2, uselib.2, userfaultfd.2, utime.2, utimensat.2, vfork.2, vmsplice.2, wait.2, wait4.2, write.2: Formatting fix: replace blank lines with .PP/.IP
Blank lines shouldn't generally appear in *roff source (other
than in code examples), since they create large vertical
spaces between text blocks.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-16 07:30:51 +00:00
|
|
|
.IP
|
2016-06-11 08:58:45 +00:00
|
|
|
Since Linux 4.6, the "current" timer slack value of any process
|
|
|
|
can be examined and changed via the file
|
|
|
|
.IR /proc/[pid]/timerslack_ns .
|
|
|
|
See
|
|
|
|
.BR proc (5).
|
2020-05-12 16:36:49 +00:00
|
|
|
.\" prctl PR_GET_TIMERSLACK
|
2015-12-04 07:30:51 +00:00
|
|
|
.TP
|
2015-12-04 09:30:46 +00:00
|
|
|
.BR PR_GET_TIMERSLACK " (since Linux 2.6.28)"
|
|
|
|
Return (as the function result)
|
2016-06-09 09:46:43 +00:00
|
|
|
the "current" timer slack value of the calling thread.
|
2020-05-12 16:36:49 +00:00
|
|
|
.\" prctl PR_SET_TIMING
|
2015-12-04 07:54:27 +00:00
|
|
|
.TP
|
2018-11-19 12:06:53 +00:00
|
|
|
.BR PR_SET_TIMING " (since Linux 2.6.0)"
|
|
|
|
.\" Precisely: Linux 2.6.0-test4
|
2015-12-04 09:30:46 +00:00
|
|
|
Set whether to use (normal, traditional) statistical process timing or
|
|
|
|
accurate timestamp-based process timing, by passing
|
|
|
|
.B PR_TIMING_STATISTICAL
|
|
|
|
.\" 0
|
|
|
|
or
|
|
|
|
.B PR_TIMING_TIMESTAMP
|
|
|
|
.\" 1
|
|
|
|
to \fIarg2\fP.
|
|
|
|
.B PR_TIMING_TIMESTAMP
|
|
|
|
is not currently implemented
|
|
|
|
(attempting to set this mode will yield the error
|
|
|
|
.BR EINVAL ).
|
|
|
|
.\" PR_TIMING_TIMESTAMP doesn't do anything in 2.6.26-rc8,
|
|
|
|
.\" and looking at the patch history, it appears
|
|
|
|
.\" that it never did anything.
|
2020-05-12 16:36:49 +00:00
|
|
|
.\" prctl PR_GET_TIMING
|
2015-12-04 07:54:27 +00:00
|
|
|
.TP
|
2018-11-19 12:06:53 +00:00
|
|
|
.BR PR_GET_TIMING " (since Linux 2.6.0)"
|
|
|
|
.\" Precisely: Linux 2.6.0-test4
|
2015-12-04 09:30:46 +00:00
|
|
|
Return (as the function result) which process timing method is currently
|
|
|
|
in use.
|
2020-05-12 16:36:49 +00:00
|
|
|
.\" prctl PR_SET_TSC
|
2015-12-04 07:54:27 +00:00
|
|
|
.TP
|
2015-12-04 09:30:46 +00:00
|
|
|
.BR PR_SET_TSC " (since Linux 2.6.26, x86 only)"
|
|
|
|
Set the state of the flag determining whether the timestamp counter
|
|
|
|
can be read by the process.
|
|
|
|
Pass
|
|
|
|
.B PR_TSC_ENABLE
|
|
|
|
to
|
|
|
|
.I arg2
|
|
|
|
to allow it to be read, or
|
|
|
|
.B PR_TSC_SIGSEGV
|
|
|
|
to generate a
|
|
|
|
.B SIGSEGV
|
|
|
|
when the process tries to read the timestamp counter.
|
2020-05-12 16:36:49 +00:00
|
|
|
.\" prctl PR_GET_TSC
|
2015-12-04 07:54:27 +00:00
|
|
|
.TP
|
2015-12-04 09:30:46 +00:00
|
|
|
.BR PR_GET_TSC " (since Linux 2.6.26, x86 only)"
|
|
|
|
Return the state of the flag determining whether the timestamp counter
|
|
|
|
can be read,
|
|
|
|
in the location pointed to by
|
|
|
|
.IR "(int\ *) arg2" .
|
2020-05-12 16:36:49 +00:00
|
|
|
.\" prctl PR_SET_UNALIGN
|
2015-12-04 09:30:46 +00:00
|
|
|
.TP
|
|
|
|
.B PR_SET_UNALIGN
|
|
|
|
(Only on: ia64, since Linux 2.3.48; parisc, since Linux 2.6.15;
|
2016-12-12 03:54:18 +00:00
|
|
|
PowerPC, since Linux 2.6.18; Alpha, since Linux 2.6.22;
|
|
|
|
.\" sh: 94ea5e449ae834af058ef005d16a8ad44fcf13d6
|
|
|
|
.\" tile: 2f9ac29eec71a696cb0dcc5fb82c0f8d4dac28c9
|
|
|
|
sh, since Linux 2.6.34; tile, since Linux 3.12)
|
2015-12-04 09:30:46 +00:00
|
|
|
Set unaligned access control bits to \fIarg2\fP.
|
|
|
|
Pass
|
|
|
|
\fBPR_UNALIGN_NOPRINT\fP to silently fix up unaligned user accesses,
|
|
|
|
or \fBPR_UNALIGN_SIGBUS\fP to generate
|
|
|
|
.B SIGBUS
|
2016-12-12 06:21:41 +00:00
|
|
|
on unaligned user access.
|
|
|
|
Alpha also supports an additional flag with the value
|
|
|
|
of 4 and no corresponding named constant,
|
|
|
|
which instructs kernel to not fix up
|
2016-12-12 03:54:18 +00:00
|
|
|
unaligned accesses (it is analogous to providing the
|
2016-12-12 06:21:41 +00:00
|
|
|
.BR UAC_NOFIX
|
|
|
|
flag in
|
|
|
|
.BR SSI_NVPAIRS
|
|
|
|
operation of the
|
|
|
|
.BR setsysinfo ()
|
|
|
|
system call on Tru64).
|
2020-05-12 16:36:49 +00:00
|
|
|
.\" prctl PR_GET_UNALIGN
|
2015-12-04 09:30:46 +00:00
|
|
|
.TP
|
|
|
|
.B PR_GET_UNALIGN
|
2019-10-02 03:11:02 +00:00
|
|
|
(See
|
2015-12-04 09:30:46 +00:00
|
|
|
.B PR_SET_UNALIGN
|
2019-10-02 03:11:02 +00:00
|
|
|
for information on versions and architectures.)
|
2015-12-04 09:30:46 +00:00
|
|
|
Return unaligned access control bits, in the location pointed to by
|
2016-12-12 03:54:18 +00:00
|
|
|
.IR "(unsigned int\ *) arg2" .
|
getent.1, intro.1, time.1, _exit.2, _syscall.2, accept.2, access.2, acct.2, adjtimex.2, alarm.2, alloc_hugepages.2, arch_prctl.2, bdflush.2, bind.2, brk.2, cacheflush.2, capget.2, chdir.2, chmod.2, chown.2, chroot.2, clock_getres.2, clock_nanosleep.2, clone.2, close.2, connect.2, create_module.2, delete_module.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, eventfd.2, execve.2, exit_group.2, faccessat.2, fchmodat.2, fchownat.2, fcntl.2, flock.2, fork.2, fstatat.2, fsync.2, futex.2, futimesat.2, get_kernel_syms.2, get_robust_list.2, get_thread_area.2, getcpu.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getitimer.2, getpagesize.2, getpeername.2, getpid.2, getpriority.2, getresuid.2, getrlimit.2, getrusage.2, getsid.2, getsockname.2, getsockopt.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, getxattr.2, idle.2, init_module.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, intro.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl.2, ioctl_list.2, ioperm.2, iopl.2, ioprio_set.2, ipc.2, kcmp.2, kill.2, killpg.2, link.2, linkat.2, listen.2, listxattr.2, llseek.2, lookup_dcookie.2, lseek.2, madvise.2, migrate_pages.2, mincore.2, mkdir.2, mkdirat.2, mknod.2, mknodat.2, mlock.2, mmap.2, mmap2.2, modify_ldt.2, mount.2, move_pages.2, mprotect.2, mq_getsetattr.2, mremap.2, msgctl.2, msgget.2, msgop.2, msync.2, nanosleep.2, nfsservctl.2, nice.2, open.2, openat.2, outb.2, pause.2, pciconfig_read.2, perf_event_open.2, perfmonctl.2, personality.2, pipe.2, pivot_root.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, ptrace.2, query_module.2, quotactl.2, read.2, readahead.2, readdir.2, readlink.2, readlinkat.2, readv.2, reboot.2, recv.2, remap_file_pages.2, removexattr.2, rename.2, renameat.2, rmdir.2, rt_sigqueueinfo.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, select.2, semctl.2, semget.2, semop.2, send.2, sendfile.2, set_thread_area.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setpgid.2, setresuid.2, setreuid.2, setsid.2, setuid.2, setup.2, setxattr.2, shmctl.2, shmget.2, shmop.2, shutdown.2, sigaction.2, sigaltstack.2, signal.2, signalfd.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, socket.2, socketcall.2, socketpair.2, splice.2, stat.2, statfs.2, stime.2, swapon.2, symlink.2, symlinkat.2, sync.2, sync_file_range.2, sysctl.2, sysfs.2, sysinfo.2, syslog.2, tee.2, time.2, timerfd_create.2, times.2, tkill.2, truncate.2, umask.2, umount.2, uname.2, unimplemented.2, unlink.2, unlinkat.2, uselib.2, ustat.2, utime.2, utimensat.2, vfork.2, vhangup.2, vm86.2, vmsplice.2, wait.2, wait4.2, write.2, CPU_SET.3, INFINITY.3, MB_CUR_MAX.3, MB_LEN_MAX.3, __setfpucw.3, a64l.3, abort.3, abs.3, acos.3, acosh.3, addseverity.3, adjtime.3, aio_cancel.3, aio_error.3, aio_fsync.3, aio_read.3, aio_return.3, aio_suspend.3, aio_write.3, alloca.3, argz_add.3, asin.3, asinh.3, asprintf.3, assert.3, assert_perror.3, atan.3, atan2.3, atanh.3, atexit.3, atof.3, atoi.3, backtrace.3, basename.3, bcmp.3, bcopy.3, bindresvport.3, bsd_signal.3, bsearch.3, bstring.3, btowc.3, btree.3, byteorder.3, bzero.3, cabs.3, cacos.3, cacosh.3, canonicalize_file_name.3, carg.3, casin.3, casinh.3, catan.3, catanh.3, catgets.3, catopen.3, cbrt.3, ccos.3, ccosh.3, ceil.3, cerf.3, cexp.3, cexp2.3, cfree.3, cimag.3, clearenv.3, clock.3, clock_getcpuclockid.3, clog.3, clog10.3, clog2.3, closedir.3, cmsg.3, confstr.3, conj.3, copysign.3, cos.3, cosh.3, cpow.3, cproj.3, creal.3, crypt.3, csin.3, csinh.3, csqrt.3, ctan.3, ctanh.3, ctermid.3, ctime.3, daemon.3, dbopen.3, des_crypt.3, difftime.3, dirfd.3, div.3, dl_iterate_phdr.3, dlopen.3, dprintf.3, drand48.3, drand48_r.3, dysize.3, ecvt.3, ecvt_r.3, encrypt.3, end.3, endian.3, envz_add.3, erf.3, erfc.3, err.3, errno.3, error.3, ether_aton.3, euidaccess.3, exec.3, exit.3, exp.3, exp10.3, exp2.3, expm1.3, fabs.3, fclose.3, fcloseall.3, fdim.3, fenv.3, ferror.3, fexecve.3, fflush.3, ffs.3, fgetgrent.3, fgetpwent.3, fgetwc.3, fgetws.3, finite.3, flockfile.3, floor.3, fma.3, fmax.3, fmemopen.3, fmin.3, fmod.3, fmtmsg.3, fnmatch.3, fopen.3, fpathconf.3, fpclassify.3, fpurge.3, fputwc.3, fputws.3, fread.3, frexp.3, fseek.3, fseeko.3, ftime.3, ftok.3, fts.3, ftw.3, futimes.3, fwide.3, gamma.3, gcvt.3, getaddrinfo.3, getaddrinfo_a.3, getauxval.3, getcontext.3, getcwd.3, getdate.3, getdirentries.3, getdtablesize.3, getenv.3, getfsent.3, getgrent.3, getgrent_r.3, getgrnam.3, getgrouplist.3, gethostbyname.3, gethostid.3, getipnodebyname.3, getline.3, getloadavg.3, getlogin.3, getmntent.3, getnameinfo.3, getnetent.3, getnetent_r.3, getopt.3, getpass.3, getprotoent.3, getprotoent_r.3, getpt.3, getpw.3, getpwent.3, getpwent_r.3, getpwnam.3, getrpcent.3, getrpcent_r.3, getrpcport.3, gets.3, getservent.3, getservent_r.3, getspnam.3, getttyent.3, getumask.3, getusershell.3, getutent.3, getw.3, getwchar.3, glob.3, grantpt.3, gsignal.3, hash.3, hsearch.3, hypot.3, iconv.3, iconv_close.3, iconv_open.3, ilogb.3, index.3, inet.3, inet_ntop.3, inet_pton.3, infnan.3, initgroups.3, insque.3, intro.3, isalpha.3, isatty.3, isgreater.3, iswalnum.3, iswalpha.3, iswblank.3, iswcntrl.3, iswctype.3, iswdigit.3, iswgraph.3, iswlower.3, iswprint.3, iswpunct.3, iswspace.3, iswupper.3, iswxdigit.3, j0.3, key_setsecret.3, ldexp.3, lgamma.3, lio_listio.3, localeconv.3, lockf.3, log.3, log10.3, log1p.3, log2.3, logb.3, login.3, longjmp.3, lrint.3, lround.3, lsearch.3, lseek64.3, makecontext.3, makedev.3, malloc.3, malloc_hook.3, mblen.3, mbrlen.3, mbrtowc.3, mbsinit.3, mbsnrtowcs.3, mbsrtowcs.3, mbstowcs.3, mbtowc.3, memccpy.3, memchr.3, memcmp.3, memcpy.3, memfrob.3, memmem.3, memmove.3, mempcpy.3, memset.3, mkdtemp.3, mkfifo.3, mkfifoat.3, mkstemp.3, mktemp.3, modf.3, mpool.3, mq_close.3, mq_getattr.3, mq_notify.3, mq_open.3, mq_receive.3, mq_send.3, mq_unlink.3, mtrace.3, nan.3, netlink.3, nextafter.3, nl_langinfo.3, offsetof.3, on_exit.3, opendir.3, openpty.3, perror.3, popen.3, posix_fallocate.3, posix_memalign.3, posix_openpt.3, pow.3, pow10.3, printf.3, profil.3, program_invocation_name.3, psignal.3, pthread_kill_other_threads_np.3, ptsname.3, putenv.3, putgrent.3, putpwent.3, puts.3, putwchar.3, qecvt.3, qsort.3, queue.3, raise.3, rand.3, random.3, random_r.3, rcmd.3, re_comp.3, readdir.3, realpath.3, recno.3, regex.3, remainder.3, remove.3, remquo.3, resolver.3, rewinddir.3, rexec.3, rint.3, round.3, rpc.3, rpmatch.3, rtime.3, rtnetlink.3, scalb.3, scalbln.3, scandir.3, scandirat.3, scanf.3, seekdir.3, sem_close.3, sem_destroy.3, sem_getvalue.3, sem_init.3, sem_open.3, sem_post.3, sem_unlink.3, sem_wait.3, setaliasent.3, setbuf.3, setenv.3, setjmp.3, setlocale.3, setlogmask.3, setnetgrent.3, shm_open.3, siginterrupt.3, signbit.3, significand.3, sigpause.3, sigqueue.3, sigset.3, sigsetops.3, sigvec.3, sin.3, sincos.3, sinh.3, sleep.3, sockatmark.3, sqrt.3, statvfs.3, stdarg.3, stdin.3, stdio.3, stdio_ext.3, stpcpy.3, stpncpy.3, strcasecmp.3, strcat.3, strchr.3, strcmp.3, strcoll.3, strcpy.3, strdup.3, strerror.3, strfmon.3, strfry.3, strftime.3, string.3, strlen.3, strnlen.3, strpbrk.3, strptime.3, strsep.3, strsignal.3, strspn.3, strstr.3, strtod.3, strtoimax.3, strtok.3, strtol.3, strtoul.3, strverscmp.3, strxfrm.3, swab.3, sysconf.3, syslog.3, system.3, sysv_signal.3, tan.3, tanh.3, tcgetpgrp.3, tcgetsid.3, telldir.3, tempnam.3, termios.3, tgamma.3, timegm.3, timeradd.3, tmpfile.3, tmpnam.3, toascii.3, toupper.3, towctrans.3, towlower.3, towupper.3, trunc.3, tsearch.3, ttyname.3, ttyslot.3, tzset.3, ualarm.3, ulimit.3, ungetwc.3, unlocked_stdio.3, unlockpt.3, updwtmp.3, usleep.3, wcpcpy.3, wcpncpy.3, wcrtomb.3, wcscasecmp.3, wcscat.3, wcschr.3, wcscmp.3, wcscpy.3, wcscspn.3, wcsdup.3, wcslen.3, wcsncasecmp.3, wcsncat.3, wcsncmp.3, wcsncpy.3, wcsnlen.3, wcsnrtombs.3, wcspbrk.3, wcsrchr.3, wcsrtombs.3, wcsspn.3, wcsstr.3, wcstoimax.3, wcstok.3, wcstombs.3, wcswidth.3, wctob.3, wctomb.3, wctrans.3, wctype.3, wcwidth.3, wmemchr.3, wmemcmp.3, wmemcpy.3, wmemmove.3, wmemset.3, wordexp.3, wprintf.3, xcrypt.3, xdr.3, y0.3, cciss.4, console.4, console_codes.4, console_ioctl.4, dsp56k.4, fd.4, full.4, hd.4, hpsa.4, initrd.4, intro.4, lp.4, mem.4, mouse.4, null.4, pts.4, ram.4, random.4, rtc.4, sk98lin.4, st.4, tty.4, ttyS.4, tty_ioctl.4, vcs.4, wavelan.4, acct.5, charmap.5, dir_colors.5, filesystems.5, ftpusers.5, group.5, host.conf.5, hosts.5, hosts.equiv.5, intro.5, issue.5, locale.5, motd.5, networks.5, nologin.5, nscd.conf.5, passwd.5, proc.5, protocols.5, resolv.conf.5, rpc.5, securetty.5, services.5, shells.5, termcap.5, ttytype.5, utmp.5, armscii-8.7, arp.7, ascii.7, bootparam.7, capabilities.7, charsets.7, complex.7, cp1251.7, credentials.7, ddp.7, environ.7, epoll.7, fifo.7, futex.7, glob.7, hier.7, icmp.7, inotify.7, intro.7, ip.7, ipv6.7, iso_8859-1.7, iso_8859-10.7, iso_8859-11.7, iso_8859-13.7, iso_8859-14.7, iso_8859-15.7, iso_8859-16.7, iso_8859-2.7, iso_8859-3.7, iso_8859-4.7, iso_8859-5.7, iso_8859-6.7, iso_8859-7.7, iso_8859-8.7, iso_8859-9.7, koi8-r.7, koi8-u.7, locale.7, mailaddr.7, man.7, mq_overview.7, netdevice.7, netlink.7, numa.7, packet.7, path_resolution.7, pipe.7, posixoptions.7, pthreads.7, pty.7, raw.7, regex.7, rtld-audit.7, rtnetlink.7, sem_overview.7, shm_overview.7, sigevent.7, signal.7, socket.7, standards.7, suffixes.7, svipc.7, tcp.7, termio.7, time.7, udp.7, udplite.7, unicode.7, unix.7, uri.7, utf-8.7, x25.7, nscd.8, sync.8, tzselect.8, zdump.8, zic.8: Global fix: remove unneeded double quotes in .SH headings
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2013-02-24 18:01:36 +00:00
|
|
|
.SH RETURN VALUE
|
2008-07-09 11:53:48 +00:00
|
|
|
On success,
|
2020-05-12 16:36:50 +00:00
|
|
|
.BR PR_CAP_AMBIENT + PR_CAP_AMBIENT_IS_SET ,
|
|
|
|
.BR PR_CAPBSET_READ ,
|
2008-07-09 11:53:48 +00:00
|
|
|
.BR PR_GET_DUMPABLE ,
|
2019-10-02 04:09:38 +00:00
|
|
|
.BR PR_GET_FP_MODE ,
|
2020-05-12 16:36:50 +00:00
|
|
|
.BR PR_GET_IO_FLUSHER ,
|
2008-07-09 11:53:48 +00:00
|
|
|
.BR PR_GET_KEEPCAPS ,
|
2020-05-12 16:36:50 +00:00
|
|
|
.BR PR_MCE_KILL_GET ,
|
2012-10-22 07:13:08 +00:00
|
|
|
.BR PR_GET_NO_NEW_PRIVS ,
|
2020-05-12 16:36:50 +00:00
|
|
|
.BR PR_GET_SECUREBITS ,
|
|
|
|
.BR PR_GET_SPECULATION_CTRL ,
|
2020-06-24 17:36:01 +00:00
|
|
|
.BR PR_SVE_GET_VL ,
|
|
|
|
.BR PR_SVE_SET_VL ,
|
2020-06-24 17:36:02 +00:00
|
|
|
.BR PR_GET_TAGGED_ADDR_CTRL ,
|
2014-04-14 10:07:33 +00:00
|
|
|
.BR PR_GET_THP_DISABLE ,
|
2008-07-09 11:53:48 +00:00
|
|
|
.BR PR_GET_TIMING ,
|
2014-02-22 08:46:39 +00:00
|
|
|
.BR PR_GET_TIMERSLACK ,
|
2008-07-09 11:53:48 +00:00
|
|
|
and (if it returns)
|
|
|
|
.BR PR_GET_SECCOMP
|
_syscall.2, accept.2, epoll_create.2, inotify_add_watch.2, ioctl.2, msgget.2, msgop.2, open.2, prctl.2, sched_setscheduler.2, semctl.2, semget.2, swapon.2, addseverity.3, cacosh.3, csqrt.3, dirfd.3, drand48.3, fputws.3, mq_send.3, posix_openpt.3, puts.3, sched_getcpu.3, shm_open.3, sqrt.3, sysconf.3, tgamma.3, ulimit.3, credentials.7, svipc.7: Global fix: s/non-negative/nonnegative/
The tendency in English, as prescribed in style guides like
Chicago MoS, is towards removing hyphens after prefixes
like "non-" etc.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2010-01-16 16:44:48 +00:00
|
|
|
return the nonnegative values described above.
|
2004-11-03 13:51:07 +00:00
|
|
|
All other
|
|
|
|
.I option
|
|
|
|
values return 0 on success.
|
|
|
|
On error, \-1 is returned, and
|
|
|
|
.I errno
|
2021-01-07 07:12:28 +00:00
|
|
|
is set to indicate the error.
|
2004-11-03 13:51:07 +00:00
|
|
|
.SH ERRORS
|
|
|
|
.TP
|
2015-12-04 08:15:25 +00:00
|
|
|
.B EACCES
|
|
|
|
.I option
|
|
|
|
is
|
2016-09-16 10:35:45 +00:00
|
|
|
.BR PR_SET_SECCOMP
|
|
|
|
and
|
|
|
|
.I arg2
|
|
|
|
is
|
|
|
|
.BR SECCOMP_MODE_FILTER ,
|
|
|
|
but the process does not have the
|
|
|
|
.BR CAP_SYS_ADMIN
|
|
|
|
capability or has not set the
|
|
|
|
.IR no_new_privs
|
|
|
|
attribute (see the discussion of
|
|
|
|
.BR PR_SET_NO_NEW_PRIVS
|
|
|
|
above).
|
|
|
|
.TP
|
|
|
|
.B EACCES
|
|
|
|
.I option
|
|
|
|
is
|
2015-12-04 08:15:25 +00:00
|
|
|
.BR PR_SET_MM ,
|
|
|
|
and
|
|
|
|
.I arg3
|
|
|
|
is
|
|
|
|
.BR PR_SET_MM_EXE_FILE ,
|
|
|
|
the file is not executable.
|
|
|
|
.TP
|
|
|
|
.B EBADF
|
|
|
|
.I option
|
|
|
|
is
|
|
|
|
.BR PR_SET_MM ,
|
|
|
|
.I arg3
|
|
|
|
is
|
|
|
|
.BR PR_SET_MM_EXE_FILE ,
|
|
|
|
and the file descriptor passed in
|
|
|
|
.I arg4
|
|
|
|
is not valid.
|
|
|
|
.TP
|
|
|
|
.B EBUSY
|
|
|
|
.I option
|
|
|
|
is
|
|
|
|
.BR PR_SET_MM ,
|
|
|
|
.I arg3
|
|
|
|
is
|
|
|
|
.BR PR_SET_MM_EXE_FILE ,
|
|
|
|
and this the second attempt to change the
|
|
|
|
.I /proc/pid/exe
|
|
|
|
symbolic link, which is prohibited.
|
|
|
|
.TP
|
2008-07-09 11:53:48 +00:00
|
|
|
.B EFAULT
|
|
|
|
.I arg2
|
|
|
|
is an invalid address.
|
|
|
|
.TP
|
2014-09-25 22:47:47 +00:00
|
|
|
.B EFAULT
|
|
|
|
.I option
|
|
|
|
is
|
|
|
|
.BR PR_SET_SECCOMP ,
|
|
|
|
.I arg2
|
|
|
|
is
|
|
|
|
.BR SECCOMP_MODE_FILTER ,
|
|
|
|
the system was built with
|
2015-01-07 08:42:47 +00:00
|
|
|
.BR CONFIG_SECCOMP_FILTER ,
|
2014-09-25 22:47:47 +00:00
|
|
|
and
|
|
|
|
.I arg3
|
|
|
|
is an invalid address.
|
|
|
|
.TP
|
2021-02-07 23:47:57 +00:00
|
|
|
.B EFAULT
|
|
|
|
.I option
|
|
|
|
is
|
|
|
|
.B PR_SET_SYSCALL_USER_DISPATCH
|
|
|
|
and
|
|
|
|
.I arg5
|
|
|
|
has an invalid address.
|
|
|
|
.TP
|
2004-11-03 13:51:07 +00:00
|
|
|
.B EINVAL
|
|
|
|
The value of
|
|
|
|
.I option
|
2020-05-12 16:36:57 +00:00
|
|
|
is not recognized,
|
|
|
|
or not supported on this system.
|
2008-09-29 09:00:36 +00:00
|
|
|
.TP
|
2008-07-09 11:53:48 +00:00
|
|
|
.B EINVAL
|
2010-06-12 11:47:27 +00:00
|
|
|
.I option
|
|
|
|
is
|
|
|
|
.BR PR_MCE_KILL
|
|
|
|
or
|
2012-04-15 01:03:10 +00:00
|
|
|
.BR PR_MCE_KILL_GET
|
|
|
|
or
|
|
|
|
.BR PR_SET_MM ,
|
2010-06-12 11:47:27 +00:00
|
|
|
and unused
|
|
|
|
.BR prctl ()
|
|
|
|
arguments were not specified as zero.
|
|
|
|
.TP
|
|
|
|
.B EINVAL
|
2004-11-03 13:51:07 +00:00
|
|
|
.I arg2
|
2008-07-09 11:53:48 +00:00
|
|
|
is not valid value for this
|
|
|
|
.IR option .
|
|
|
|
.TP
|
|
|
|
.B EINVAL
|
|
|
|
.I option
|
|
|
|
is
|
|
|
|
.BR PR_SET_SECCOMP
|
|
|
|
or
|
2013-02-08 00:15:05 +00:00
|
|
|
.BR PR_GET_SECCOMP ,
|
2008-07-09 11:53:48 +00:00
|
|
|
and the kernel was not configured with
|
|
|
|
.BR CONFIG_SECCOMP .
|
2012-04-15 03:53:45 +00:00
|
|
|
.TP
|
|
|
|
.B EINVAL
|
|
|
|
.I option
|
|
|
|
is
|
2014-09-25 22:47:47 +00:00
|
|
|
.BR PR_SET_SECCOMP ,
|
|
|
|
.I arg2
|
|
|
|
is
|
|
|
|
.BR SECCOMP_MODE_FILTER ,
|
|
|
|
and the kernel was not configured with
|
|
|
|
.BR CONFIG_SECCOMP_FILTER .
|
|
|
|
.TP
|
|
|
|
.B EINVAL
|
|
|
|
.I option
|
|
|
|
is
|
2012-04-15 03:53:45 +00:00
|
|
|
.BR PR_SET_MM ,
|
|
|
|
and one of the following is true
|
|
|
|
.RS
|
|
|
|
.IP * 3
|
|
|
|
.I arg4
|
|
|
|
or
|
|
|
|
.I arg5
|
|
|
|
is nonzero;
|
|
|
|
.IP *
|
|
|
|
.I arg3
|
|
|
|
is greater than
|
|
|
|
.B TASK_SIZE
|
|
|
|
(the limit on the size of the user address space for this architecture);
|
|
|
|
.IP *
|
|
|
|
.I arg2
|
|
|
|
is
|
|
|
|
.BR PR_SET_MM_START_CODE ,
|
|
|
|
.BR PR_SET_MM_END_CODE ,
|
|
|
|
.BR PR_SET_MM_START_DATA ,
|
|
|
|
.BR PR_SET_MM_END_DATA ,
|
|
|
|
or
|
2014-02-08 12:11:57 +00:00
|
|
|
.BR PR_SET_MM_START_STACK ,
|
2012-04-15 03:53:45 +00:00
|
|
|
and the permissions of the corresponding memory area are not as required;
|
|
|
|
.IP *
|
|
|
|
.I arg2
|
|
|
|
is
|
|
|
|
.BR PR_SET_MM_START_BRK
|
|
|
|
or
|
|
|
|
.BR PR_SET_MM_BRK ,
|
|
|
|
and
|
|
|
|
.I arg3
|
|
|
|
is less than or equal to the end of the data segment
|
|
|
|
or specifies a value that would cause the
|
|
|
|
.B RLIMIT_DATA
|
|
|
|
resource limit to be exceeded.
|
|
|
|
.RE
|
2008-07-09 11:53:48 +00:00
|
|
|
.TP
|
2013-01-11 10:28:18 +00:00
|
|
|
.B EINVAL
|
|
|
|
.I option
|
|
|
|
is
|
|
|
|
.BR PR_SET_PTRACER
|
|
|
|
and
|
|
|
|
.I arg2
|
|
|
|
is not 0,
|
|
|
|
.BR PR_SET_PTRACER_ANY ,
|
|
|
|
or the PID of an existing process.
|
|
|
|
.TP
|
2014-04-14 06:31:16 +00:00
|
|
|
.B EINVAL
|
|
|
|
.I option
|
|
|
|
is
|
|
|
|
.B PR_SET_PDEATHSIG
|
|
|
|
and
|
|
|
|
.I arg2
|
|
|
|
is not a valid signal number.
|
|
|
|
.TP
|
2014-04-14 06:35:03 +00:00
|
|
|
.B EINVAL
|
|
|
|
.I option
|
|
|
|
is
|
|
|
|
.BR PR_SET_DUMPABLE
|
|
|
|
and
|
|
|
|
.I arg2
|
|
|
|
is neither
|
|
|
|
.B SUID_DUMP_DISABLE
|
|
|
|
nor
|
|
|
|
.BR SUID_DUMP_USER .
|
|
|
|
.TP
|
2014-04-14 06:36:45 +00:00
|
|
|
.B EINVAL
|
|
|
|
.I option
|
|
|
|
is
|
|
|
|
.BR PR_SET_TIMING
|
|
|
|
and
|
|
|
|
.I arg2
|
|
|
|
is not
|
|
|
|
.BR PR_TIMING_STATISTICAL .
|
|
|
|
.TP
|
2014-04-14 06:38:57 +00:00
|
|
|
.B EINVAL
|
|
|
|
.I option
|
|
|
|
is
|
|
|
|
.BR PR_SET_NO_NEW_PRIVS
|
|
|
|
and
|
|
|
|
.I arg2
|
|
|
|
is not equal to 1
|
|
|
|
or
|
|
|
|
.IR arg3 ,
|
|
|
|
.IR arg4 ,
|
|
|
|
or
|
|
|
|
.IR arg5
|
|
|
|
is nonzero.
|
|
|
|
.TP
|
2014-04-14 06:39:53 +00:00
|
|
|
.B EINVAL
|
|
|
|
.I option
|
|
|
|
is
|
|
|
|
.BR PR_GET_NO_NEW_PRIVS
|
|
|
|
and
|
|
|
|
.IR arg2 ,
|
|
|
|
.IR arg3 ,
|
|
|
|
.IR arg4 ,
|
|
|
|
or
|
|
|
|
.IR arg5
|
|
|
|
is nonzero.
|
|
|
|
.TP
|
2014-04-14 10:07:33 +00:00
|
|
|
.B EINVAL
|
|
|
|
.I option
|
2014-05-04 20:27:47 +00:00
|
|
|
is
|
|
|
|
.BR PR_SET_THP_DISABLE
|
2014-04-14 10:07:33 +00:00
|
|
|
and
|
|
|
|
.IR arg3 ,
|
|
|
|
.IR arg4 ,
|
|
|
|
or
|
|
|
|
.IR arg5
|
|
|
|
is nonzero.
|
|
|
|
.TP
|
|
|
|
.B EINVAL
|
|
|
|
.I option
|
2014-05-04 20:27:47 +00:00
|
|
|
is
|
|
|
|
.BR PR_GET_THP_DISABLE
|
2014-04-14 10:07:33 +00:00
|
|
|
and
|
|
|
|
.IR arg2 ,
|
|
|
|
.IR arg3 ,
|
|
|
|
.IR arg4 ,
|
|
|
|
or
|
|
|
|
.IR arg5
|
|
|
|
is nonzero.
|
|
|
|
.TP
|
2015-12-04 08:41:17 +00:00
|
|
|
.B EINVAL
|
|
|
|
.I option
|
|
|
|
is
|
|
|
|
.B PR_CAP_AMBIENT
|
|
|
|
and an unused argument
|
|
|
|
.RI ( arg4 ,
|
|
|
|
.IR arg5 ,
|
2015-12-05 09:45:06 +00:00
|
|
|
or,
|
2015-12-04 08:41:17 +00:00
|
|
|
in the case of
|
|
|
|
.BR PR_CAP_AMBIENT_CLEAR_ALL ,
|
|
|
|
.IR arg3 )
|
|
|
|
is nonzero; or
|
|
|
|
.IR arg2
|
|
|
|
has an invalid value;
|
|
|
|
or
|
|
|
|
.IR arg2
|
|
|
|
is
|
|
|
|
.BR PR_CAP_AMBIENT_LOWER ,
|
|
|
|
.BR PR_CAP_AMBIENT_RAISE ,
|
|
|
|
or
|
|
|
|
.BR PR_CAP_AMBIENT_IS_SET
|
|
|
|
and
|
|
|
|
.IR arg3
|
|
|
|
does not specify a valid capability.
|
|
|
|
.TP
|
2019-09-27 11:28:50 +00:00
|
|
|
.B EINVAL
|
|
|
|
.I option
|
|
|
|
was
|
|
|
|
.BR PR_GET_SPECULATION_CTRL
|
|
|
|
or
|
|
|
|
.BR PR_SET_SPECULATION_CTRL
|
|
|
|
and unused arguments to
|
|
|
|
.BR prctl ()
|
|
|
|
are not 0.
|
2020-06-09 11:30:57 +00:00
|
|
|
.B EINVAL
|
|
|
|
.I option
|
|
|
|
is
|
|
|
|
.B PR_PAC_RESET_KEYS
|
|
|
|
and the arguments are invalid or unsupported.
|
|
|
|
See the description of
|
|
|
|
.B PR_PAC_RESET_KEYS
|
|
|
|
above for details.
|
2019-09-27 11:28:50 +00:00
|
|
|
.TP
|
2020-06-24 17:36:01 +00:00
|
|
|
.B EINVAL
|
|
|
|
.I option
|
|
|
|
is
|
|
|
|
.B PR_SVE_SET_VL
|
|
|
|
and the arguments are invalid or unsupported,
|
|
|
|
or SVE is not available on this platform.
|
|
|
|
See the description of
|
|
|
|
.B PR_SVE_SET_VL
|
|
|
|
above for details.
|
|
|
|
.TP
|
|
|
|
.B EINVAL
|
|
|
|
.I option
|
|
|
|
is
|
|
|
|
.B PR_SVE_GET_VL
|
|
|
|
and SVE is not available on this platform.
|
|
|
|
.TP
|
2020-06-24 17:36:02 +00:00
|
|
|
.B EINVAL
|
|
|
|
.I option
|
|
|
|
is
|
2021-02-07 23:47:57 +00:00
|
|
|
.B PR_SET_SYSCALL_USER_DISPATCH
|
|
|
|
and one of the following is true:
|
|
|
|
.RS
|
|
|
|
.IP * 3
|
|
|
|
.I arg2
|
|
|
|
is
|
|
|
|
.B PR_SYS_DISPATCH_OFF
|
|
|
|
and the remaining arguments are not 0;
|
|
|
|
.IP * 3
|
|
|
|
.I arg2
|
|
|
|
is
|
|
|
|
.B PR_SYS_DISPATCH_ON
|
|
|
|
and the memory range specified is outside the
|
|
|
|
address space of the process.
|
|
|
|
.IP * 3
|
|
|
|
.I arg2
|
|
|
|
is invalid.
|
|
|
|
.RE
|
|
|
|
.TP
|
|
|
|
.B EINVAL
|
|
|
|
.I option
|
|
|
|
is
|
2020-06-24 17:36:02 +00:00
|
|
|
.BR PR_SET_TAGGED_ADDR_CTRL
|
|
|
|
and the arguments are invalid or unsupported.
|
|
|
|
See the description of
|
|
|
|
.B PR_SET_TAGGED_ADDR_CTRL
|
|
|
|
above for details.
|
|
|
|
.TP
|
|
|
|
.B EINVAL
|
|
|
|
.I option
|
|
|
|
is
|
|
|
|
.BR PR_GET_TAGGED_ADDR_CTRL
|
|
|
|
and the arguments are invalid or unsupported.
|
|
|
|
See the description of
|
|
|
|
.B PR_GET_TAGGED_ADDR_CTRL
|
|
|
|
above for details.
|
|
|
|
.TP
|
2018-05-21 23:21:42 +00:00
|
|
|
.B ENODEV
|
|
|
|
.I option
|
|
|
|
was
|
|
|
|
.BR PR_SET_SPECULATION_CTRL
|
|
|
|
the kernel or CPU does not support the requested speculation misfeature.
|
|
|
|
.TP
|
2015-12-04 08:15:25 +00:00
|
|
|
.B ENXIO
|
|
|
|
.I option
|
|
|
|
was
|
|
|
|
.BR PR_MPX_ENABLE_MANAGEMENT
|
|
|
|
or
|
|
|
|
.BR PR_MPX_DISABLE_MANAGEMENT
|
|
|
|
and the kernel or the CPU does not support MPX management.
|
|
|
|
Check that the kernel and processor have MPX support.
|
|
|
|
.TP
|
2018-05-21 23:21:42 +00:00
|
|
|
.B ENXIO
|
|
|
|
.I option
|
|
|
|
was
|
|
|
|
.BR PR_SET_SPECULATION_CTRL
|
|
|
|
implies that the control of the selected speculation misfeature is not possible.
|
|
|
|
See
|
|
|
|
.BR PR_GET_SPECULATION_CTRL
|
|
|
|
for the bit fields to determine which option is available.
|
|
|
|
.TP
|
2016-11-20 00:55:11 +00:00
|
|
|
.B EOPNOTSUPP
|
|
|
|
.I option
|
|
|
|
is
|
|
|
|
.B PR_SET_FP_MODE
|
|
|
|
and
|
|
|
|
.I arg2
|
2016-11-20 10:39:25 +00:00
|
|
|
has an invalid or unsupported value.
|
2016-11-20 00:55:11 +00:00
|
|
|
.TP
|
2008-07-09 11:53:48 +00:00
|
|
|
.B EPERM
|
|
|
|
.I option
|
|
|
|
is
|
|
|
|
.BR PR_SET_SECUREBITS ,
|
|
|
|
and the caller does not have the
|
|
|
|
.B CAP_SETPCAP
|
|
|
|
capability,
|
|
|
|
or tried to unset a "locked" flag,
|
|
|
|
or tried to set a flag whose corresponding locked flag was set
|
|
|
|
(see
|
|
|
|
.BR capabilities (7)).
|
|
|
|
.TP
|
|
|
|
.B EPERM
|
|
|
|
.I option
|
|
|
|
is
|
2018-05-21 23:21:42 +00:00
|
|
|
.BR PR_SET_SPECULATION_CTRL
|
|
|
|
wherein the speculation was disabled with
|
|
|
|
.B PR_SPEC_FORCE_DISABLE
|
|
|
|
and caller tried to enable it again.
|
|
|
|
.TP
|
|
|
|
.B EPERM
|
|
|
|
.I option
|
|
|
|
is
|
2008-07-09 11:53:48 +00:00
|
|
|
.BR PR_SET_KEEPCAPS ,
|
2015-12-06 18:47:32 +00:00
|
|
|
and the caller's
|
2017-12-02 15:23:00 +00:00
|
|
|
.B SECBIT_KEEP_CAPS_LOCKED
|
2008-07-09 11:53:48 +00:00
|
|
|
flag is set
|
|
|
|
(see
|
|
|
|
.BR capabilities (7)).
|
|
|
|
.TP
|
|
|
|
.B EPERM
|
|
|
|
.I option
|
|
|
|
is
|
|
|
|
.BR PR_CAPBSET_DROP ,
|
|
|
|
and the caller does not have the
|
|
|
|
.B CAP_SETPCAP
|
|
|
|
capability.
|
2012-04-15 01:03:10 +00:00
|
|
|
.TP
|
|
|
|
.B EPERM
|
|
|
|
.I option
|
|
|
|
is
|
|
|
|
.BR PR_SET_MM ,
|
|
|
|
and the caller does not have the
|
|
|
|
.B CAP_SYS_RESOURCE
|
|
|
|
capability.
|
2015-12-04 08:41:17 +00:00
|
|
|
.TP
|
|
|
|
.B EPERM
|
|
|
|
.IR option
|
|
|
|
is
|
|
|
|
.BR PR_CAP_AMBIENT
|
|
|
|
and
|
|
|
|
.IR arg2
|
|
|
|
is
|
|
|
|
.BR PR_CAP_AMBIENT_RAISE ,
|
|
|
|
but either the capability specified in
|
|
|
|
.IR arg3
|
|
|
|
is not present in the process's permitted and inheritable capability sets,
|
|
|
|
or the
|
|
|
|
.B PR_CAP_AMBIENT_LOWER
|
|
|
|
securebit has been set.
|
2018-05-21 23:21:42 +00:00
|
|
|
.TP
|
|
|
|
.B ERANGE
|
|
|
|
.I option
|
|
|
|
was
|
|
|
|
.BR PR_SET_SPECULATION_CTRL
|
|
|
|
and
|
|
|
|
.IR arg3
|
2020-05-12 16:36:56 +00:00
|
|
|
is not
|
2018-05-28 10:49:23 +00:00
|
|
|
.BR PR_SPEC_ENABLE ,
|
|
|
|
.BR PR_SPEC_DISABLE ,
|
2020-05-12 16:36:56 +00:00
|
|
|
.BR PR_SPEC_FORCE_DISABLE ,
|
2018-05-21 23:21:42 +00:00
|
|
|
nor
|
2020-05-12 16:36:56 +00:00
|
|
|
.BR PR_SPEC_DISABLE_NOEXEC .
|
2007-05-18 16:06:42 +00:00
|
|
|
.SH VERSIONS
|
|
|
|
The
|
|
|
|
.BR prctl ()
|
|
|
|
system call was introduced in Linux 2.1.57.
|
|
|
|
.\" The library interface was added in glibc 2.0.6
|
getent.1, intro.1, time.1, _exit.2, _syscall.2, accept.2, access.2, acct.2, adjtimex.2, alarm.2, alloc_hugepages.2, arch_prctl.2, bdflush.2, bind.2, brk.2, cacheflush.2, capget.2, chdir.2, chmod.2, chown.2, chroot.2, clock_getres.2, clock_nanosleep.2, clone.2, close.2, connect.2, create_module.2, delete_module.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, eventfd.2, execve.2, exit_group.2, faccessat.2, fchmodat.2, fchownat.2, fcntl.2, flock.2, fork.2, fstatat.2, fsync.2, futex.2, futimesat.2, get_kernel_syms.2, get_robust_list.2, get_thread_area.2, getcpu.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getitimer.2, getpagesize.2, getpeername.2, getpid.2, getpriority.2, getresuid.2, getrlimit.2, getrusage.2, getsid.2, getsockname.2, getsockopt.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, getxattr.2, idle.2, init_module.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, intro.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl.2, ioctl_list.2, ioperm.2, iopl.2, ioprio_set.2, ipc.2, kcmp.2, kill.2, killpg.2, link.2, linkat.2, listen.2, listxattr.2, llseek.2, lookup_dcookie.2, lseek.2, madvise.2, migrate_pages.2, mincore.2, mkdir.2, mkdirat.2, mknod.2, mknodat.2, mlock.2, mmap.2, mmap2.2, modify_ldt.2, mount.2, move_pages.2, mprotect.2, mq_getsetattr.2, mremap.2, msgctl.2, msgget.2, msgop.2, msync.2, nanosleep.2, nfsservctl.2, nice.2, open.2, openat.2, outb.2, pause.2, pciconfig_read.2, perf_event_open.2, perfmonctl.2, personality.2, pipe.2, pivot_root.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, ptrace.2, query_module.2, quotactl.2, read.2, readahead.2, readdir.2, readlink.2, readlinkat.2, readv.2, reboot.2, recv.2, remap_file_pages.2, removexattr.2, rename.2, renameat.2, rmdir.2, rt_sigqueueinfo.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, select.2, semctl.2, semget.2, semop.2, send.2, sendfile.2, set_thread_area.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setpgid.2, setresuid.2, setreuid.2, setsid.2, setuid.2, setup.2, setxattr.2, shmctl.2, shmget.2, shmop.2, shutdown.2, sigaction.2, sigaltstack.2, signal.2, signalfd.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, socket.2, socketcall.2, socketpair.2, splice.2, stat.2, statfs.2, stime.2, swapon.2, symlink.2, symlinkat.2, sync.2, sync_file_range.2, sysctl.2, sysfs.2, sysinfo.2, syslog.2, tee.2, time.2, timerfd_create.2, times.2, tkill.2, truncate.2, umask.2, umount.2, uname.2, unimplemented.2, unlink.2, unlinkat.2, uselib.2, ustat.2, utime.2, utimensat.2, vfork.2, vhangup.2, vm86.2, vmsplice.2, wait.2, wait4.2, write.2, CPU_SET.3, INFINITY.3, MB_CUR_MAX.3, MB_LEN_MAX.3, __setfpucw.3, a64l.3, abort.3, abs.3, acos.3, acosh.3, addseverity.3, adjtime.3, aio_cancel.3, aio_error.3, aio_fsync.3, aio_read.3, aio_return.3, aio_suspend.3, aio_write.3, alloca.3, argz_add.3, asin.3, asinh.3, asprintf.3, assert.3, assert_perror.3, atan.3, atan2.3, atanh.3, atexit.3, atof.3, atoi.3, backtrace.3, basename.3, bcmp.3, bcopy.3, bindresvport.3, bsd_signal.3, bsearch.3, bstring.3, btowc.3, btree.3, byteorder.3, bzero.3, cabs.3, cacos.3, cacosh.3, canonicalize_file_name.3, carg.3, casin.3, casinh.3, catan.3, catanh.3, catgets.3, catopen.3, cbrt.3, ccos.3, ccosh.3, ceil.3, cerf.3, cexp.3, cexp2.3, cfree.3, cimag.3, clearenv.3, clock.3, clock_getcpuclockid.3, clog.3, clog10.3, clog2.3, closedir.3, cmsg.3, confstr.3, conj.3, copysign.3, cos.3, cosh.3, cpow.3, cproj.3, creal.3, crypt.3, csin.3, csinh.3, csqrt.3, ctan.3, ctanh.3, ctermid.3, ctime.3, daemon.3, dbopen.3, des_crypt.3, difftime.3, dirfd.3, div.3, dl_iterate_phdr.3, dlopen.3, dprintf.3, drand48.3, drand48_r.3, dysize.3, ecvt.3, ecvt_r.3, encrypt.3, end.3, endian.3, envz_add.3, erf.3, erfc.3, err.3, errno.3, error.3, ether_aton.3, euidaccess.3, exec.3, exit.3, exp.3, exp10.3, exp2.3, expm1.3, fabs.3, fclose.3, fcloseall.3, fdim.3, fenv.3, ferror.3, fexecve.3, fflush.3, ffs.3, fgetgrent.3, fgetpwent.3, fgetwc.3, fgetws.3, finite.3, flockfile.3, floor.3, fma.3, fmax.3, fmemopen.3, fmin.3, fmod.3, fmtmsg.3, fnmatch.3, fopen.3, fpathconf.3, fpclassify.3, fpurge.3, fputwc.3, fputws.3, fread.3, frexp.3, fseek.3, fseeko.3, ftime.3, ftok.3, fts.3, ftw.3, futimes.3, fwide.3, gamma.3, gcvt.3, getaddrinfo.3, getaddrinfo_a.3, getauxval.3, getcontext.3, getcwd.3, getdate.3, getdirentries.3, getdtablesize.3, getenv.3, getfsent.3, getgrent.3, getgrent_r.3, getgrnam.3, getgrouplist.3, gethostbyname.3, gethostid.3, getipnodebyname.3, getline.3, getloadavg.3, getlogin.3, getmntent.3, getnameinfo.3, getnetent.3, getnetent_r.3, getopt.3, getpass.3, getprotoent.3, getprotoent_r.3, getpt.3, getpw.3, getpwent.3, getpwent_r.3, getpwnam.3, getrpcent.3, getrpcent_r.3, getrpcport.3, gets.3, getservent.3, getservent_r.3, getspnam.3, getttyent.3, getumask.3, getusershell.3, getutent.3, getw.3, getwchar.3, glob.3, grantpt.3, gsignal.3, hash.3, hsearch.3, hypot.3, iconv.3, iconv_close.3, iconv_open.3, ilogb.3, index.3, inet.3, inet_ntop.3, inet_pton.3, infnan.3, initgroups.3, insque.3, intro.3, isalpha.3, isatty.3, isgreater.3, iswalnum.3, iswalpha.3, iswblank.3, iswcntrl.3, iswctype.3, iswdigit.3, iswgraph.3, iswlower.3, iswprint.3, iswpunct.3, iswspace.3, iswupper.3, iswxdigit.3, j0.3, key_setsecret.3, ldexp.3, lgamma.3, lio_listio.3, localeconv.3, lockf.3, log.3, log10.3, log1p.3, log2.3, logb.3, login.3, longjmp.3, lrint.3, lround.3, lsearch.3, lseek64.3, makecontext.3, makedev.3, malloc.3, malloc_hook.3, mblen.3, mbrlen.3, mbrtowc.3, mbsinit.3, mbsnrtowcs.3, mbsrtowcs.3, mbstowcs.3, mbtowc.3, memccpy.3, memchr.3, memcmp.3, memcpy.3, memfrob.3, memmem.3, memmove.3, mempcpy.3, memset.3, mkdtemp.3, mkfifo.3, mkfifoat.3, mkstemp.3, mktemp.3, modf.3, mpool.3, mq_close.3, mq_getattr.3, mq_notify.3, mq_open.3, mq_receive.3, mq_send.3, mq_unlink.3, mtrace.3, nan.3, netlink.3, nextafter.3, nl_langinfo.3, offsetof.3, on_exit.3, opendir.3, openpty.3, perror.3, popen.3, posix_fallocate.3, posix_memalign.3, posix_openpt.3, pow.3, pow10.3, printf.3, profil.3, program_invocation_name.3, psignal.3, pthread_kill_other_threads_np.3, ptsname.3, putenv.3, putgrent.3, putpwent.3, puts.3, putwchar.3, qecvt.3, qsort.3, queue.3, raise.3, rand.3, random.3, random_r.3, rcmd.3, re_comp.3, readdir.3, realpath.3, recno.3, regex.3, remainder.3, remove.3, remquo.3, resolver.3, rewinddir.3, rexec.3, rint.3, round.3, rpc.3, rpmatch.3, rtime.3, rtnetlink.3, scalb.3, scalbln.3, scandir.3, scandirat.3, scanf.3, seekdir.3, sem_close.3, sem_destroy.3, sem_getvalue.3, sem_init.3, sem_open.3, sem_post.3, sem_unlink.3, sem_wait.3, setaliasent.3, setbuf.3, setenv.3, setjmp.3, setlocale.3, setlogmask.3, setnetgrent.3, shm_open.3, siginterrupt.3, signbit.3, significand.3, sigpause.3, sigqueue.3, sigset.3, sigsetops.3, sigvec.3, sin.3, sincos.3, sinh.3, sleep.3, sockatmark.3, sqrt.3, statvfs.3, stdarg.3, stdin.3, stdio.3, stdio_ext.3, stpcpy.3, stpncpy.3, strcasecmp.3, strcat.3, strchr.3, strcmp.3, strcoll.3, strcpy.3, strdup.3, strerror.3, strfmon.3, strfry.3, strftime.3, string.3, strlen.3, strnlen.3, strpbrk.3, strptime.3, strsep.3, strsignal.3, strspn.3, strstr.3, strtod.3, strtoimax.3, strtok.3, strtol.3, strtoul.3, strverscmp.3, strxfrm.3, swab.3, sysconf.3, syslog.3, system.3, sysv_signal.3, tan.3, tanh.3, tcgetpgrp.3, tcgetsid.3, telldir.3, tempnam.3, termios.3, tgamma.3, timegm.3, timeradd.3, tmpfile.3, tmpnam.3, toascii.3, toupper.3, towctrans.3, towlower.3, towupper.3, trunc.3, tsearch.3, ttyname.3, ttyslot.3, tzset.3, ualarm.3, ulimit.3, ungetwc.3, unlocked_stdio.3, unlockpt.3, updwtmp.3, usleep.3, wcpcpy.3, wcpncpy.3, wcrtomb.3, wcscasecmp.3, wcscat.3, wcschr.3, wcscmp.3, wcscpy.3, wcscspn.3, wcsdup.3, wcslen.3, wcsncasecmp.3, wcsncat.3, wcsncmp.3, wcsncpy.3, wcsnlen.3, wcsnrtombs.3, wcspbrk.3, wcsrchr.3, wcsrtombs.3, wcsspn.3, wcsstr.3, wcstoimax.3, wcstok.3, wcstombs.3, wcswidth.3, wctob.3, wctomb.3, wctrans.3, wctype.3, wcwidth.3, wmemchr.3, wmemcmp.3, wmemcpy.3, wmemmove.3, wmemset.3, wordexp.3, wprintf.3, xcrypt.3, xdr.3, y0.3, cciss.4, console.4, console_codes.4, console_ioctl.4, dsp56k.4, fd.4, full.4, hd.4, hpsa.4, initrd.4, intro.4, lp.4, mem.4, mouse.4, null.4, pts.4, ram.4, random.4, rtc.4, sk98lin.4, st.4, tty.4, ttyS.4, tty_ioctl.4, vcs.4, wavelan.4, acct.5, charmap.5, dir_colors.5, filesystems.5, ftpusers.5, group.5, host.conf.5, hosts.5, hosts.equiv.5, intro.5, issue.5, locale.5, motd.5, networks.5, nologin.5, nscd.conf.5, passwd.5, proc.5, protocols.5, resolv.conf.5, rpc.5, securetty.5, services.5, shells.5, termcap.5, ttytype.5, utmp.5, armscii-8.7, arp.7, ascii.7, bootparam.7, capabilities.7, charsets.7, complex.7, cp1251.7, credentials.7, ddp.7, environ.7, epoll.7, fifo.7, futex.7, glob.7, hier.7, icmp.7, inotify.7, intro.7, ip.7, ipv6.7, iso_8859-1.7, iso_8859-10.7, iso_8859-11.7, iso_8859-13.7, iso_8859-14.7, iso_8859-15.7, iso_8859-16.7, iso_8859-2.7, iso_8859-3.7, iso_8859-4.7, iso_8859-5.7, iso_8859-6.7, iso_8859-7.7, iso_8859-8.7, iso_8859-9.7, koi8-r.7, koi8-u.7, locale.7, mailaddr.7, man.7, mq_overview.7, netdevice.7, netlink.7, numa.7, packet.7, path_resolution.7, pipe.7, posixoptions.7, pthreads.7, pty.7, raw.7, regex.7, rtld-audit.7, rtnetlink.7, sem_overview.7, shm_overview.7, sigevent.7, signal.7, socket.7, standards.7, suffixes.7, svipc.7, tcp.7, termio.7, time.7, udp.7, udplite.7, unicode.7, unix.7, uri.7, utf-8.7, x25.7, nscd.8, sync.8, tzselect.8, zdump.8, zic.8: Global fix: remove unneeded double quotes in .SH headings
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2013-02-24 18:01:36 +00:00
|
|
|
.SH CONFORMING TO
|
2007-12-25 21:28:09 +00:00
|
|
|
This call is Linux-specific.
|
2007-04-12 22:42:49 +00:00
|
|
|
IRIX has a
|
2005-10-20 15:11:10 +00:00
|
|
|
.BR prctl ()
|
|
|
|
system call (also introduced in Linux 2.1.44
|
2004-11-03 13:51:07 +00:00
|
|
|
as irix_prctl on the MIPS architecture),
|
|
|
|
with prototype
|
fcntl.2, ioctl_tty.2, kcmp.2, prctl.2, semop.2, swapon.2, atof.3, atoi.3, bsearch.3, cfree.3, ctime.3, drand48.3, errno.3: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-17 11:41:27 +00:00
|
|
|
.PP
|
|
|
|
.in +4n
|
|
|
|
.EX
|
2004-11-03 13:51:07 +00:00
|
|
|
.BI "ptrdiff_t prctl(int " option ", int " arg2 ", int " arg3 );
|
fcntl.2, ioctl_tty.2, kcmp.2, prctl.2, semop.2, swapon.2, atof.3, atoi.3, bsearch.3, cfree.3, ctime.3, drand48.3, errno.3: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2017-08-17 11:41:27 +00:00
|
|
|
.EE
|
|
|
|
.in
|
|
|
|
.PP
|
2004-11-03 13:51:07 +00:00
|
|
|
and options to get the maximum number of processes per user,
|
|
|
|
get the maximum number of processors the calling process can use,
|
|
|
|
find out whether a specified process is currently blocked,
|
2012-05-06 19:56:33 +00:00
|
|
|
get or set the maximum stack size, and so on.
|
getent.1, intro.1, time.1, _exit.2, _syscall.2, accept.2, access.2, acct.2, adjtimex.2, alarm.2, alloc_hugepages.2, arch_prctl.2, bdflush.2, bind.2, brk.2, cacheflush.2, capget.2, chdir.2, chmod.2, chown.2, chroot.2, clock_getres.2, clock_nanosleep.2, clone.2, close.2, connect.2, create_module.2, delete_module.2, dup.2, epoll_create.2, epoll_ctl.2, epoll_wait.2, eventfd.2, execve.2, exit_group.2, faccessat.2, fchmodat.2, fchownat.2, fcntl.2, flock.2, fork.2, fstatat.2, fsync.2, futex.2, futimesat.2, get_kernel_syms.2, get_robust_list.2, get_thread_area.2, getcpu.2, getdents.2, getdomainname.2, getgid.2, getgroups.2, gethostname.2, getitimer.2, getpagesize.2, getpeername.2, getpid.2, getpriority.2, getresuid.2, getrlimit.2, getrusage.2, getsid.2, getsockname.2, getsockopt.2, gettid.2, gettimeofday.2, getuid.2, getunwind.2, getxattr.2, idle.2, init_module.2, inotify_add_watch.2, inotify_init.2, inotify_rm_watch.2, intro.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl.2, ioctl_list.2, ioperm.2, iopl.2, ioprio_set.2, ipc.2, kcmp.2, kill.2, killpg.2, link.2, linkat.2, listen.2, listxattr.2, llseek.2, lookup_dcookie.2, lseek.2, madvise.2, migrate_pages.2, mincore.2, mkdir.2, mkdirat.2, mknod.2, mknodat.2, mlock.2, mmap.2, mmap2.2, modify_ldt.2, mount.2, move_pages.2, mprotect.2, mq_getsetattr.2, mremap.2, msgctl.2, msgget.2, msgop.2, msync.2, nanosleep.2, nfsservctl.2, nice.2, open.2, openat.2, outb.2, pause.2, pciconfig_read.2, perf_event_open.2, perfmonctl.2, personality.2, pipe.2, pivot_root.2, poll.2, posix_fadvise.2, prctl.2, pread.2, process_vm_readv.2, ptrace.2, query_module.2, quotactl.2, read.2, readahead.2, readdir.2, readlink.2, readlinkat.2, readv.2, reboot.2, recv.2, remap_file_pages.2, removexattr.2, rename.2, renameat.2, rmdir.2, rt_sigqueueinfo.2, sched_get_priority_max.2, sched_rr_get_interval.2, sched_setaffinity.2, sched_setparam.2, sched_setscheduler.2, sched_yield.2, select.2, semctl.2, semget.2, semop.2, send.2, sendfile.2, set_thread_area.2, set_tid_address.2, seteuid.2, setfsgid.2, setfsuid.2, setgid.2, setpgid.2, setresuid.2, setreuid.2, setsid.2, setuid.2, setup.2, setxattr.2, shmctl.2, shmget.2, shmop.2, shutdown.2, sigaction.2, sigaltstack.2, signal.2, signalfd.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, socket.2, socketcall.2, socketpair.2, splice.2, stat.2, statfs.2, stime.2, swapon.2, symlink.2, symlinkat.2, sync.2, sync_file_range.2, sysctl.2, sysfs.2, sysinfo.2, syslog.2, tee.2, time.2, timerfd_create.2, times.2, tkill.2, truncate.2, umask.2, umount.2, uname.2, unimplemented.2, unlink.2, unlinkat.2, uselib.2, ustat.2, utime.2, utimensat.2, vfork.2, vhangup.2, vm86.2, vmsplice.2, wait.2, wait4.2, write.2, CPU_SET.3, INFINITY.3, MB_CUR_MAX.3, MB_LEN_MAX.3, __setfpucw.3, a64l.3, abort.3, abs.3, acos.3, acosh.3, addseverity.3, adjtime.3, aio_cancel.3, aio_error.3, aio_fsync.3, aio_read.3, aio_return.3, aio_suspend.3, aio_write.3, alloca.3, argz_add.3, asin.3, asinh.3, asprintf.3, assert.3, assert_perror.3, atan.3, atan2.3, atanh.3, atexit.3, atof.3, atoi.3, backtrace.3, basename.3, bcmp.3, bcopy.3, bindresvport.3, bsd_signal.3, bsearch.3, bstring.3, btowc.3, btree.3, byteorder.3, bzero.3, cabs.3, cacos.3, cacosh.3, canonicalize_file_name.3, carg.3, casin.3, casinh.3, catan.3, catanh.3, catgets.3, catopen.3, cbrt.3, ccos.3, ccosh.3, ceil.3, cerf.3, cexp.3, cexp2.3, cfree.3, cimag.3, clearenv.3, clock.3, clock_getcpuclockid.3, clog.3, clog10.3, clog2.3, closedir.3, cmsg.3, confstr.3, conj.3, copysign.3, cos.3, cosh.3, cpow.3, cproj.3, creal.3, crypt.3, csin.3, csinh.3, csqrt.3, ctan.3, ctanh.3, ctermid.3, ctime.3, daemon.3, dbopen.3, des_crypt.3, difftime.3, dirfd.3, div.3, dl_iterate_phdr.3, dlopen.3, dprintf.3, drand48.3, drand48_r.3, dysize.3, ecvt.3, ecvt_r.3, encrypt.3, end.3, endian.3, envz_add.3, erf.3, erfc.3, err.3, errno.3, error.3, ether_aton.3, euidaccess.3, exec.3, exit.3, exp.3, exp10.3, exp2.3, expm1.3, fabs.3, fclose.3, fcloseall.3, fdim.3, fenv.3, ferror.3, fexecve.3, fflush.3, ffs.3, fgetgrent.3, fgetpwent.3, fgetwc.3, fgetws.3, finite.3, flockfile.3, floor.3, fma.3, fmax.3, fmemopen.3, fmin.3, fmod.3, fmtmsg.3, fnmatch.3, fopen.3, fpathconf.3, fpclassify.3, fpurge.3, fputwc.3, fputws.3, fread.3, frexp.3, fseek.3, fseeko.3, ftime.3, ftok.3, fts.3, ftw.3, futimes.3, fwide.3, gamma.3, gcvt.3, getaddrinfo.3, getaddrinfo_a.3, getauxval.3, getcontext.3, getcwd.3, getdate.3, getdirentries.3, getdtablesize.3, getenv.3, getfsent.3, getgrent.3, getgrent_r.3, getgrnam.3, getgrouplist.3, gethostbyname.3, gethostid.3, getipnodebyname.3, getline.3, getloadavg.3, getlogin.3, getmntent.3, getnameinfo.3, getnetent.3, getnetent_r.3, getopt.3, getpass.3, getprotoent.3, getprotoent_r.3, getpt.3, getpw.3, getpwent.3, getpwent_r.3, getpwnam.3, getrpcent.3, getrpcent_r.3, getrpcport.3, gets.3, getservent.3, getservent_r.3, getspnam.3, getttyent.3, getumask.3, getusershell.3, getutent.3, getw.3, getwchar.3, glob.3, grantpt.3, gsignal.3, hash.3, hsearch.3, hypot.3, iconv.3, iconv_close.3, iconv_open.3, ilogb.3, index.3, inet.3, inet_ntop.3, inet_pton.3, infnan.3, initgroups.3, insque.3, intro.3, isalpha.3, isatty.3, isgreater.3, iswalnum.3, iswalpha.3, iswblank.3, iswcntrl.3, iswctype.3, iswdigit.3, iswgraph.3, iswlower.3, iswprint.3, iswpunct.3, iswspace.3, iswupper.3, iswxdigit.3, j0.3, key_setsecret.3, ldexp.3, lgamma.3, lio_listio.3, localeconv.3, lockf.3, log.3, log10.3, log1p.3, log2.3, logb.3, login.3, longjmp.3, lrint.3, lround.3, lsearch.3, lseek64.3, makecontext.3, makedev.3, malloc.3, malloc_hook.3, mblen.3, mbrlen.3, mbrtowc.3, mbsinit.3, mbsnrtowcs.3, mbsrtowcs.3, mbstowcs.3, mbtowc.3, memccpy.3, memchr.3, memcmp.3, memcpy.3, memfrob.3, memmem.3, memmove.3, mempcpy.3, memset.3, mkdtemp.3, mkfifo.3, mkfifoat.3, mkstemp.3, mktemp.3, modf.3, mpool.3, mq_close.3, mq_getattr.3, mq_notify.3, mq_open.3, mq_receive.3, mq_send.3, mq_unlink.3, mtrace.3, nan.3, netlink.3, nextafter.3, nl_langinfo.3, offsetof.3, on_exit.3, opendir.3, openpty.3, perror.3, popen.3, posix_fallocate.3, posix_memalign.3, posix_openpt.3, pow.3, pow10.3, printf.3, profil.3, program_invocation_name.3, psignal.3, pthread_kill_other_threads_np.3, ptsname.3, putenv.3, putgrent.3, putpwent.3, puts.3, putwchar.3, qecvt.3, qsort.3, queue.3, raise.3, rand.3, random.3, random_r.3, rcmd.3, re_comp.3, readdir.3, realpath.3, recno.3, regex.3, remainder.3, remove.3, remquo.3, resolver.3, rewinddir.3, rexec.3, rint.3, round.3, rpc.3, rpmatch.3, rtime.3, rtnetlink.3, scalb.3, scalbln.3, scandir.3, scandirat.3, scanf.3, seekdir.3, sem_close.3, sem_destroy.3, sem_getvalue.3, sem_init.3, sem_open.3, sem_post.3, sem_unlink.3, sem_wait.3, setaliasent.3, setbuf.3, setenv.3, setjmp.3, setlocale.3, setlogmask.3, setnetgrent.3, shm_open.3, siginterrupt.3, signbit.3, significand.3, sigpause.3, sigqueue.3, sigset.3, sigsetops.3, sigvec.3, sin.3, sincos.3, sinh.3, sleep.3, sockatmark.3, sqrt.3, statvfs.3, stdarg.3, stdin.3, stdio.3, stdio_ext.3, stpcpy.3, stpncpy.3, strcasecmp.3, strcat.3, strchr.3, strcmp.3, strcoll.3, strcpy.3, strdup.3, strerror.3, strfmon.3, strfry.3, strftime.3, string.3, strlen.3, strnlen.3, strpbrk.3, strptime.3, strsep.3, strsignal.3, strspn.3, strstr.3, strtod.3, strtoimax.3, strtok.3, strtol.3, strtoul.3, strverscmp.3, strxfrm.3, swab.3, sysconf.3, syslog.3, system.3, sysv_signal.3, tan.3, tanh.3, tcgetpgrp.3, tcgetsid.3, telldir.3, tempnam.3, termios.3, tgamma.3, timegm.3, timeradd.3, tmpfile.3, tmpnam.3, toascii.3, toupper.3, towctrans.3, towlower.3, towupper.3, trunc.3, tsearch.3, ttyname.3, ttyslot.3, tzset.3, ualarm.3, ulimit.3, ungetwc.3, unlocked_stdio.3, unlockpt.3, updwtmp.3, usleep.3, wcpcpy.3, wcpncpy.3, wcrtomb.3, wcscasecmp.3, wcscat.3, wcschr.3, wcscmp.3, wcscpy.3, wcscspn.3, wcsdup.3, wcslen.3, wcsncasecmp.3, wcsncat.3, wcsncmp.3, wcsncpy.3, wcsnlen.3, wcsnrtombs.3, wcspbrk.3, wcsrchr.3, wcsrtombs.3, wcsspn.3, wcsstr.3, wcstoimax.3, wcstok.3, wcstombs.3, wcswidth.3, wctob.3, wctomb.3, wctrans.3, wctype.3, wcwidth.3, wmemchr.3, wmemcmp.3, wmemcpy.3, wmemmove.3, wmemset.3, wordexp.3, wprintf.3, xcrypt.3, xdr.3, y0.3, cciss.4, console.4, console_codes.4, console_ioctl.4, dsp56k.4, fd.4, full.4, hd.4, hpsa.4, initrd.4, intro.4, lp.4, mem.4, mouse.4, null.4, pts.4, ram.4, random.4, rtc.4, sk98lin.4, st.4, tty.4, ttyS.4, tty_ioctl.4, vcs.4, wavelan.4, acct.5, charmap.5, dir_colors.5, filesystems.5, ftpusers.5, group.5, host.conf.5, hosts.5, hosts.equiv.5, intro.5, issue.5, locale.5, motd.5, networks.5, nologin.5, nscd.conf.5, passwd.5, proc.5, protocols.5, resolv.conf.5, rpc.5, securetty.5, services.5, shells.5, termcap.5, ttytype.5, utmp.5, armscii-8.7, arp.7, ascii.7, bootparam.7, capabilities.7, charsets.7, complex.7, cp1251.7, credentials.7, ddp.7, environ.7, epoll.7, fifo.7, futex.7, glob.7, hier.7, icmp.7, inotify.7, intro.7, ip.7, ipv6.7, iso_8859-1.7, iso_8859-10.7, iso_8859-11.7, iso_8859-13.7, iso_8859-14.7, iso_8859-15.7, iso_8859-16.7, iso_8859-2.7, iso_8859-3.7, iso_8859-4.7, iso_8859-5.7, iso_8859-6.7, iso_8859-7.7, iso_8859-8.7, iso_8859-9.7, koi8-r.7, koi8-u.7, locale.7, mailaddr.7, man.7, mq_overview.7, netdevice.7, netlink.7, numa.7, packet.7, path_resolution.7, pipe.7, posixoptions.7, pthreads.7, pty.7, raw.7, regex.7, rtld-audit.7, rtnetlink.7, sem_overview.7, shm_overview.7, sigevent.7, signal.7, socket.7, standards.7, suffixes.7, svipc.7, tcp.7, termio.7, time.7, udp.7, udplite.7, unicode.7, unix.7, uri.7, utf-8.7, x25.7, nscd.8, sync.8, tzselect.8, zdump.8, zic.8: Global fix: remove unneeded double quotes in .SH headings
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2013-02-24 18:01:36 +00:00
|
|
|
.SH SEE ALSO
|
2006-08-03 03:02:31 +00:00
|
|
|
.BR signal (2),
|
2006-03-31 07:10:17 +00:00
|
|
|
.BR core (5)
|