mirror_ubuntu-kernels/arch/riscv/include
Alexandre Ghiti 2ab5438233
riscv: virt_addr_valid must check the address belongs to linear mapping
virt_addr_valid macro checks that a virtual address is valid, ie that
the address belongs to the linear mapping and that the corresponding
 physical page exists.

Add the missing check that ensures the virtual address belongs to the
linear mapping, otherwise __virt_to_phys, when compiled with
CONFIG_DEBUG_VIRTUAL enabled, raises a WARN that is interpreted as a
kernel bug by syzbot.

Signed-off-by: Alexandre Ghiti <alex@ghiti.fr>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
2021-02-02 18:31:13 -08:00
..
asm riscv: virt_addr_valid must check the address belongs to linear mapping 2021-02-02 18:31:13 -08:00
uapi/asm riscv: Add cache information in AUX vector 2020-09-15 18:46:08 -07:00