]> git.baikalelectronics.ru Git - kernel.git/commit
riscv: Split early kasan mapping to prepare sv48 introduction
authorAlexandre Ghiti <alexandre.ghiti@canonical.com>
Mon, 6 Dec 2021 10:46:46 +0000 (11:46 +0100)
committerPalmer Dabbelt <palmer@rivosinc.com>
Thu, 20 Jan 2022 01:54:05 +0000 (17:54 -0800)
commitacdf3424c96e9853be5126acf68df5a77146d7ec
tree5f5bc07a22d84a4745b7524fe6434512faf0dc15
parent4c13fce4a1e89a68f812734084a3c651c846406a
riscv: Split early kasan mapping to prepare sv48 introduction

Now that kasan shadow region is next to the kernel, for sv48, this
region won't be aligned on PGDIR_SIZE and then when populating this
region, we'll need to get down to lower levels of the page table. So
instead of reimplementing the page table walk for the early population,
take advantage of the existing functions used for the final population.

Note that kasan swapper initialization must also be split since memblock
is not initialized at this point and as the last PGD is shared with the
kernel, we'd need to allocate a PUD so postpone the kasan final
population after the kernel population is done.

Signed-off-by: Alexandre Ghiti <alexandre.ghiti@canonical.com>
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/include/asm/kasan.h
arch/riscv/mm/init.c
arch/riscv/mm/kasan_init.c