aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Colomar <alx@kernel.org>2024-05-28 17:06:56 +0200
committerAlejandro Colomar <alx@kernel.org>2024-05-31 01:37:52 +0200
commit099e733e7f2ec0d2e092e13094e1bb004ab4f161 (patch)
treec438e805b74a2a9c5b373bdc0802ef5da03c94a8
parent0e3716399d861247ac481e5062a94d1677276859 (diff)
downloadman-pages-099e733e7f2ec0d2e092e13094e1bb004ab4f161.tar.gz
prctl.2, PR_MCE_KILL.2const: Split PR_MCE_KILL from prctl(2)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
-rw-r--r--man/man2/prctl.245
-rw-r--r--man/man2const/PR_MCE_KILL.2const80
2 files changed, 83 insertions, 42 deletions
diff --git a/man/man2/prctl.2 b/man/man2/prctl.2
index 99f65ca79f..735f391d95 100644
--- a/man/man2/prctl.2
+++ b/man/man2/prctl.2
@@ -18,7 +18,6 @@
.\" 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
-.\" 2009-10-03 Andi Kleen, document PR_MCE_KILL
.\" 2012-04 Cyrill Gorcunov, Document PR_SET_MM
.\" 2012-04-25 Michael Kerrisk, Document PR_TASK_PERF_EVENTS_DISABLE and
.\" PR_TASK_PERF_EVENTS_ENABLE
@@ -96,47 +95,8 @@ The first argument can be:
.B PR_SET_KEEPCAPS
.TQ
.B PR_GET_KEEPCAPS
-.\" prctl PR_MCE_KILL
-.TP
-.BR PR_MCE_KILL " (since Linux 2.6.32)"
-Set the machine check memory corruption kill policy for the calling thread.
-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
-.B SIGBUS
-signal.
-The policy is inherited by children.
-The remaining unused
-.BR prctl ()
-arguments must be zero for future compatibility.
+.TQ
+.B PR_MCE_KILL
.\" prctl PR_MCE_KILL_GET
.TP
.BR PR_MCE_KILL_GET " (since Linux 2.6.32)"
@@ -1993,4 +1953,5 @@ glibc 2.0.6
.BR PR_GET_IO_FLUSHER (2const),
.BR PR_SET_KEEPCAPS (2const),
.BR PR_GET_KEEPCAPS (2const),
+.BR PR_MCE_KILL (2const),
.BR core (5)
diff --git a/man/man2const/PR_MCE_KILL.2const b/man/man2const/PR_MCE_KILL.2const
new file mode 100644
index 0000000000..4e82af0f02
--- /dev/null
+++ b/man/man2const/PR_MCE_KILL.2const
@@ -0,0 +1,80 @@
+.\" Copyright 2010, Andi Kleen <andi@firstfloor.org>
+.\" Copyright 2012, 2013, 2015, Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" SPDX-License-Identifier: Linux-man-pages-copyleft
+.\"
+.\" 2009-10-03 Andi Kleen, document PR_MCE_KILL
+.\"
+.TH PR_MCE_KILL 2const (date) "Linux man-pages (unreleased)"
+.SH NAME
+PR_MCE_KILL
+\-
+set the machine check memory corruption kill policy
+.SH LIBRARY
+Standard C library
+.RI ( libc ", " \-lc )
+.SH SYNOPSIS
+.nf
+.B #include <sys/prctl.h>
+.P
+.BI "int prctl(int " op ", ...);"
+.fi
+.SH DESCRIPTION
+.TP
+.BR PR_MCE_KILL " (since Linux 2.6.32)"
+Set the machine check memory corruption kill policy for the calling thread.
+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
+.B SIGBUS
+signal.
+The policy is inherited by children.
+The remaining unused
+.BR prctl ()
+arguments must be zero for future compatibility.
+.SH RETURN VALUE
+On success,
+0 is returned.
+On error, \-1 is returned, and
+.I errno
+is set to indicate the error.
+.SH ERRORS
+.TP
+.B EINVAL
+.I arg2
+is not a valid value for this
+.IR op .
+.SH STANDARDS
+Linux.
+.SH HISTORY
+.SH SEE ALSO
+.BR prctl (2),
+.BR PR_MCE_KILL_GET (2const)