.\" 2012-02-04 Michael kerrisk, document PR_{SET,GET}_CHILD_SUBREAPER
.\"
.\"
-.TH PRCTL 2 2014-02-22 "Linux" "Linux Programmer's Manual"
+.TH PRCTL 2 2014-04-14 "Linux" "Linux Programmer's Manual"
.SH NAME
prctl \- operations on a process
.SH SYNOPSIS
See
.BR capabilities (7).
.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).
+.TP
+.BR PR_GET_THP_DISABLE " (since Linux 3.15)"
+Return (via the function result) the current setting of the "THP disable"
+flag for the calling thread:
+either 1, if the flag is set, or 0, if it is not.
+.TP
.BR PR_GET_TID_ADDRESS " (since Linux 3.5)"
.\" commit 300f786b2683f8bb1ec0afb6e1851183a479c86d
Retrieve the
.BR PR_GET_DUMPABLE ,
.BR PR_GET_KEEPCAPS ,
.BR PR_GET_NO_NEW_PRIVS ,
+.BR PR_GET_THP_DISABLE ,
.BR PR_CAPBSET_READ ,
.BR PR_GET_TIMING ,
.BR PR_GET_TIMERSLACK ,
.BR PR_SET_PTRACER_ANY ,
or the PID of an existing process.
.TP
+.B EINVAL
+.I option
+is
+.B PR_SET_PDEATHSIG
+and
+.I arg2
+is not a valid signal number.
+.TP
+.B EINVAL
+.I option
+is
+.BR PR_SET_DUMPABLE
+and
+.I arg2
+is neither
+.B SUID_DUMP_DISABLE
+nor
+.BR SUID_DUMP_USER .
+.TP
+.B EINVAL
+.I option
+is
+.BR PR_SET_TIMING
+and
+.I arg2
+is not
+.BR PR_TIMING_STATISTICAL .
+.TP
+.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
+.B EINVAL
+.I option
+is
+.BR PR_GET_NO_NEW_PRIVS
+and
+.IR arg2 ,
+.IR arg3 ,
+.IR arg4 ,
+or
+.IR arg5
+is nonzero.
+.TP
+.B EINVAL
+.I option
+is
+.BR PR_SET_THP_DISABLE
+and
+.IR arg3 ,
+.IR arg4 ,
+or
+.IR arg5
+is nonzero.
+.TP
+.B EINVAL
+.I option
+is
+.BR PR_GET_THP_DISABLE
+and
+.IR arg2 ,
+.IR arg3 ,
+.IR arg4 ,
+or
+.IR arg5
+is nonzero.
+.TP
.B EPERM
.I option
is
.SH SEE ALSO
.BR signal (2),
.BR core (5)
+.SH COLOPHON
+This page is part of release 3.68 of the Linux
+.I man-pages
+project.
+A description of the project,
+information about reporting bugs,
+and the latest version of this page,
+can be found at
+\%http://www.kernel.org/doc/man\-pages/.