From: Naveen N Rao <naveen@kernel.org>
To: Abhishek Dubey <adubey@linux.ibm.com>,
Masami Hiramatsu <mhiramat@kernel.org>
Cc: naveen.n.rao@linux.vnet.ibm.com, linuxppc-dev@lists.ozlabs.org,
npiggin@gmail.com
Subject: Re: [PATCH v3] PowerPC: Replace kretprobe with rethook
Date: Tue, 09 Jul 2024 12:28:29 +0530 [thread overview]
Message-ID: <1720508281.2dd5hnh2rv.naveen@kernel.org> (raw)
In-Reply-To: <20240702085302.90ab3214b8b6e39614bb8d11@kernel.org>
Masami Hiramatsu wrote:
> On Thu, 27 Jun 2024 09:21:01 -0400
> Abhishek Dubey <adubey@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.
Thanks,
Naveen
next prev parent reply other threads:[~2024-07-09 7:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-27 13:21 [PATCH v3] PowerPC: Replace kretprobe with rethook Abhishek Dubey
2024-07-01 15:31 ` Naveen N Rao
2024-07-01 23:53 ` Masami Hiramatsu
2024-07-09 6:58 ` Naveen N Rao [this message]
2024-07-09 13:58 ` Masami Hiramatsu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1720508281.2dd5hnh2rv.naveen@kernel.org \
--to=naveen@kernel.org \
--cc=adubey@linux.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mhiramat@kernel.org \
--cc=naveen.n.rao@linux.vnet.ibm.com \
--cc=npiggin@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).