Commit 059bdb11 authored by Nam Cao's avatar Nam Cao Committed by Zheng Zengkai
Browse files

riscv: kprobes: allow writing to x0

stable inclusion
from stable-v6.6.3
commit b59f21292e1858477d4007d9645678b88ae17abf
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8LBQP

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=b59f21292e1858477d4007d9645678b88ae17abf



--------------------------------

commit 8cb22bec142624d21bc85ff96b7bad10b6220e6a upstream.

Instructions can write to x0, so we should simulate these instructions
normally.

Currently, the kernel hangs if an instruction who writes to x0 is
simulated.

Fixes: c22b0bcb ("riscv: Add kprobes supported")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarNam Cao <namcaov@gmail.com>
Reviewed-by: default avatarCharlie Jenkins <charlie@rivosinc.com>
Acked-by: default avatarGuo Ren <guoren@kernel.org>
Link: https://lore.kernel.org/r/20230829182500.61875-1-namcaov@gmail.com


Signed-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent acbf97ec
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment