diff options
author | Wu Fengguang <fengguang.wu@intel.com> | 2009-10-07 19:32:27 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-10-08 10:36:39 -0400 |
commit | 253fb02d62571e5455eedc9e39b9d660e86a40f0 (patch) | |
tree | f52fc8f0d792148d43e4e38ed48dc3666ef50b75 | |
parent | 7823da36ce8e42d66941887eb922768d259763f2 (diff) |
pagemap: export KPF_HWPOISON
This flag indicates a hardware detected memory corruption on the page.
Any future access of the page data may bring down the machine.
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Cc: Andi Kleen <andi@firstfloor.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | Documentation/vm/page-types.c | 2 | ||||
-rw-r--r-- | Documentation/vm/pagemap.txt | 4 | ||||
-rw-r--r-- | fs/proc/page.c | 5 |
3 files changed, 11 insertions, 0 deletions
diff --git a/Documentation/vm/page-types.c b/Documentation/vm/page-types.c index fa1a30d9e9d5..87f57228f56e 100644 --- a/Documentation/vm/page-types.c +++ b/Documentation/vm/page-types.c | |||
@@ -69,6 +69,7 @@ | |||
69 | #define KPF_COMPOUND_TAIL 16 | 69 | #define KPF_COMPOUND_TAIL 16 |
70 | #define KPF_HUGE 17 | 70 | #define KPF_HUGE 17 |
71 | #define KPF_UNEVICTABLE 18 | 71 | #define KPF_UNEVICTABLE 18 |
72 | #define KPF_HWPOISON 19 | ||
72 | #define KPF_NOPAGE 20 | 73 | #define KPF_NOPAGE 20 |
73 | 74 | ||
74 | /* [32-] kernel hacking assistances */ | 75 | /* [32-] kernel hacking assistances */ |
@@ -116,6 +117,7 @@ static char *page_flag_names[] = { | |||
116 | [KPF_COMPOUND_TAIL] = "T:compound_tail", | 117 | [KPF_COMPOUND_TAIL] = "T:compound_tail", |
117 | [KPF_HUGE] = "G:huge", | 118 | [KPF_HUGE] = "G:huge", |
118 | [KPF_UNEVICTABLE] = "u:unevictable", | 119 | [KPF_UNEVICTABLE] = "u:unevictable", |
120 | [KPF_HWPOISON] = "X:hwpoison", | ||
119 | [KPF_NOPAGE] = "n:nopage", | 121 | [KPF_NOPAGE] = "n:nopage", |
120 | 122 | ||
121 | [KPF_RESERVED] = "r:reserved", | 123 | [KPF_RESERVED] = "r:reserved", |
diff --git a/Documentation/vm/pagemap.txt b/Documentation/vm/pagemap.txt index 600a304a828c..2fdd84a19109 100644 --- a/Documentation/vm/pagemap.txt +++ b/Documentation/vm/pagemap.txt | |||
@@ -57,6 +57,7 @@ There are three components to pagemap: | |||
57 | 16. COMPOUND_TAIL | 57 | 16. COMPOUND_TAIL |
58 | 16. HUGE | 58 | 16. HUGE |
59 | 18. UNEVICTABLE | 59 | 18. UNEVICTABLE |
60 | 19. HWPOISON | ||
60 | 20. NOPAGE | 61 | 20. NOPAGE |
61 | 62 | ||
62 | Short descriptions to the page flags: | 63 | Short descriptions to the page flags: |
@@ -86,6 +87,9 @@ Short descriptions to the page flags: | |||
86 | 17. HUGE | 87 | 17. HUGE |
87 | this is an integral part of a HugeTLB page | 88 | this is an integral part of a HugeTLB page |
88 | 89 | ||
90 | 19. HWPOISON | ||
91 | hardware detected memory corruption on this page: don't touch the data! | ||
92 | |||
89 | 20. NOPAGE | 93 | 20. NOPAGE |
90 | no page frame exists at the requested address | 94 | no page frame exists at the requested address |
91 | 95 | ||
diff --git a/fs/proc/page.c b/fs/proc/page.c index 2281c2cbfe2b..5033ce0d254b 100644 --- a/fs/proc/page.c +++ b/fs/proc/page.c | |||
@@ -94,6 +94,7 @@ static const struct file_operations proc_kpagecount_operations = { | |||
94 | #define KPF_COMPOUND_TAIL 16 | 94 | #define KPF_COMPOUND_TAIL 16 |
95 | #define KPF_HUGE 17 | 95 | #define KPF_HUGE 17 |
96 | #define KPF_UNEVICTABLE 18 | 96 | #define KPF_UNEVICTABLE 18 |
97 | #define KPF_HWPOISON 19 | ||
97 | #define KPF_NOPAGE 20 | 98 | #define KPF_NOPAGE 20 |
98 | 99 | ||
99 | #define KPF_KSM 21 | 100 | #define KPF_KSM 21 |
@@ -180,6 +181,10 @@ static u64 get_uflags(struct page *page) | |||
180 | u |= kpf_copy_bit(k, KPF_UNEVICTABLE, PG_unevictable); | 181 | u |= kpf_copy_bit(k, KPF_UNEVICTABLE, PG_unevictable); |
181 | u |= kpf_copy_bit(k, KPF_MLOCKED, PG_mlocked); | 182 | u |= kpf_copy_bit(k, KPF_MLOCKED, PG_mlocked); |
182 | 183 | ||
184 | #ifdef CONFIG_MEMORY_FAILURE | ||
185 | u |= kpf_copy_bit(k, KPF_HWPOISON, PG_hwpoison); | ||
186 | #endif | ||
187 | |||
183 | #ifdef CONFIG_IA64_UNCACHED_ALLOCATOR | 188 | #ifdef CONFIG_IA64_UNCACHED_ALLOCATOR |
184 | u |= kpf_copy_bit(k, KPF_UNCACHED, PG_uncached); | 189 | u |= kpf_copy_bit(k, KPF_UNCACHED, PG_uncached); |
185 | #endif | 190 | #endif |