From: Ard Biesheuvel <[email protected]> Before moving the empty_zero_page into the .rodata section, make sure its linear alias has the memory-tagged type. This is needed to ensure that cpu_enable_mte() will be able to initialize the tags correctly.
Signed-off-by: Ard Biesheuvel <[email protected]> --- arch/arm64/mm/mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c index dd85e093ffdb..0c3d97f120e1 100644 --- a/arch/arm64/mm/mmu.c +++ b/arch/arm64/mm/mmu.c @@ -1195,7 +1195,7 @@ static void __init map_mem(pgd_t *pgdp) * so we should avoid them here. */ __map_memblock(pgdp, kernel_start, kernel_end, - PAGE_KERNEL, NO_CONT_MAPPINGS); + pgprot_tagged(PAGE_KERNEL), NO_CONT_MAPPINGS); memblock_clear_nomap(kernel_start, kernel_end - kernel_start); arm64_kfence_map_pool(early_kfence_pool, pgdp); } -- 2.54.0.563.g4f69b47b94-goog

