]> 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)
commit787f194dfb45c04eb24cf3ba7c561856c81d2407
tree31983a111e6ac4bb99dae6870fac541071a70337
parentb5b2ee3aa56e4d066e60f6184938b86662ef37ae
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: afdada808285 ("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