Re: [PATCH 2/4] LoongArch: Add kretprobe support

From: Tiezhu Yang
Date: Thu Sep 22 2022 - 08:24:47 EST




On 09/21/2022 04:22 PM, Jinyang He wrote:
On 09/20/2022 11:37 AM, Tiezhu Yang wrote:

Use the generic kretprobe trampoline handler to add kretprobe
support for LoongArch.

Signed-off-by: Tiezhu Yang <yangtiezhu@xxxxxxxxxxx>
---
arch/loongarch/Kconfig | 1 +
arch/loongarch/kernel/kprobes.c | 49

...

int __init arch_init_kprobes(void)
{
- return 0;
+ return register_kprobe(&trampoline_p);
Hi, Tiezhu,

For kretprobe, we can do things like arm64/riscv... did. It avoid
the break exception when function return.


OK, looks reasonable, let me try, thank you.
I will wait for some more review comments and then send v2.

Thanks,
Tiezhu