Skip to content

Commit 0517899

Browse files
Vasily Gorbikhcahca
authored andcommitted
s390/mm,ptdump: avoid Kasan vs Memcpy Real markers swapping
---[ Real Memory Copy Area Start ]--- 0x001bfffffffff000-0x001c000000000000 4K PTE I ---[ Kasan Shadow Start ]--- ---[ Real Memory Copy Area End ]--- 0x001c000000000000-0x001c000200000000 8G PMD RW NX ... ---[ Kasan Shadow End ]--- ptdump does a stable sort of markers. Move kasan markers after memcpy real to avoid swapping. Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
1 parent 39da9a9 commit 0517899

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

arch/s390/mm/dump_pagetables.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@ enum address_markers_idx {
3333
#endif
3434
IDENTITY_AFTER_NR,
3535
IDENTITY_AFTER_END_NR,
36-
#ifdef CONFIG_KASAN
37-
KASAN_SHADOW_START_NR,
38-
KASAN_SHADOW_END_NR,
39-
#endif
4036
VMEMMAP_NR,
4137
VMEMMAP_END_NR,
4238
VMALLOC_NR,
@@ -47,6 +43,10 @@ enum address_markers_idx {
4743
ABS_LOWCORE_END_NR,
4844
MEMCPY_REAL_NR,
4945
MEMCPY_REAL_END_NR,
46+
#ifdef CONFIG_KASAN
47+
KASAN_SHADOW_START_NR,
48+
KASAN_SHADOW_END_NR,
49+
#endif
5050
};
5151

5252
static struct addr_marker address_markers[] = {
@@ -62,10 +62,6 @@ static struct addr_marker address_markers[] = {
6262
#endif
6363
[IDENTITY_AFTER_NR] = {(unsigned long)_end, "Identity Mapping Start"},
6464
[IDENTITY_AFTER_END_NR] = {0, "Identity Mapping End"},
65-
#ifdef CONFIG_KASAN
66-
[KASAN_SHADOW_START_NR] = {KASAN_SHADOW_START, "Kasan Shadow Start"},
67-
[KASAN_SHADOW_END_NR] = {KASAN_SHADOW_END, "Kasan Shadow End"},
68-
#endif
6965
[VMEMMAP_NR] = {0, "vmemmap Area Start"},
7066
[VMEMMAP_END_NR] = {0, "vmemmap Area End"},
7167
[VMALLOC_NR] = {0, "vmalloc Area Start"},
@@ -76,6 +72,10 @@ static struct addr_marker address_markers[] = {
7672
[ABS_LOWCORE_END_NR] = {0, "Lowcore Area End"},
7773
[MEMCPY_REAL_NR] = {0, "Real Memory Copy Area Start"},
7874
[MEMCPY_REAL_END_NR] = {0, "Real Memory Copy Area End"},
75+
#ifdef CONFIG_KASAN
76+
[KASAN_SHADOW_START_NR] = {KASAN_SHADOW_START, "Kasan Shadow Start"},
77+
[KASAN_SHADOW_END_NR] = {KASAN_SHADOW_END, "Kasan Shadow End"},
78+
#endif
7979
{ -1, NULL }
8080
};
8181

0 commit comments

Comments
 (0)