On Tue, 09 Jul 2024 12:28:29 +0530 Naveen N Rao <nav...@kernel.org> wrote:
> Masami Hiramatsu wrote: > > On Thu, 27 Jun 2024 09:21:01 -0400 > > Abhishek Dubey <adu...@linux.ibm.com> wrote: > > > >> +/* rethook initializer */ > >> +int __init arch_init_kprobes(void) > >> +{ > >> + return register_kprobe(&trampoline_p); > >> +} > > > > No, please don't use arch_init_kprobes() for initializing rethook, since > > rethook is used from fprobe too (at this moment). > > > > If you want to make it relays on kprobes, you have to make a dependency > > in powerpc's kconfig, e.g. > > > > select HAVE_RETHOOK if KPROBES > > > > But I don't recommend it. > > Given that kretprobe has always worked this way on powerpc, I think this > is a fair tradeoff. We get to enable fprobes on powerpc only if kprobes > is also enabled. > > Longer term, it would certainly be nice to get rid of that probe, and to > expand the trampoline to directly invoke the rethook callback. OK. In longer term, rethook will be only for kretprobe, and kretprobe will be replaced by fprobe[1]. So please comment it and add that [1] https://lore.kernel.org/all/172000134410.63468.13742222887213469474.stgit@devnote2/ Thank you, > > > Thanks, > Naveen -- Masami Hiramatsu (Google) <mhira...@kernel.org>