Skip to content

Commit f3773dd

Browse files
AlexGhitipalmer-dabbelt
authored andcommitted
riscv: Ensure page table writes are flushed when initializing KASAN vmalloc
Make sure that writes to kernel page table during KASAN vmalloc initialization are made visible by adding a sfence.vma. Signed-off-by: Alexandre Ghiti <[email protected]> Reviewed-by: Palmer Dabbelt <[email protected]> Fixes: e178d67 ("riscv/kasan: add KASAN_VMALLOC support") Cc: [email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent ce989f1 commit f3773dd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/riscv/mm/kasan_init.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,8 @@ void __init kasan_shallow_populate(void *start, void *end)
187187
}
188188
vaddr += PAGE_SIZE;
189189
}
190+
191+
local_flush_tlb_all();
190192
}
191193

192194
void __init kasan_init(void)

0 commit comments

Comments
 (0)