]> git.baikalelectronics.ru Git - kernel.git/commit
riscv: Fix is_linear_mapping with recent move of KASAN region
authorAlexandre Ghiti <alexandre.ghiti@canonical.com>
Fri, 25 Feb 2022 12:39:48 +0000 (13:39 +0100)
committerPalmer Dabbelt <palmer@rivosinc.com>
Thu, 3 Mar 2022 21:11:02 +0000 (13:11 -0800)
commit922d9b988dd834dc2fbc3b380761418bd2dcd632
tree31983a111e6ac4bb99dae6870fac541071a70337
parent75437797340800ba69948ac9ca2bffb03d82a98e
riscv: Fix is_linear_mapping with recent move of KASAN region

The KASAN region was recently moved between the linear mapping and the
kernel mapping, is_linear_mapping used to check the validity of an
address by using the start of the kernel mapping, which is now wrong.

Fix this by using the maximum size of the physical memory.

Fixes: 4c13fce4a1e8 ("riscv: Move KASAN mapping next to the kernel mapping")
Signed-off-by: Alexandre Ghiti <alexandre.ghiti@canonical.com>
Cc: stable@vger.kernel.org
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/include/asm/page.h
arch/riscv/include/asm/pgtable.h