diff options
| -rw-r--r-- | arch/arm64/mm/kasan_init.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/arch/arm64/mm/kasan_init.c b/arch/arm64/mm/kasan_init.c index a164183f3481..757009daa9ed 100644 --- a/arch/arm64/mm/kasan_init.c +++ b/arch/arm64/mm/kasan_init.c | |||
| @@ -159,15 +159,12 @@ void __init kasan_init(void) | |||
| 159 | * vmemmap_populate() has populated the shadow region that covers the | 159 | * vmemmap_populate() has populated the shadow region that covers the |
| 160 | * kernel image with SWAPPER_BLOCK_SIZE mappings, so we have to round | 160 | * kernel image with SWAPPER_BLOCK_SIZE mappings, so we have to round |
| 161 | * the start and end addresses to SWAPPER_BLOCK_SIZE as well, to prevent | 161 | * the start and end addresses to SWAPPER_BLOCK_SIZE as well, to prevent |
| 162 | * kasan_populate_zero_shadow() from replacing the PMD block mappings | 162 | * kasan_populate_zero_shadow() from replacing the page table entries |
| 163 | * with PMD table mappings at the edges of the shadow region for the | 163 | * (PMD or PTE) at the edges of the shadow region for the kernel |
| 164 | * kernel image. | 164 | * image. |
| 165 | */ | 165 | */ |
| 166 | if (ARM64_SWAPPER_USES_SECTION_MAPS) { | 166 | kimg_shadow_start = round_down(kimg_shadow_start, SWAPPER_BLOCK_SIZE); |
| 167 | kimg_shadow_start = round_down(kimg_shadow_start, | 167 | kimg_shadow_end = round_up(kimg_shadow_end, SWAPPER_BLOCK_SIZE); |
| 168 | SWAPPER_BLOCK_SIZE); | ||
| 169 | kimg_shadow_end = round_up(kimg_shadow_end, SWAPPER_BLOCK_SIZE); | ||
| 170 | } | ||
| 171 | 168 | ||
| 172 | kasan_populate_zero_shadow((void *)KASAN_SHADOW_START, | 169 | kasan_populate_zero_shadow((void *)KASAN_SHADOW_START, |
| 173 | (void *)mod_shadow_start); | 170 | (void *)mod_shadow_start); |
