Re: [PATCH v3] PowerPC: Replace kretprobe with rethook

From
Naveen N Rao <naveen@kernel.org>
Date
2024-07-09 07:08:20
Reply to
Masami Hiramatsu (Google), 2024-07-01
Masami Hiramatsu wrote:
On Thu, 27 Jun 2024 09:21:01 -0400
Abhishek Dubey [off-list ref] wrote:
quoted
+/* 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.


Thanks,
Naveen
Thread (5 messages) 5 messages, 3 authors, last reply 2024-07-09
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help