1 .\" Copyright (C) 1998 Andries Brouwer (aeb@cwi.nl)
2 .\" and Copyright (C) 2002, 2006, 2008, 2012, 2013 Michael Kerrisk <mtk.manpages@gmail.com>
3 .\" and Copyright Guillem Jover <guillem@hadrons.org>
4 .\" and Copyright (C) 2014 Dave Hansen / Intel
6 .\" %%%LICENSE_START(VERBATIM)
7 .\" Permission is granted to make and distribute verbatim copies of this
8 .\" manual provided the copyright notice and this permission notice are
9 .\" preserved on all copies.
11 .\" Permission is granted to copy and distribute modified versions of this
12 .\" manual under the conditions for verbatim copying, provided that the
13 .\" entire resulting derived work is distributed under the terms of a
14 .\" permission notice identical to this one.
16 .\" Since the Linux kernel and libraries are constantly changing, this
17 .\" manual page may be incorrect or out-of-date. The author(s) assume no
18 .\" responsibility for errors or omissions, or for damages resulting from
19 .\" the use of the information contained herein. The author(s) may not
20 .\" have taken the same level of care in the production of this manual,
21 .\" which is licensed free of charge, as they might when working
24 .\" Formatted or processed versions of this manual, if unaccompanied by
25 .\" the source, must acknowledge the copyright and authors of this work.
28 .\" Modified Thu Nov 11 04:19:42 MET 1999, aeb: added PR_GET_PDEATHSIG
29 .\" Modified 27 Jun 02, Michael Kerrisk
30 .\" Added PR_SET_DUMPABLE, PR_GET_DUMPABLE,
31 .\" PR_SET_KEEPCAPS, PR_GET_KEEPCAPS
32 .\" Modified 2006-08-30 Guillem Jover <guillem@hadrons.org>
33 .\" Updated Linux versions where the options where introduced.
34 .\" Added PR_SET_TIMING, PR_GET_TIMING, PR_SET_NAME, PR_GET_NAME,
35 .\" PR_SET_UNALIGN, PR_GET_UNALIGN, PR_SET_FPEMU, PR_GET_FPEMU,
36 .\" PR_SET_FPEXC, PR_GET_FPEXC
37 .\" 2008-04-29 Serge Hallyn, Document PR_CAPBSET_READ and PR_CAPBSET_DROP
38 .\" 2008-06-13 Erik Bosman, <ejbosman@cs.vu.nl>
39 .\" Document PR_GET_TSC and PR_SET_TSC.
40 .\" 2008-06-15 mtk, Document PR_SET_SECCOMP, PR_GET_SECCOMP
41 .\" 2009-10-03 Andi Kleen, document PR_MCE_KILL
42 .\" 2012-04 Cyrill Gorcunov, Document PR_SET_MM
43 .\" 2012-04-25 Michael Kerrisk, Document PR_TASK_PERF_EVENTS_DISABLE and
44 .\" PR_TASK_PERF_EVENTS_ENABLE
45 .\" 2012-09-20 Kees Cook, update PR_SET_SECCOMP for mode 2
46 .\" 2012-09-20 Kees Cook, document PR_SET_NO_NEW_PRIVS, PR_GET_NO_NEW_PRIVS
47 .\" 2012-10-25 Michael Kerrisk, Document PR_SET_TIMERSLACK and
49 .\" 2013-01-10 Kees Cook, document PR_SET_PTRACER
50 .\" 2012-02-04 Michael Kerrisk, document PR_{SET,GET}_CHILD_SUBREAPER
51 .\" 2014-11-10 Dave Hansen, document PR_MPX_{EN,DIS}ABLE_MANAGEMENT
54 .TH PRCTL 2 2020-04-11 "Linux" "Linux Programmer's Manual"
56 prctl \- operations on a process or thread
59 .B #include <sys/prctl.h>
61 .BI "int prctl(int " option ", unsigned long " arg2 ", unsigned long " arg3 ,
62 .BI " unsigned long " arg4 ", unsigned long " arg5 );
66 manipulates various aspects of the behavior
67 of the calling thread or process.
69 Note that careless use of
71 can confuse the user-space run-time environment,
72 so these operations should be used with care (if at all).
75 is called with a first argument describing what to do
76 (with values defined in \fI<linux/prctl.h>\fP), and further
77 arguments with a significance depending on the first one.
78 The first argument can be:
80 .\" prctl PR_CAP_AMBIENT
82 .BR PR_CAP_AMBIENT " (since Linux 4.3)"
83 .\" commit 58319057b7847667f0c9585b9de0e8932b0fdb08
84 Reads or changes the ambient capability set of the calling thread,
85 according to the value of
87 which must be one of the following:
91 .B PR_CAP_AMBIENT_RAISE
92 The capability specified in
94 is added to the ambient set.
95 The specified capability must already be present in
96 both the permitted and the inheritable sets of the process.
97 This operation is not permitted if the
98 .B SECBIT_NO_CAP_AMBIENT_RAISE
101 .B PR_CAP_AMBIENT_LOWER
102 The capability specified in
104 is removed from the ambient set.
106 .B PR_CAP_AMBIENT_IS_SET
109 call returns 1 if the capability in
111 is in the ambient set and 0 if it is not.
113 .BR PR_CAP_AMBIENT_CLEAR_ALL
114 All capabilities will be removed from the ambient set.
115 This operation requires setting
120 In all of the above operations,
124 must be specified as 0.
126 Higher-level interfaces layered on top of the above operations are
129 library in the form of
130 .BR cap_get_ambient (3),
131 .BR cap_set_ambient (3),
133 .BR cap_reset_ambient (3).
134 .\" prctl PR_CAPBSET_READ
136 .BR PR_CAPBSET_READ " (since Linux 2.6.25)"
137 Return (as the function result) 1 if the capability specified in
139 is in the calling thread's capability bounding set,
141 (The capability constants are defined in
142 .IR <linux/capability.h> .)
143 The capability bounding set dictates
144 whether the process can receive the capability through a
145 file's permitted capability set on a subsequent call to
148 If the capability specified in
150 is not valid, then the call fails with the error
153 A higher-level interface layered on top of this operation is provided in the
155 library in the form of
156 .BR cap_get_bound (3).
157 .\" prctl PR_CAPBSET_DROP
159 .BR PR_CAPBSET_DROP " (since Linux 2.6.25)"
160 If the calling thread has the
162 capability within its user namespace, then drop the capability specified by
164 from the calling thread's capability bounding set.
165 Any children of the calling thread will inherit the newly
166 reduced bounding set.
168 The call fails with the error:
170 if the calling thread does not have the
175 does not represent a valid capability; or
177 if file capabilities are not enabled in the kernel,
178 in which case bounding sets are not supported.
180 A higher-level interface layered on top of this operation is provided in the
182 library in the form of
183 .BR cap_drop_bound (3).
184 .\" prctl PR_SET_CHILD_SUBREAPER
186 .BR PR_SET_CHILD_SUBREAPER " (since Linux 3.4)"
187 .\" commit ebec18a6d3aa1e7d84aab16225e87fd25170ec2b
191 set the "child subreaper" attribute of the calling process;
194 is zero, unset the attribute.
196 A subreaper fulfills the role of
198 for its descendant processes.
199 When a process becomes orphaned
200 (i.e., its immediate parent terminates),
201 then that process will be reparented to
202 the nearest still living ancestor subreaper.
203 Subsequently, calls to
205 in the orphaned process will now return the PID of the subreaper process,
206 and when the orphan terminates, it is the subreaper process that
209 signal and will be able to
211 on the process to discover its termination status.
213 The setting of the "child subreaper" attribute
214 is not inherited by children created by
218 The setting is preserved across
221 Establishing a subreaper process is useful in session management frameworks
222 where a hierarchical group of processes is managed by a subreaper process
223 that needs to be informed when one of the processes\(emfor example,
224 a double-forked daemon\(emterminates
225 (perhaps so that it can restart that process).
230 employ a subreaper process for similar reasons.
231 .\" prctl PR_GET_CHILD_SUBREAPER
233 .BR PR_GET_CHILD_SUBREAPER " (since Linux 3.4)"
234 Return the "child subreaper" setting of the caller,
235 in the location pointed to by
236 .IR "(int\ *) arg2" .
237 .\" prctl PR_SET_DUMPABLE
239 .BR PR_SET_DUMPABLE " (since Linux 2.3.20)"
240 Set the state of the "dumpable" attribute,
241 which determines whether core dumps are produced for the calling process
242 upon delivery of a signal whose default behavior is to produce a core dump.
244 In kernels up to and including 2.6.12,
247 .RB ( SUID_DUMP_DISABLE ,
248 process is not dumpable) or 1
249 .RB ( SUID_DUMP_USER ,
250 process is dumpable).
251 Between kernels 2.6.13 and 2.6.17,
252 .\" commit abf75a5033d4da7b8a7e92321d74021d1fcfb502
253 the value 2 was also permitted,
254 which caused any binary which normally would not be dumped
255 to be dumped readable by root only;
256 for security reasons, this feature has been removed.
257 .\" See http://marc.theaimsgroup.com/?l=linux-kernel&m=115270289030630&w=2
258 .\" Subject: Fix prctl privilege escalation (CVE-2006-2451)
259 .\" From: Marcel Holtmann <marcel () holtmann ! org>
260 .\" Date: 2006-07-12 11:12:00
261 (See also the description of
262 .I /proc/sys/fs/\:suid_dumpable
266 Normally, the "dumpable" attribute is set to 1.
267 However, it is reset to the current value contained in the file
268 .IR /proc/sys/fs/\:suid_dumpable
269 (which by default has the value 0),
270 in the following circumstances:
271 .\" See kernel/cred.c::commit_creds() (Linux 3.18 sources)
274 The process's effective user or group ID is changed.
276 The process's filesystem user or group ID is changed (see
277 .BR credentials (7)).
281 a set-user-ID or set-group-ID program, resulting in a change
282 of either the effective user ID or the effective group ID.
286 a program that has file capabilities (see
287 .BR capabilities (7)),
288 .\" See kernel/cred.c::commit_creds()
289 but only if the permitted capabilities
290 gained exceed those already permitted for the process.
291 .\" Also certain namespace operations;
294 Processes that are not dumpable can not be attached via
301 If a process is not dumpable,
302 the ownership of files in the process's
304 directory is affected as described in
306 .\" prctl PR_GET_DUMPABLE
308 .BR PR_GET_DUMPABLE " (since Linux 2.3.20)"
309 Return (as the function result) the current state of the calling
310 process's dumpable attribute.
311 .\" Since Linux 2.6.13, the dumpable flag can have the value 2,
312 .\" but in 2.6.13 PR_GET_DUMPABLE simply returns 1 if the dumpable
313 .\" flags has a nonzero value. This was fixed in 2.6.14.
314 .\" prctl PR_SET_ENDIAN
316 .BR PR_SET_ENDIAN " (since Linux 2.6.18, PowerPC only)"
317 Set the endian-ness of the calling process to the value given
318 in \fIarg2\fP, which should be one of the following:
319 .\" Respectively 0, 1, 2
321 .BR PR_ENDIAN_LITTLE ,
323 .B PR_ENDIAN_PPC_LITTLE
324 (PowerPC pseudo little endian).
325 .\" prctl PR_GET_ENDIAN
327 .BR PR_GET_ENDIAN " (since Linux 2.6.18, PowerPC only)"
328 Return the endian-ness of the calling process,
329 in the location pointed to by
330 .IR "(int\ *) arg2" .
331 .\" prctl PR_SET_FP_MODE
333 .BR PR_SET_FP_MODE " (since Linux 4.0, only on MIPS)"
334 .\" commit 9791554b45a2acc28247f66a5fd5bbc212a6b8c8
335 On the MIPS architecture,
336 user-space code can be built using an ABI which permits linking
337 with code that has more restrictive floating-point (FP) requirements.
338 For example, user-space code may be built to target the O32 FPXX ABI
339 and linked with code built for either one of the more restrictive
341 When more restrictive code is linked in,
342 the overall requirement for the process is to use the more
343 restrictive floating-point mode.
345 Because the kernel has no means of knowing in advance
346 which mode the process should be executed in,
347 and because these restrictions can
348 change over the lifetime of the process, the
350 operation is provided to allow control of the floating-point mode
353 .\" https://dmz-portal.mips.com/wiki/MIPS_O32_ABI_-_FR0_and_FR1_Interlinking
355 .I (unsigned int) arg2
356 argument is a bit mask describing the floating-point mode used:
364 mode), the 32 floating-point registers are 32 bits wide,
365 and 64-bit registers are represented as a pair of registers
366 (even- and odd- numbered,
367 with the even-numbered register containing the lower 32 bits,
368 and the odd-numbered register containing the higher 32 bits).
372 (on supported hardware),
373 the 32 floating-point registers are 64 bits wide (so called
376 Note that modern MIPS implementations (MIPS R6 and newer) support
381 Applications that use the O32 FP32 ABI can operate only when this bit is
384 or they can be used with FRE enabled, see below).
385 Applications that use the O32 FP64 ABI
386 (and the O32 FP64A ABI, which exists to
387 provide the ability to operate with existing FP32 code; see below)
388 can operate only when this bit is
391 Applications that use the O32 FPXX ABI can operate with either
397 Enable emulation of 32-bit floating-point mode.
398 When this mode is enabled,
399 it emulates 32-bit floating-point operations
400 by raising a reserved-instruction exception
401 on every instruction that uses 32-bit formats and
402 the kernel then handles the instruction in software.
403 (The problem lies in the discrepancy of handling odd-numbered registers
404 which are the high 32 bits of 64-bit registers with even numbers in
406 mode and the lower 32-bit parts of odd-numbered 64-bit registers in
409 Enabling this bit is necessary when code with the O32 FP32 ABI should operate
410 with code with compatible the O32 FPXX or O32 FP64A ABIs (which require
412 FPU mode) or when it is executed on newer hardware (MIPS R6 onwards)
415 mode support when a binary with the FP32 ABI is used.
417 Note that this mode makes sense only when the FPU is in 64-bit mode
420 Note that the use of emulation inherently has a significant performance hit
421 and should be avoided if possible.
424 In the N32/N64 ABI, 64-bit floating-point mode is always used,
425 so FPU emulation is not required and the FPU always operates in
429 This option is mainly intended for use by the dynamic linker
438 .\" prctl PR_GET_FP_MODE
440 .BR PR_GET_FP_MODE " (since Linux 4.0, only on MIPS)"
441 Return (as the function result)
442 the current floating-point mode (see the description of
447 the call returns a bit mask which represents the current floating-point mode.
456 .\" prctl PR_SET_FPEMU
458 .BR PR_SET_FPEMU " (since Linux 2.4.18, 2.5.9, only on ia64)"
459 Set floating-point emulation control bits to \fIarg2\fP.
462 to silently emulate floating-point operation accesses, or
464 to not emulate floating-point operations and send
467 .\" prctl PR_GET_FPEMU
469 .BR PR_GET_FPEMU " (since Linux 2.4.18, 2.5.9, only on ia64)"
470 Return floating-point emulation control bits,
471 in the location pointed to by
472 .IR "(int\ *) arg2" .
473 .\" prctl PR_SET_FPEXC
475 .BR PR_SET_FPEXC " (since Linux 2.4.21, 2.5.32, only on PowerPC)"
476 Set floating-point exception mode to \fIarg2\fP.
477 Pass \fBPR_FP_EXC_SW_ENABLE\fP to use FPEXC for FP exception enables,
478 \fBPR_FP_EXC_DIV\fP for floating-point divide by zero,
479 \fBPR_FP_EXC_OVF\fP for floating-point overflow,
480 \fBPR_FP_EXC_UND\fP for floating-point underflow,
481 \fBPR_FP_EXC_RES\fP for floating-point inexact result,
482 \fBPR_FP_EXC_INV\fP for floating-point invalid operation,
483 \fBPR_FP_EXC_DISABLED\fP for FP exceptions disabled,
484 \fBPR_FP_EXC_NONRECOV\fP for async nonrecoverable exception mode,
485 \fBPR_FP_EXC_ASYNC\fP for async recoverable exception mode,
486 \fBPR_FP_EXC_PRECISE\fP for precise exception mode.
487 .\" prctl PR_GET_FPEXC
489 .BR PR_GET_FPEXC " (since Linux 2.4.21, 2.5.32, only on PowerPC)"
490 Return floating-point exception mode,
491 in the location pointed to by
492 .IR "(int\ *) arg2" .
493 .\" prctl PR_SET_IO_FLUSHER
495 .BR PR_SET_IO_FLUSHER " (since Linux 5.6)"
496 If a user process is involved in the block layer or filesystem I/O path,
497 and can allocate memory while processing I/O requests it must set
499 This will put the process in the IO_FLUSHER state,
500 which allows it special treatment to make progress when allocating memory.
501 If \fIarg2\fP is 0, the process will clear the IO_FLUSHER state, and
502 the default behavior will be used.
504 The calling process must have the
514 The IO_FLUSHER state is inherited by a child process created via
516 and is preserved across
519 Examples of IO_FLUSHER applications are FUSE daemons, SCSI device
520 emulation daemons, and daemons that perform error handling like multipath
521 path recovery applications.
522 .\" prctl PR_GET_IO_FLUSHER
524 .B PR_GET_IO_FLUSHER (Since Linux 5.6)
525 Return (as the function result) the IO_FLUSHER state of the caller.
526 A value of 1 indicates that the caller is in the IO_FLUSHER state;
527 0 indicates that the caller is not in the IO_FLUSHER state.
529 The calling process must have the
539 .\" prctl PR_SET_KEEPCAPS
541 .BR PR_SET_KEEPCAPS " (since Linux 2.2.18)"
542 Set the state of the calling thread's "keep capabilities" flag.
543 The effect of this flag is described in
544 .BR capabilities (7).
546 must be either 0 (clear the flag)
548 The "keep capabilities" value will be reset to 0 on subsequent calls to
550 .\" prctl PR_GET_KEEPCAPS
552 .BR PR_GET_KEEPCAPS " (since Linux 2.2.18)"
553 Return (as the function result) the current state of the calling thread's
554 "keep capabilities" flag.
557 for a description of this flag.
558 .\" prctl PR_MCE_KILL
560 .BR PR_MCE_KILL " (since Linux 2.6.32)"
561 Set the machine check memory corruption kill policy for the calling thread.
565 .BR PR_MCE_KILL_CLEAR ,
566 clear the thread memory corruption kill policy and use the system-wide default.
567 (The system-wide default is defined by
568 .IR /proc/sys/vm/memory_failure_early_kill ;
574 .BR PR_MCE_KILL_SET ,
575 use a thread-specific memory corruption kill policy.
578 defines whether the policy is
580 .RB ( PR_MCE_KILL_EARLY ),
582 .RB ( PR_MCE_KILL_LATE ),
583 or the system-wide default
584 .RB ( PR_MCE_KILL_DEFAULT ).
585 Early kill means that the thread receives a
587 signal as soon as hardware memory corruption is detected inside
589 In late kill mode, the process is killed only when it accesses a corrupted page.
592 for more information on the
595 The policy is inherited by children.
598 arguments must be zero for future compatibility.
599 .\" prctl PR_MCE_KILL_GET
601 .BR PR_MCE_KILL_GET " (since Linux 2.6.32)"
602 Return (as the function result)
603 the current per-process machine check kill policy.
606 arguments must be zero.
609 .BR PR_SET_MM " (since Linux 3.3)"
610 .\" commit 028ee4be34a09a6d48bdf30ab991ae933a7bc036
611 Modify certain kernel memory map descriptor fields
612 of the calling process.
613 Usually these fields are set by the kernel and dynamic loader (see
615 for more information) and a regular application should not use this feature.
616 However, there are cases, such as self-modifying programs,
617 where a program might find it useful to change its own memory map.
619 The calling process must have the
624 is one of the options below, while
626 provides a new value for the option.
631 arguments must be zero if unused.
634 .\" commit 52b3694157e3aa6df871e283115652ec6f2d31e0
635 this feature is available only if the kernel is built with the
636 .BR CONFIG_CHECKPOINT_RESTORE
640 .BR PR_SET_MM_START_CODE
641 Set the address above which the program text can run.
642 The corresponding memory area must be readable and executable,
643 but not writable or shareable (see
647 for more information).
649 .BR PR_SET_MM_END_CODE
650 Set the address below which the program text can run.
651 The corresponding memory area must be readable and executable,
652 but not writable or shareable.
654 .BR PR_SET_MM_START_DATA
655 Set the address above which initialized and
656 uninitialized (bss) data are placed.
657 The corresponding memory area must be readable and writable,
658 but not executable or shareable.
660 .B PR_SET_MM_END_DATA
661 Set the address below which initialized and
662 uninitialized (bss) data are placed.
663 The corresponding memory area must be readable and writable,
664 but not executable or shareable.
666 .BR PR_SET_MM_START_STACK
667 Set the start address of the stack.
668 The corresponding memory area must be readable and writable.
670 .BR PR_SET_MM_START_BRK
671 Set the address above which the program heap can be expanded with
674 The address must be greater than the ending address of
675 the current program data segment.
676 In addition, the combined size of the resulting heap and
677 the size of the data segment can't exceed the
686 The requirements for the address are the same as for the
687 .BR PR_SET_MM_START_BRK
690 The following options are available since Linux 3.5.
691 .\" commit fe8c7f5cbf91124987106faa3bdf0c8b955c4cf7
693 .BR PR_SET_MM_ARG_START
694 Set the address above which the program command line is placed.
696 .BR PR_SET_MM_ARG_END
697 Set the address below which the program command line is placed.
699 .BR PR_SET_MM_ENV_START
700 Set the address above which the program environment is placed.
702 .BR PR_SET_MM_ENV_END
703 Set the address below which the program environment is placed.
705 The address passed with
706 .BR PR_SET_MM_ARG_START ,
707 .BR PR_SET_MM_ARG_END ,
708 .BR PR_SET_MM_ENV_START ,
710 .BR PR_SET_MM_ENV_END
711 should belong to a process stack area.
712 Thus, the corresponding memory area must be readable, writable, and
713 (depending on the kernel configuration) have the
719 Set a new auxiliary vector.
722 argument should provide the address of the vector.
725 is the size of the vector.
727 .BR PR_SET_MM_EXE_FILE
728 .\" commit b32dfe377102ce668775f8b6b1461f7ad428f8b6
731 symbolic link with a new one pointing to a new executable file
732 identified by the file descriptor provided in
735 The file descriptor should be obtained with a regular
739 To change the symbolic link, one needs to unmap all existing
740 executable memory areas, including those created by the kernel itself
741 (for example the kernel usually creates at least one executable
742 memory area for the ELF
746 In Linux 4.9 and earlier, the
747 .\" commit 3fb4afd9a504c2386b8435028d43283216bf588e
748 .BR PR_SET_MM_EXE_FILE
749 operation can be performed only once in a process's lifetime;
750 attempting to perform the operation a second time results in the error
752 This restriction was enforced for security reasons that were subsequently
754 and the restriction was removed in Linux 4.10 because some
755 user-space applications needed to perform this operation more than once.
757 The following options are available since Linux 3.18.
758 .\" commit f606b77f1a9e362451aca8f81d8f36a3a112139e
761 Provides one-shot access to all the addresses by passing in a
762 .I struct prctl_mm_map
763 (as defined in \fI<linux/prctl.h>\fP).
766 argument should provide the size of the struct.
768 This feature is available only if the kernel is built with the
769 .BR CONFIG_CHECKPOINT_RESTORE
772 .BR PR_SET_MM_MAP_SIZE
773 Returns the size of the
774 .I struct prctl_mm_map
776 This allows user space to find a compatible struct.
779 argument should be a pointer to an unsigned int.
781 This feature is available only if the kernel is built with the
782 .BR CONFIG_CHECKPOINT_RESTORE
785 .\" prctl PR_MPX_ENABLE_MANAGEMENT
787 .BR PR_MPX_ENABLE_MANAGEMENT ", " PR_MPX_DISABLE_MANAGEMENT " (since Linux 3.19, removed in Linux 5.4; only on x86) "
788 .\" commit fe3d197f84319d3bce379a9c0dc17b1f48ad358c
789 .\" See also http://lwn.net/Articles/582712/
790 .\" See also https://gcc.gnu.org/wiki/Intel%20MPX%20support%20in%20the%20GCC%20compiler
791 Enable or disable kernel management of Memory Protection eXtensions (MPX)
799 .\" commit e9d1b4f3c60997fe197bf0243cb4a41a44387a88
800 arguments must be zero.
802 MPX is a hardware-assisted mechanism for performing bounds checking on
804 It consists of a set of registers storing bounds information
805 and a set of special instruction prefixes that tell the CPU on which
806 instructions it should do bounds enforcement.
807 There is a limited number of these registers and
808 when there are more pointers than registers,
809 their contents must be "spilled" into a set of tables.
810 These tables are called "bounds tables" and the MPX
813 whether the kernel manages their allocation and freeing.
815 When management is enabled, the kernel will take over allocation
816 and freeing of the bounds tables.
817 It does this by trapping the #BR exceptions that result
818 at first use of missing bounds tables and
819 instead of delivering the exception to user space,
820 it allocates the table and populates the bounds directory
821 with the location of the new table.
822 For freeing, the kernel checks to see if bounds tables are
823 present for memory which is not allocated, and frees them if so.
825 Before enabling MPX management using
826 .BR PR_MPX_ENABLE_MANAGEMENT ,
827 the application must first have allocated a user-space buffer for
828 the bounds directory and placed the location of that directory in the
832 These calls fail if the CPU or kernel does not support MPX.
833 Kernel support for MPX is enabled via the
834 .BR CONFIG_X86_INTEL_MPX
835 configuration option.
836 You can check whether the CPU supports MPX by looking for the 'mpx'
837 CPUID bit, like with the following command:
841 cat /proc/cpuinfo | grep ' mpx '
845 A thread may not switch in or out of long (64-bit) mode while MPX is
848 All threads in a process are affected by these calls.
852 inherits the state of MPX management.
855 MPX management is reset to a state as if
856 .BR PR_MPX_DISABLE_MANAGEMENT
859 For further information on Intel MPX, see the kernel source file
860 .IR Documentation/x86/intel_mpx.txt .
862 .\" commit f240652b6032b48ad7fa35c5e701cc4c8d697c0b
863 .\" See also https://lkml.kernel.org/r/20190705175321.DB42F0AD@viggo.jf.intel.com
864 Due to a lack of toolchain support,
865 .BR PR_MPX_ENABLE_MANAGEMENT " and " PR_MPX_DISABLE_MANAGEMENT
866 are not supported in Linux 5.4 and later.
867 .\" prctl PR_SET_NAME
869 .BR PR_SET_NAME " (since Linux 2.6.9)"
870 Set the name of the calling thread,
871 using the value in the location pointed to by
872 .IR "(char\ *) arg2" .
873 The name can be up to 16 bytes long,
874 .\" TASK_COMM_LEN in include/linux/sched.h
875 including the terminating null byte.
876 (If the length of the string, including the terminating null byte,
877 exceeds 16 bytes, the string is silently truncated.)
878 This is the same attribute that can be set via
879 .BR pthread_setname_np (3)
881 .BR pthread_getname_np (3).
882 The attribute is likewise accessible via
883 .IR /proc/self/task/[tid]/comm ,
886 is the the thread ID of the calling thread, as returned by
888 .\" prctl PR_GET_NAME
890 .BR PR_GET_NAME " (since Linux 2.6.11)"
891 Return the name of the calling thread,
892 in the buffer pointed to by
893 .IR "(char\ *) arg2" .
894 The buffer should allow space for up to 16 bytes;
895 the returned string will be null-terminated.
896 .\" prctl PR_SET_NO_NEW_PRIVS
898 .BR PR_SET_NO_NEW_PRIVS " (since Linux 3.5)"
899 Set the calling thread's
901 attribute to the value in
907 promises not to grant privileges to do anything
908 that could not have been done without the
911 rendering the set-user-ID and set-group-ID mode bits,
912 and file capabilities non-functional).
915 attribute cannot be unset.
916 The setting of this attribute is inherited by children created by
924 the value of a thread's
926 attribute can be viewed via the
929 .IR /proc/[pid]/status
932 For more information, see the kernel source file
933 .IR Documentation/userspace\-api/no_new_privs.rst
934 .\" commit 40fde647ccb0ae8c11d256d271e24d385eed595b
936 .IR Documentation/prctl/no_new_privs.txt
940 .\" prctl PR_GET_NO_NEW_PRIVS
942 .BR PR_GET_NO_NEW_PRIVS " (since Linux 3.5)"
943 Return (as the function result) the value of the
945 attribute for the calling thread.
946 A value of 0 indicates the regular
949 A value of 1 indicates
951 will operate in the privilege-restricting mode described above.
952 .\" prctl PR_SET_PDEATHSIG
954 .BR PR_SET_PDEATHSIG " (since Linux 2.1.57)"
955 Set the parent-death signal
956 of the calling process to \fIarg2\fP (either a signal value
960 This is the signal that the calling process will get when its
964 .\" https://bugzilla.kernel.org/show_bug.cgi?id=43300
965 the "parent" in this case is considered to be the
967 that created this process.
968 In other words, the signal will be sent when that thread terminates
970 .BR pthread_exit (3)),
971 rather than after all of the threads in the parent process terminate.
973 The parent-death signal is sent upon subsequent termination of the parent
974 thread and also upon termination of each subreaper process
975 (see the description of
976 .B PR_SET_CHILD_SUBREAPER
977 above) to which the caller is subsequently reparented.
978 If the parent thread and all ancestor subreapers have already terminated
981 operation, then no parent-death signal is sent to the caller.
983 The parent-death signal is process-directed (see
985 and, if the child installs a handler using the
992 argument of the handler contains the PID of the terminating parent process.
994 The parent-death signal setting is cleared for the child of a
997 (since Linux 2.4.36 / 2.6.23)
998 .\" commit d2d56c5f51028cb9f3d800882eb6f4cbd3f9099f
999 cleared when executing a set-user-ID or set-group-ID binary,
1000 or a binary that has associated capabilities (see
1001 .BR capabilities (7));
1002 otherwise, this value is preserved across
1004 .\" prctl PR_GET_PDEATHSIG
1006 .BR PR_GET_PDEATHSIG " (since Linux 2.3.15)"
1007 Return the current value of the parent process death signal,
1008 in the location pointed to by
1009 .IR "(int\ *) arg2" .
1010 .\" prctl PR_SET_PTRACER
1012 .BR PR_SET_PTRACER " (since Linux 3.4)"
1013 .\" commit 2d514487faf188938a4ee4fb3464eeecfbdcf8eb
1014 .\" commit bf06189e4d14641c0148bea16e9dd24943862215
1015 This is meaningful only when the Yama LSM is enabled and in mode 1
1016 ("restricted ptrace", visible via
1017 .IR /proc/sys/kernel/yama/ptrace_scope ).
1018 When a "ptracer process ID" is passed in \fIarg2\fP,
1019 the caller is declaring that the ptracer process can
1021 the calling process as if it were a direct process ancestor.
1024 operation replaces the previous "ptracer process ID".
1029 set to 0 clears the caller's "ptracer process ID".
1033 .BR PR_SET_PTRACER_ANY ,
1034 the ptrace restrictions introduced by Yama are effectively disabled for the
1037 For further information, see the kernel source file
1038 .IR Documentation/admin\-guide/LSM/Yama.rst
1039 .\" commit 90bb766440f2147486a2acc3e793d7b8348b0c22
1041 .IR Documentation/security/Yama.txt
1043 .\" prctl PR_SET_SECCOMP
1045 .BR PR_SET_SECCOMP " (since Linux 2.6.23)"
1046 .\" See http://thread.gmane.org/gmane.linux.kernel/542632
1047 .\" [PATCH 0 of 2] seccomp updates
1048 .\" andrea@cpushare.com
1049 Set the secure computing (seccomp) mode for the calling thread, to limit
1050 the available system calls.
1053 system call provides a superset of the functionality of
1054 .BR PR_SET_SECCOMP .
1056 The seccomp mode is selected via
1058 (The seccomp constants are defined in
1059 .IR <linux/seccomp.h> .)
1064 .BR SECCOMP_MODE_STRICT ,
1065 the only system calls that the thread is permitted to make are
1070 .BR exit_group (2)),
1073 Other system calls result in the delivery of a
1076 Strict secure computing mode is useful for number-crunching applications
1077 that may need to execute untrusted byte code,
1078 perhaps obtained by reading from a pipe or socket.
1079 This operation is available only
1080 if the kernel is configured with
1087 .BR SECCOMP_MODE_FILTER " (since Linux 3.5),"
1088 the system calls allowed are defined by a pointer
1089 to a Berkeley Packet Filter passed in
1091 This argument is a pointer to
1092 .IR "struct sock_fprog" ;
1093 it can be designed to filter
1094 arbitrary system calls and system call arguments.
1095 This mode is available only if the kernel is configured with
1096 .B CONFIG_SECCOMP_FILTER
1100 .BR SECCOMP_MODE_FILTER
1103 then the seccomp mode is inherited by children created by
1107 is permitted, then the seccomp mode is preserved across
1109 If the filters permit
1111 calls, then additional filters can be added;
1112 they are run in order until the first non-allow result is seen.
1114 For further information, see the kernel source file
1115 .IR Documentation/userspace\-api/seccomp_filter.rst
1116 .\" commit c061f33f35be0ccc80f4b8e0aea5dfd2ed7e01a3
1118 .IR Documentation/prctl/seccomp_filter.txt
1120 .\" prctl PR_GET_SECCOMP
1122 .BR PR_GET_SECCOMP " (since Linux 2.6.23)"
1123 Return (as the function result)
1124 the secure computing mode of the calling thread.
1125 If the caller is not in secure computing mode, this operation returns 0;
1126 if the caller is in strict secure computing mode, then the
1130 signal to be sent to the process.
1131 If the caller is in filter mode, and this system call is allowed by the
1132 seccomp filters, it returns 2; otherwise, the process is killed with a
1135 This operation is available only
1136 if the kernel is configured with
1140 Since Linux 3.8, the
1143 .IR /proc/[pid]/status
1144 file provides a method of obtaining the same information,
1145 without the risk that the process is killed; see
1147 .\" prctl PR_SET_SECUREBITS
1149 .BR PR_SET_SECUREBITS " (since Linux 2.6.26)"
1150 Set the "securebits" flags of the calling thread to the value supplied in
1153 .BR capabilities (7).
1154 .\" prctl PR_GET_SECUREBITS
1156 .BR PR_GET_SECUREBITS " (since Linux 2.6.26)"
1157 Return (as the function result)
1158 the "securebits" flags of the calling thread.
1160 .BR capabilities (7).
1161 .\" prctl PR_GET_SPECULATION_CTRL
1163 .BR PR_GET_SPECULATION_CTRL " (since Linux 4.17)"
1164 Return (as the function result)
1165 the state of the speculation misfeature specified in
1167 Currently, the only permitted value for this argument is
1168 .BR PR_SPEC_STORE_BYPASS
1169 (otherwise the call fails with the error
1172 The return value uses bits 0-3 with the following meaning:
1176 Mitigation can be controlled per thread by
1177 .BR PR_SET_SPECULATION_CTRL .
1180 The speculation feature is enabled, mitigation is disabled.
1183 The speculation feature is disabled, mitigation is enabled.
1185 .BR PR_SPEC_FORCE_DISABLE
1188 but cannot be undone.
1192 then the CPU is not affected by the speculation misfeature.
1196 is set, then per-thread control of the mitigation is available.
1199 for the speculation misfeature will fail.
1206 arguments must be specified as 0; otherwise the call fails with the error
1208 .\" prctl PR_SET_SPECULATION_CTRL
1210 .BR PR_SET_SPECULATION_CTRL " (since Linux 4.17)"
1211 .\" commit b617cfc858161140d69cc0b5cc211996b557a1c7
1212 .\" commit 356e4bfff2c5489e016fdb925adbf12a1e3950ee
1213 Sets the state of the speculation misfeature specified in
1215 Currently, the only permitted value for this argument is
1216 .B PR_SPEC_STORE_BYPASS
1217 (otherwise the call fails with the error
1219 This setting is a per-thread attribute.
1222 argument is used to hand in the control value,
1223 which is one of the following:
1227 The speculation feature is enabled, mitigation is disabled.
1230 The speculation feature is disabled, mitigation is enabled.
1232 .BR PR_SPEC_FORCE_DISABLE
1234 .BR PR_SPEC_DISABLE ,
1235 but cannot be undone.
1238 prctl(..., PR_SPEC_ENABLE)
1239 will fail with the error
1245 will result in the call failing with the error
1252 arguments must be specified as 0; otherwise the call fails with the error
1255 The speculation feature can also be controlled by the
1256 .B spec_store_bypass_disable
1258 This parameter may enforce a read-only policy which will result in the
1260 call failing with the error
1262 For further details, see the kernel source file
1263 .IR Documentation/admin-guide/kernel-parameters.txt .
1265 .\" prctl PR_TASK_PERF_EVENTS_DISABLE
1267 .BR PR_TASK_PERF_EVENTS_DISABLE " (since Linux 2.6.31)"
1268 Disable all performance counters attached to the calling process,
1269 regardless of whether the counters were created by
1270 this process or another process.
1271 Performance counters created by the calling process for other
1272 processes are unaffected.
1273 For more information on performance counters, see the Linux kernel source file
1274 .IR tools/perf/design.txt .
1277 .BR PR_TASK_PERF_COUNTERS_DISABLE ;
1278 .\" commit 1d1c7ddbfab358445a542715551301b7fc363e28
1279 renamed (retaining the same numerical value)
1282 .\" prctl PR_TASK_PERF_EVENTS_ENABLE
1284 .BR PR_TASK_PERF_EVENTS_ENABLE " (since Linux 2.6.31)"
1286 .BR PR_TASK_PERF_EVENTS_DISABLE ;
1287 enable performance counters attached to the calling process.
1290 .BR PR_TASK_PERF_COUNTERS_ENABLE ;
1291 .\" commit 1d1c7ddbfab358445a542715551301b7fc363e28
1293 .\" commit cdd6c482c9ff9c55475ee7392ec8f672eddb7be6
1296 .\" prctl PR_SET_THP_DISABLE
1298 .BR PR_SET_THP_DISABLE " (since Linux 3.15)"
1299 .\" commit a0715cc22601e8830ace98366c0c2bd8da52af52
1300 Set the state of the "THP disable" flag for the calling thread.
1303 has a nonzero value, the flag is set, otherwise it is cleared.
1304 Setting this flag provides a method
1305 for disabling transparent huge pages
1306 for jobs where the code cannot be modified, and using a malloc hook with
1308 is not an option (i.e., statically allocated data).
1309 The setting of the "THP disable" flag is inherited by a child created via
1311 and is preserved across
1313 .\" prctl PR_GET_THP_DISABLE
1315 .BR PR_GET_THP_DISABLE " (since Linux 3.15)"
1316 Return (as the function result) the current setting of the "THP disable"
1317 flag for the calling thread:
1318 either 1, if the flag is set, or 0, if it is not.
1319 .\" prctl PR_GET_TID_ADDRESS
1321 .BR PR_GET_TID_ADDRESS " (since Linux 3.5)"
1322 .\" commit 300f786b2683f8bb1ec0afb6e1851183a479c86d
1326 .BR set_tid_address (2)
1329 .B CLONE_CHILD_CLEARTID
1330 flag, in the location pointed to by
1331 .IR "(int\ **)\ arg2" .
1332 This feature is available only if the kernel is built with the
1333 .BR CONFIG_CHECKPOINT_RESTORE
1337 system call does not have a compat implementation for
1338 the AMD64 x32 and MIPS n32 ABIs,
1339 and the kernel writes out a pointer using the kernel's pointer size,
1340 this operation expects a user-space buffer of 8 (not 4) bytes on these ABIs.
1341 .\" prctl PR_SET_TIMERSLACK
1343 .BR PR_SET_TIMERSLACK " (since Linux 2.6.28)"
1344 .\" See https://lwn.net/Articles/369549/
1345 .\" commit 6976675d94042fbd446231d1bd8b7de71a980ada
1346 Each thread has two associated timer slack values:
1347 a "default" value, and a "current" value.
1348 This operation sets the "current" timer slack value for the calling thread.
1350 is an unsigned long value, then maximum "current" value is ULONG_MAX and
1351 the minimum "current" value is 1.
1352 If the nanosecond value supplied in
1354 is greater than zero, then the "current" value is set to this value.
1358 the "current" timer slack is reset to the
1359 thread's "default" timer slack value.
1361 The "current" timer slack is used by the kernel to group timer expirations
1362 for the calling thread that are close to one another;
1363 as a consequence, timer expirations for the thread may be
1364 up to the specified number of nanoseconds late (but will never expire early).
1365 Grouping timer expirations can help reduce system power consumption
1366 by minimizing CPU wake-ups.
1368 The timer expirations affected by timer slack are those set by
1374 .BR epoll_pwait (2),
1375 .BR clock_nanosleep (2),
1379 (and thus the library functions implemented via futexes, including
1380 .\" List obtained by grepping for futex usage in glibc source
1381 .BR pthread_cond_timedwait (3),
1382 .BR pthread_mutex_timedlock (3),
1383 .BR pthread_rwlock_timedrdlock (3),
1384 .BR pthread_rwlock_timedwrlock (3),
1386 .BR sem_timedwait (3)).
1388 Timer slack is not applied to threads that are scheduled under
1389 a real-time scheduling policy (see
1390 .BR sched_setscheduler (2)).
1392 When a new thread is created,
1393 the two timer slack values are made the same as the "current" value
1394 of the creating thread.
1395 Thereafter, a thread can adjust its "current" timer slack value via
1396 .BR PR_SET_TIMERSLACK .
1397 The "default" value can't be changed.
1398 The timer slack values of
1400 (PID 1), the ancestor of all processes,
1401 are 50,000 nanoseconds (50 microseconds).
1402 The timer slack value is inherited by a child created via
1404 and is preserved across
1407 Since Linux 4.6, the "current" timer slack value of any process
1408 can be examined and changed via the file
1409 .IR /proc/[pid]/timerslack_ns .
1412 .\" prctl PR_GET_TIMERSLACK
1414 .BR PR_GET_TIMERSLACK " (since Linux 2.6.28)"
1415 Return (as the function result)
1416 the "current" timer slack value of the calling thread.
1417 .\" prctl PR_SET_TIMING
1419 .BR PR_SET_TIMING " (since Linux 2.6.0)"
1420 .\" Precisely: Linux 2.6.0-test4
1421 Set whether to use (normal, traditional) statistical process timing or
1422 accurate timestamp-based process timing, by passing
1423 .B PR_TIMING_STATISTICAL
1426 .B PR_TIMING_TIMESTAMP
1429 .B PR_TIMING_TIMESTAMP
1430 is not currently implemented
1431 (attempting to set this mode will yield the error
1433 .\" PR_TIMING_TIMESTAMP doesn't do anything in 2.6.26-rc8,
1434 .\" and looking at the patch history, it appears
1435 .\" that it never did anything.
1436 .\" prctl PR_GET_TIMING
1438 .BR PR_GET_TIMING " (since Linux 2.6.0)"
1439 .\" Precisely: Linux 2.6.0-test4
1440 Return (as the function result) which process timing method is currently
1442 .\" prctl PR_SET_TSC
1444 .BR PR_SET_TSC " (since Linux 2.6.26, x86 only)"
1445 Set the state of the flag determining whether the timestamp counter
1446 can be read by the process.
1451 to allow it to be read, or
1455 when the process tries to read the timestamp counter.
1456 .\" prctl PR_GET_TSC
1458 .BR PR_GET_TSC " (since Linux 2.6.26, x86 only)"
1459 Return the state of the flag determining whether the timestamp counter
1461 in the location pointed to by
1462 .IR "(int\ *) arg2" .
1463 .\" prctl PR_SET_UNALIGN
1466 (Only on: ia64, since Linux 2.3.48; parisc, since Linux 2.6.15;
1467 PowerPC, since Linux 2.6.18; Alpha, since Linux 2.6.22;
1468 .\" sh: 94ea5e449ae834af058ef005d16a8ad44fcf13d6
1469 .\" tile: 2f9ac29eec71a696cb0dcc5fb82c0f8d4dac28c9
1470 sh, since Linux 2.6.34; tile, since Linux 3.12)
1471 Set unaligned access control bits to \fIarg2\fP.
1473 \fBPR_UNALIGN_NOPRINT\fP to silently fix up unaligned user accesses,
1474 or \fBPR_UNALIGN_SIGBUS\fP to generate
1476 on unaligned user access.
1477 Alpha also supports an additional flag with the value
1478 of 4 and no corresponding named constant,
1479 which instructs kernel to not fix up
1480 unaligned accesses (it is analogous to providing the
1486 system call on Tru64).
1487 .\" prctl PR_GET_UNALIGN
1492 for information on versions and architectures.)
1493 Return unaligned access control bits, in the location pointed to by
1494 .IR "(unsigned int\ *) arg2" .
1497 .BR PR_CAP_AMBIENT + PR_CAP_AMBIENT_IS_SET ,
1498 .BR PR_CAPBSET_READ ,
1499 .BR PR_GET_DUMPABLE ,
1500 .BR PR_GET_FP_MODE ,
1501 .BR PR_GET_IO_FLUSHER ,
1502 .BR PR_GET_KEEPCAPS ,
1503 .BR PR_MCE_KILL_GET ,
1504 .BR PR_GET_NO_NEW_PRIVS ,
1505 .BR PR_GET_SECUREBITS ,
1506 .BR PR_GET_SPECULATION_CTRL ,
1507 .BR PR_GET_THP_DISABLE ,
1509 .BR PR_GET_TIMERSLACK ,
1512 return the nonnegative values described above.
1515 values return 0 on success.
1516 On error, \-1 is returned, and
1518 is set appropriately.
1528 .BR SECCOMP_MODE_FILTER ,
1529 but the process does not have the
1531 capability or has not set the
1533 attribute (see the discussion of
1534 .BR PR_SET_NO_NEW_PRIVS
1544 .BR PR_SET_MM_EXE_FILE ,
1545 the file is not executable.
1553 .BR PR_SET_MM_EXE_FILE ,
1554 and the file descriptor passed in
1564 .BR PR_SET_MM_EXE_FILE ,
1565 and this the second attempt to change the
1567 symbolic link, which is prohibited.
1571 is an invalid address.
1576 .BR PR_SET_SECCOMP ,
1579 .BR SECCOMP_MODE_FILTER ,
1580 the system was built with
1581 .BR CONFIG_SECCOMP_FILTER ,
1584 is an invalid address.
1601 arguments were not specified as zero.
1605 is not valid value for this
1613 .BR PR_GET_SECCOMP ,
1614 and the kernel was not configured with
1615 .BR CONFIG_SECCOMP .
1620 .BR PR_SET_SECCOMP ,
1623 .BR SECCOMP_MODE_FILTER ,
1624 and the kernel was not configured with
1625 .BR CONFIG_SECCOMP_FILTER .
1631 and one of the following is true
1642 (the limit on the size of the user address space for this architecture);
1646 .BR PR_SET_MM_START_CODE ,
1647 .BR PR_SET_MM_END_CODE ,
1648 .BR PR_SET_MM_START_DATA ,
1649 .BR PR_SET_MM_END_DATA ,
1651 .BR PR_SET_MM_START_STACK ,
1652 and the permissions of the corresponding memory area are not as required;
1656 .BR PR_SET_MM_START_BRK
1661 is less than or equal to the end of the data segment
1662 or specifies a value that would cause the
1664 resource limit to be exceeded.
1674 .BR PR_SET_PTRACER_ANY ,
1675 or the PID of an existing process.
1683 is not a valid signal number.
1692 .B SUID_DUMP_DISABLE
1694 .BR SUID_DUMP_USER .
1703 .BR PR_TIMING_STATISTICAL .
1708 .BR PR_SET_NO_NEW_PRIVS
1722 .BR PR_GET_NO_NEW_PRIVS
1734 .BR PR_SET_THP_DISABLE
1745 .BR PR_GET_THP_DISABLE
1758 and an unused argument
1763 .BR PR_CAP_AMBIENT_CLEAR_ALL ,
1767 has an invalid value;
1771 .BR PR_CAP_AMBIENT_LOWER ,
1772 .BR PR_CAP_AMBIENT_RAISE ,
1774 .BR PR_CAP_AMBIENT_IS_SET
1777 does not specify a valid capability.
1782 .BR PR_GET_SPECULATION_CTRL
1784 .BR PR_SET_SPECULATION_CTRL
1785 and unused arguments to
1792 .BR PR_SET_SPECULATION_CTRL
1793 the kernel or CPU does not support the requested speculation misfeature.
1798 .BR PR_MPX_ENABLE_MANAGEMENT
1800 .BR PR_MPX_DISABLE_MANAGEMENT
1801 and the kernel or the CPU does not support MPX management.
1802 Check that the kernel and processor have MPX support.
1807 .BR PR_SET_SPECULATION_CTRL
1808 implies that the control of the selected speculation misfeature is not possible.
1810 .BR PR_GET_SPECULATION_CTRL
1811 for the bit fields to determine which option is available.
1819 has an invalid or unsupported value.
1824 .BR PR_SET_SECUREBITS ,
1825 and the caller does not have the
1828 or tried to unset a "locked" flag,
1829 or tried to set a flag whose corresponding locked flag was set
1831 .BR capabilities (7)).
1836 .BR PR_SET_SPECULATION_CTRL
1837 wherein the speculation was disabled with
1838 .B PR_SPEC_FORCE_DISABLE
1839 and caller tried to enable it again.
1844 .BR PR_SET_KEEPCAPS ,
1846 .B SECBIT_KEEP_CAPS_LOCKED
1849 .BR capabilities (7)).
1854 .BR PR_CAPBSET_DROP ,
1855 and the caller does not have the
1863 and the caller does not have the
1874 .BR PR_CAP_AMBIENT_RAISE ,
1875 but either the capability specified in
1877 is not present in the process's permitted and inheritable capability sets,
1879 .B PR_CAP_AMBIENT_LOWER
1880 securebit has been set.
1885 .BR PR_SET_SPECULATION_CTRL
1889 .BR PR_SPEC_ENABLE ,
1890 .BR PR_SPEC_DISABLE ,
1892 .BR PR_SPEC_FORCE_DISABLE .
1896 system call was introduced in Linux 2.1.57.
1897 .\" The library interface was added in glibc 2.0.6
1899 This call is Linux-specific.
1902 system call (also introduced in Linux 2.1.44
1903 as irix_prctl on the MIPS architecture),
1908 .BI "ptrdiff_t prctl(int " option ", int " arg2 ", int " arg3 );
1912 and options to get the maximum number of processes per user,
1913 get the maximum number of processors the calling process can use,
1914 find out whether a specified process is currently blocked,
1915 get or set the maximum stack size, and so on.