LoongArch: Fix earlycon parameter if KASAN enabled
authorHuacai Chen <chenhuacai@loongson.cn>
Tue, 6 Feb 2024 04:32:05 +0000 (12:32 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Tue, 6 Feb 2024 04:32:05 +0000 (12:32 +0800)
commit639420e9f6cd9ca074732b17ac450d2518d5937f
tree97197e984a6c3ce9439dce4ea4278d175a71faf4
parent4551b30525cf3d2f026b92401ffe241eb04dfebe
LoongArch: Fix earlycon parameter if KASAN enabled

The earlycon parameter is based on fixmap, and fixmap addresses are not
supposed to be shadowed by KASAN. So return the kasan_early_shadow_page
in kasan_mem_to_shadow() if the input address is above FIXADDR_START.
Otherwise earlycon cannot work after kasan_init().

Cc: stable@vger.kernel.org
Fixes: 5aa4ac64e6add3e ("LoongArch: Add KASAN (Kernel Address Sanitizer) support")
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
arch/loongarch/mm/kasan_init.c