Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Wu Fengguang and committed by
Linus Torvalds
253fb02d 7823da36

+11
+2
Documentation/vm/page-types.c
··· 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 */ ··· 117 116 [KPF_COMPOUND_TAIL] = "T:compound_tail", 118 117 [KPF_HUGE] = "G:huge", 119 118 [KPF_UNEVICTABLE] = "u:unevictable", 119 + [KPF_HWPOISON] = "X:hwpoison", 120 120 [KPF_NOPAGE] = "n:nopage", 121 121 122 122 [KPF_RESERVED] = "r:reserved",
+4
Documentation/vm/pagemap.txt
··· 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: ··· 86 85 only huge/giga pages are made visible to end users. 87 86 17. HUGE 88 87 this is an integral part of a HugeTLB page 88 + 89 + 19. HWPOISON 90 + hardware detected memory corruption on this page: don't touch the data! 89 91 90 92 20. NOPAGE 91 93 no page frame exists at the requested address
+5
fs/proc/page.c
··· 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 ··· 180 179 181 180 u |= kpf_copy_bit(k, KPF_UNEVICTABLE, PG_unevictable); 182 181 u |= kpf_copy_bit(k, KPF_MLOCKED, PG_mlocked); 182 + 183 + #ifdef CONFIG_MEMORY_FAILURE 184 + u |= kpf_copy_bit(k, KPF_HWPOISON, PG_hwpoison); 185 + #endif 183 186 184 187 #ifdef CONFIG_IA64_UNCACHED_ALLOCATOR 185 188 u |= kpf_copy_bit(k, KPF_UNCACHED, PG_uncached);