riscv: kprobe: Fixup misaligned load text
authorGuo Ren <guoren@linux.alibaba.com>
Sat, 4 Feb 2023 06:35:31 +0000 (01:35 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Feb 2023 18:11:53 +0000 (19:11 +0100)
commit026cae99d06409752145e2472c1b264cc5fb6bf1
treef3fc5d6097180fde48a702c99db52babf8ad85dc
parent7d151eccd07a0a9767f3e0af976e05a9210ea678
riscv: kprobe: Fixup misaligned load text

commit eb7423273cc9922ee2d05bf660c034d7d515bb91 upstream.

The current kprobe would cause a misaligned load for the probe point.
This patch fixup it with two half-word loads instead.

Fixes: c22b0bcb1dd0 ("riscv: Add kprobes supported")
Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
Signed-off-by: Guo Ren <guoren@kernel.org>
Link: https://lore.kernel.org/linux-riscv/878rhig9zj.fsf@all.your.base.are.belong.to.us/
Reported-by: Bjorn Topel <bjorn.topel@gmail.com>
Reviewed-by: Björn Töpel <bjorn@kernel.org>
Link: https://lore.kernel.org/r/20230204063531.740220-1-guoren@kernel.org
Cc: stable@vger.kernel.org
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/riscv/kernel/probes/kprobes.c