aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-generic
diff options
context:
space:
mode:
authorAndi Kleen <andi@firstfloor.org>2009-09-16 05:50:17 -0400
committerAndi Kleen <ak@linux.intel.com>2009-09-16 05:50:17 -0400
commit9893e49d64a4874ea67849ee2cfbf3f3d6817573 (patch)
tree2bf3c7950cdae1c1ed03a513a6690d95f0c02d5c /include/asm-generic
parentf590f333fb15444d2971f979d434ecad56c09698 (diff)
HWPOISON: Add madvise() based injector for hardware poisoned pages v4
Impact: optional, useful for debugging Add a new madvice sub command to inject poison for some pages in a process' address space. This is useful for testing the poison page handling. This patch can allow root to tie up large amounts of memory. I got feedback from container developers and they didn't see any problem. v2: Use write flag for get_user_pages to make sure to always get a fresh page v3: Don't request write mapping (Fengguang Wu) v4: Move MADV_* number to avoid conflict with KSM (Hugh Dickins) Signed-off-by: Andi Kleen <ak@linux.intel.com>
Diffstat (limited to 'include/asm-generic')
-rw-r--r--include/asm-generic/mman-common.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/asm-generic/mman-common.h b/include/asm-generic/mman-common.h
index 3b69ad34189a..c325d1ef42ab 100644
--- a/include/asm-generic/mman-common.h
+++ b/include/asm-generic/mman-common.h
@@ -34,6 +34,7 @@
34#define MADV_REMOVE 9 /* remove these pages & resources */ 34#define MADV_REMOVE 9 /* remove these pages & resources */
35#define MADV_DONTFORK 10 /* don't inherit across fork */ 35#define MADV_DONTFORK 10 /* don't inherit across fork */
36#define MADV_DOFORK 11 /* do inherit across fork */ 36#define MADV_DOFORK 11 /* do inherit across fork */
37#define MADV_HWPOISON 100 /* poison a page for testing */
37 38
38/* compatibility flags */ 39/* compatibility flags */
39#define MAP_FILE 0 40#define MAP_FILE 0