Skip to content

Commit 0dac8f6

Browse files
Vasily GorbikMartin Schwidefsky
authored andcommitted
s390/mm: add kasan shadow to the debugfs pgtable dump
This change adds address space markers for kasan shadow memory. Reviewed-by: Martin Schwidefsky <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
1 parent b6cbe3e commit 0dac8f6

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

arch/s390/mm/dump_pagetables.c

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#include <linux/debugfs.h>
44
#include <linux/sched.h>
55
#include <linux/mm.h>
6+
#include <asm/kasan.h>
67
#include <asm/sections.h>
78
#include <asm/pgtable.h>
89

@@ -17,18 +18,26 @@ enum address_markers_idx {
1718
IDENTITY_NR = 0,
1819
KERNEL_START_NR,
1920
KERNEL_END_NR,
21+
#ifdef CONFIG_KASAN
22+
KASAN_SHADOW_START_NR,
23+
KASAN_SHADOW_END_NR,
24+
#endif
2025
VMEMMAP_NR,
2126
VMALLOC_NR,
2227
MODULES_NR,
2328
};
2429

2530
static struct addr_marker address_markers[] = {
26-
[IDENTITY_NR] = {0, "Identity Mapping"},
27-
[KERNEL_START_NR] = {(unsigned long)_stext, "Kernel Image Start"},
28-
[KERNEL_END_NR] = {(unsigned long)_end, "Kernel Image End"},
29-
[VMEMMAP_NR] = {0, "vmemmap Area"},
30-
[VMALLOC_NR] = {0, "vmalloc Area"},
31-
[MODULES_NR] = {0, "Modules Area"},
31+
[IDENTITY_NR] = {0, "Identity Mapping"},
32+
[KERNEL_START_NR] = {(unsigned long)_stext, "Kernel Image Start"},
33+
[KERNEL_END_NR] = {(unsigned long)_end, "Kernel Image End"},
34+
#ifdef CONFIG_KASAN
35+
[KASAN_SHADOW_START_NR] = {KASAN_SHADOW_START, "Kasan Shadow Start"},
36+
[KASAN_SHADOW_END_NR] = {KASAN_SHADOW_END, "Kasan Shadow End"},
37+
#endif
38+
[VMEMMAP_NR] = {0, "vmemmap Area"},
39+
[VMALLOC_NR] = {0, "vmalloc Area"},
40+
[MODULES_NR] = {0, "Modules Area"},
3241
{ -1, NULL }
3342
};
3443

0 commit comments

Comments
 (0)