Skip to content
Unverified Commit 9f2ac64d authored by Qinglin Pan's avatar Qinglin Pan Committed by Palmer Dabbelt
Browse files

riscv: mm: add missing memcpy in kasan_init



Hi Atish,

It seems that the panic is due to the missing memcpy during kasan_init.
Could you please check whether this patch is helpful?

When doing kasan_populate, the new allocated base_pud/base_p4d should
contain kasan_early_shadow_{pud, p4d}'s content. Add the missing memcpy
to avoid page fault when read/write kasan shadow region.

Tested on:
 - qemu with sv57 and CONFIG_KASAN on.
 - qemu with sv48 and CONFIG_KASAN on.

Signed-off-by: default avatarQinglin Pan <panqinglin2020@iscas.ac.cn>
Tested-by: default avatarAtish Patra <atishp@rivosinc.com>
Fixes: 8fbdccd2 ("riscv: mm: Support kasan for sv57")
Link: https://lore.kernel.org/r/20221009083050.3814850-1-panqinglin2020@iscas.ac.cn


Signed-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
parent 389ec68c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment