riscv: kprobe: Fixup misaligned load text
authorGuo Ren <guoren@linux.alibaba.com>
Sat, 4 Feb 2023 06:35:31 +0000 (01:35 -0500)
committerPalmer Dabbelt <palmer@rivosinc.com>
Thu, 9 Feb 2023 19:34:29 +0000 (11:34 -0800)
commiteb7423273cc9922ee2d05bf660c034d7d515bb91
tree39b6c7b9d14edef8563ef2ef89985613bcea18f5
parentcb80242cc679d6397e77d8a964deeb3ff218d2b5
riscv: kprobe: Fixup misaligned load text

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>
arch/riscv/kernel/probes/kprobes.c