linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: Naveen N Rao <naveen@kernel.org>
Cc: naveen.n.rao@linux.vnet.ibm.com, linuxppc-dev@lists.ozlabs.org,
	npiggin@gmail.com, Abhishek Dubey <adubey@linux.ibm.com>
Subject: Re: [PATCH v3] PowerPC: Replace kretprobe with rethook
Date: Tue, 9 Jul 2024 22:58:45 +0900	[thread overview]
Message-ID: <20240709225845.43cc72b8b691217ec428d3a0@kernel.org> (raw)
In-Reply-To: <1720508281.2dd5hnh2rv.naveen@kernel.org>

On Tue, 09 Jul 2024 12:28:29 +0530
Naveen N Rao <naveen@kernel.org> wrote:

> 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.

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) <mhiramat@kernel.org>

      reply	other threads:[~2024-07-09 13:59 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
2024-07-09 13:58     ` Masami Hiramatsu [this message]

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=20240709225845.43cc72b8b691217ec428d3a0@kernel.org \
    --to=mhiramat@kernel.org \
    --cc=adubey@linux.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=naveen.n.rao@linux.vnet.ibm.com \
    --cc=naveen@kernel.org \
    --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).