LoongArch: Replace kretprobe with rethook
authorHaoran Jiang <jianghaoran@kylinos.cn>
Thu, 29 Jun 2023 12:58:44 +0000 (20:58 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Thu, 29 Jun 2023 12:58:44 +0000 (20:58 +0800)
commit7b0a096436c2dac6de77d132e751a8a3328798d5
tree2cfddd47c9438bc1ba0241836a22033f4473b627
parentf02644e32c9e4bd1a9b286dc0b84f9cbe294f4e2
LoongArch: Replace kretprobe with rethook

This is an adaptation of commit f3a112c0c40d ("x86,rethook,kprobes:
Replace kretprobe with rethook on x86") and commit b57c2f124098 ("riscv:
add riscv rethook implementation") to LoongArch. Mainly refer to commit
b57c2f124098 ("riscv: add riscv rethook implementation").

Replaces the kretprobe code with rethook on LoongArch. With this patch,
kretprobe on LoongArch uses the rethook instead of kretprobe specific
trampoline code.

Signed-off-by: Haoran Jiang <jianghaoran@kylinos.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
arch/loongarch/Kconfig
arch/loongarch/include/asm/kprobes.h
arch/loongarch/kernel/Makefile
arch/loongarch/kernel/kprobes.c
arch/loongarch/kernel/rethook.c [new file with mode: 0644]
arch/loongarch/kernel/rethook.h [new file with mode: 0644]
arch/loongarch/kernel/rethook_trampoline.S [moved from arch/loongarch/kernel/kprobes_trampoline.S with 93% similarity]