Commit 253fb02d62571e5455eedc9e39b9d660e86a40f0
Committed by
Linus Torvalds
1 parent
7823da36ce
Exists in
master
and in
7 other branches
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>
Showing 3 changed files with 11 additions and 0 deletions Side-by-side Diff
Documentation/vm/page-types.c
... | ... | @@ -69,6 +69,7 @@ |
69 | 69 | #define KPF_COMPOUND_TAIL 16 |
70 | 70 | #define KPF_HUGE 17 |
71 | 71 | #define KPF_UNEVICTABLE 18 |
72 | +#define KPF_HWPOISON 19 | |
72 | 73 | #define KPF_NOPAGE 20 |
73 | 74 | |
74 | 75 | /* [32-] kernel hacking assistances */ |
... | ... | @@ -116,6 +117,7 @@ |
116 | 117 | [KPF_COMPOUND_TAIL] = "T:compound_tail", |
117 | 118 | [KPF_HUGE] = "G:huge", |
118 | 119 | [KPF_UNEVICTABLE] = "u:unevictable", |
120 | + [KPF_HWPOISON] = "X:hwpoison", | |
119 | 121 | [KPF_NOPAGE] = "n:nopage", |
120 | 122 | |
121 | 123 | [KPF_RESERVED] = "r:reserved", |
Documentation/vm/pagemap.txt
... | ... | @@ -57,6 +57,7 @@ |
57 | 57 | 16. COMPOUND_TAIL |
58 | 58 | 16. HUGE |
59 | 59 | 18. UNEVICTABLE |
60 | + 19. HWPOISON | |
60 | 61 | 20. NOPAGE |
61 | 62 | |
62 | 63 | Short descriptions to the page flags: |
... | ... | @@ -85,6 +86,9 @@ |
85 | 86 | only huge/giga pages are made visible to end users. |
86 | 87 | 17. HUGE |
87 | 88 | this is an integral part of a HugeTLB page |
89 | + | |
90 | +19. HWPOISON | |
91 | + hardware detected memory corruption on this page: don't touch the data! | |
88 | 92 | |
89 | 93 | 20. NOPAGE |
90 | 94 | no page frame exists at the requested address |
fs/proc/page.c
... | ... | @@ -94,6 +94,7 @@ |
94 | 94 | #define KPF_COMPOUND_TAIL 16 |
95 | 95 | #define KPF_HUGE 17 |
96 | 96 | #define KPF_UNEVICTABLE 18 |
97 | +#define KPF_HWPOISON 19 | |
97 | 98 | #define KPF_NOPAGE 20 |
98 | 99 | |
99 | 100 | #define KPF_KSM 21 |
... | ... | @@ -179,6 +180,10 @@ |
179 | 180 | |
180 | 181 | u |= kpf_copy_bit(k, KPF_UNEVICTABLE, PG_unevictable); |
181 | 182 | u |= kpf_copy_bit(k, KPF_MLOCKED, PG_mlocked); |
183 | + | |
184 | +#ifdef CONFIG_MEMORY_FAILURE | |
185 | + u |= kpf_copy_bit(k, KPF_HWPOISON, PG_hwpoison); | |
186 | +#endif | |
182 | 187 | |
183 | 188 | #ifdef CONFIG_IA64_UNCACHED_ALLOCATOR |
184 | 189 | u |= kpf_copy_bit(k, KPF_UNCACHED, PG_uncached); |