mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-21 18:11:39 +00:00
riscv: Fix KASAN memory mapping.
commitc25a053e15
upstream. Use virtual address instead of physical address when translating the address to shadow memory by kasan_mem_to_shadow(). Signed-off-by: Nick Hu <nickhu@andestech.com> Signed-off-by: Nylon Chen <nylon7@andestech.com> Fixes:b10d6bca87
("arch, drivers: replace for_each_membock() with for_each_mem_range()") Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
ab7594f639
commit
4b0a0655da
1 changed files with 2 additions and 2 deletions
|
@ -93,8 +93,8 @@ void __init kasan_init(void)
|
||||||
VMALLOC_END));
|
VMALLOC_END));
|
||||||
|
|
||||||
for_each_mem_range(i, &_start, &_end) {
|
for_each_mem_range(i, &_start, &_end) {
|
||||||
void *start = (void *)_start;
|
void *start = (void *)__va(_start);
|
||||||
void *end = (void *)_end;
|
void *end = (void *)__va(_end);
|
||||||
|
|
||||||
if (start >= end)
|
if (start >= end)
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue