riscv: Fix KASAN memory mapping.
PATCH 1/1 riscv: Fix KASAN memory mapping.
From: Nick Hu <[email protected]>
Use virtual address instead of physical address when translating the address to shadow memory by kasan_mem_to_shadow().
Signed-off-by Nick Hu <[email protected]>
Signed-off-by Nylon Chen <[email protected]>
--- arch/riscv/mm/kasan_init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/riscv/mm/kasan_init.c +2 -2
@@ -93,8 +93,8 @@ void __init kasan_init(void) VMALLOC_END));for_each_mem_range (i, &_start, &_end) { -void *start = (void *)_start; -void *end = (void *)_end; +void *start = (void *)__va (_start); +void *end = (void *)__va (_end);if (start >= end)break ;
Signature · 7 lines
2.17.1 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
Palmer Dabbelt
maintainerQuoted 16 lines · On Tue, 12 Jan 2021 18:24:10 PST (-0800), [email protected] wrote:
From: Nick Hu <[email protected]>
Use virtual address instead of physical address when translating the address to shadow memory by
kasan_mem_to_shadow().Signed-off-by Nick Hu <[email protected]>Signed-off-by Nylon Chen <[email protected]>--- arch/riscv/mm/kasan_init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/riscv/mm/kasan_init.c +0
-0
arch/riscv/mm/kasan_init.c void __init kasan_init(void) · line 100
Quoted 10 lines
arch/riscv/mm/kasan_init.c +2
-2@@ -93,8 +93,8 @@ void __init kasan_init(void) VMALLOC_END));for_each_mem_range (i, &_start, &_end) { -void *start = (void *)_start; -void *end = (void *)_end; +void *start = (void *)__va (_start); +void *end = (void *)__va (_end);if (start >= end)break ;
Thanks, this is on fixes.
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv