madvise.2: Document MADV_HWPOISON

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Andi Kleen 2010-06-19 06:07:39 +02:00 committed by Michael Kerrisk
parent e64e605637
commit 523c2f67b7
1 changed files with 15 additions and 2 deletions

View File

@ -26,7 +26,7 @@
.\" Modified, 25 Feb 2002, Michael Kerrisk, <mtk.manpages@gmail.com>
.\" Added notes on MADV_DONTNEED
.\" FIXME
.\" 2.6.32 added MADV_HWPOISON, MADV_MERGEABLE, and MADV_UNMERGEABLE
.\" 2.6.32 added MADV_MERGEABLE, and MADV_UNMERGEABLE
.\" 2.6.33 added MADV_SOFT_OFFLINE
.\"
.TH MADVISE 2 2008-04-22 "Linux" "Linux Programmer's Manual"
@ -144,6 +144,18 @@ Undo the effect of
.BR MADV_DONTFORK ,
restoring the default behavior, whereby a mapping is inherited across
.BR fork (2).
.TP
.BR MADV_HWPOISON " (Since Linux 2.6.32)
Poison a page and handle it like a hardware memory corruption.
This operation is only available for privileged
.RB ( CAP_SYS_ADMIN )
processes.
This operation may result in the calling process receiving a
.B SIGBUS
and the page being unmapped.
This feature is intended for memory testing.
This feature is only available if the kernel was configured with
.BR CONFIG_MEMORY_FAILURE .
.SH "RETURN VALUE"
On success
.BR madvise ()
@ -201,8 +213,9 @@ for file access.
.BR MADV_REMOVE ,
.BR MADV_DONTFORK ,
.BR MADV_DOFORK ,
and
.B MADV_DOFORK
.BR MAD_HWPOISON
are Linux-specific.
.SH NOTES
.SS "Linux Notes"