Linux DTrace development list
 help / color / mirror / Atom feed
* [PATCH] Fix fprobe/kprobe selection
@ 2025-02-19 21:51 eugene.loh
  2025-02-19 22:13 ` [DTrace-devel] " Kris Van Hees
  0 siblings, 1 reply; 2+ messages in thread
From: eugene.loh @ 2025-02-19 21:51 UTC (permalink / raw)
  To: dtrace, dtrace-devel

From: Eugene Loh <eugene.loh@oracle.com>

In commit 2a09b3bea504 ("fbt: clean up fprobe/kprobe support"),
libdtrace/dt_prov_fbt.c populate() has this change:

    - impl = BPF_HAS(dtp, BPF_FEAT_FENTRY) ? &dt_fbt_fprobe : &dt_fbt_kprobe;
    + dt_fbt = BPF_HAS(dtp, BPF_FEAT_FENTRY) ? dt_fbt_kprobe : dt_fbt_kprobe;

That is, regardless of the BPF_HAS() test, dt_fbt_kprobe is chosen.

Restore the choice to pick up dt_fbt_fprobe when appropriate.

It is hard to devise a test for this unique problem.

Signed-off-by: Eugene Loh <eugene.loh@oracle.com>
---
 libdtrace/dt_prov_fbt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libdtrace/dt_prov_fbt.c b/libdtrace/dt_prov_fbt.c
index f0910c371..eef93879d 100644
--- a/libdtrace/dt_prov_fbt.c
+++ b/libdtrace/dt_prov_fbt.c
@@ -75,7 +75,7 @@ static int populate(dtrace_hdl_t *dtp)
 	dtrace_syminfo_t	sip;
 	dtrace_probedesc_t	pd;
 
-	dt_fbt = BPF_HAS(dtp, BPF_FEAT_FENTRY) ? dt_fbt_kprobe : dt_fbt_kprobe;
+	dt_fbt = BPF_HAS(dtp, BPF_FEAT_FENTRY) ? dt_fbt_fprobe : dt_fbt_kprobe;
 
 	prv = dt_provider_create(dtp, prvname, &dt_fbt, &pattr, NULL);
 	if (prv == NULL)
-- 
2.43.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-02-19 22:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-19 21:51 [PATCH] Fix fprobe/kprobe selection eugene.loh
2025-02-19 22:13 ` [DTrace-devel] " Kris Van Hees

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox