diff options
author | Alexandre Ghiti <alex@ghiti.fr> | 2021-03-13 03:45:04 -0500 |
---|---|---|
committer | Palmer Dabbelt <palmerdabbelt@google.com> | 2021-03-16 21:55:18 -0700 |
commit | f3773dd031de7b283227f6104049688f77074a2d (patch) | |
tree | d00ee08c022dde7136179bbdb659a114d0104b9d /arch | |
parent | ce989f1472ae350e844b10c880b22543168fbc92 (diff) |
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 <alex@ghiti.fr>
Reviewed-by: Palmer Dabbelt <palmerdabbelt@google.com>
Fixes: e178d670f251 ("riscv/kasan: add KASAN_VMALLOC support")
Cc: stable@vger.kernel.org
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/riscv/mm/kasan_init.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/riscv/mm/kasan_init.c b/arch/riscv/mm/kasan_init.c index 3fc18f469efb..5c35e0f71e88 100644 --- a/arch/riscv/mm/kasan_init.c +++ b/arch/riscv/mm/kasan_init.c @@ -187,6 +187,8 @@ void __init kasan_shallow_populate(void *start, void *end) } vaddr += PAGE_SIZE; } + + local_flush_tlb_all(); } void __init kasan_init(void) |