riscv: Fix config KASAN && DEBUG_VIRTUAL
authorAlexandre Ghiti <alexandre.ghiti@canonical.com>
Fri, 25 Feb 2022 12:39:51 +0000 (13:39 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Mar 2022 18:09:31 +0000 (19:09 +0100)
commitdd9dd24fd7cb5310fa1db2b1b03431c96663fa7c
tree253ae73b53c87f3b3d1dfa3e5f1adf9f77433e99
parent7211aab2881b0a8b6a002ec2eb341b2d3cb9f003
riscv: Fix config KASAN && DEBUG_VIRTUAL

commit c648c4bb7d02ceb53ee40172fdc4433b37cee9c6 upstream.

__virt_to_phys function is called very early in the boot process (ie
kasan_early_init) so it should not be instrumented by KASAN otherwise it
bugs.

Fix this by declaring phys_addr.c as non-kasan instrumentable.

Signed-off-by: Alexandre Ghiti <alexandre.ghiti@canonical.com>
Fixes: 8ad8b72721d0 (riscv: Add KASAN support)
Cc: stable@vger.kernel.org
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/riscv/mm/Makefile