riscv: Extend patch_text for multiple instructions
authorPu Lehui <pulehui@huawei.com>
Wed, 15 Feb 2023 13:52:02 +0000 (21:52 +0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 17 Feb 2023 20:45:30 +0000 (21:45 +0100)
commit5e57fb7b0bd3ea7e994ef1c0ab3562d1fe0676b2
tree150dfe4d1f95aec03c11f35144a27cb39bf117e5
parent181127fb76e62d06ab17a75fd610129688612343
riscv: Extend patch_text for multiple instructions

Extend patch_text for multiple instructions. This is the preparaiton for
multiple instructions text patching in riscv BPF trampoline, and may be
useful for other scenario.

Signed-off-by: Pu Lehui <pulehui@huawei.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Tested-by: Björn Töpel <bjorn@rivosinc.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Acked-by: Björn Töpel <bjorn@rivosinc.com>
Link: https://lore.kernel.org/bpf/20230215135205.1411105-2-pulehui@huaweicloud.com
arch/riscv/include/asm/patch.h
arch/riscv/kernel/patch.c
arch/riscv/kernel/probes/kprobes.c