* [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
* Re: [DTrace-devel] [PATCH] Fix fprobe/kprobe selection
2025-02-19 21:51 [PATCH] Fix fprobe/kprobe selection eugene.loh
@ 2025-02-19 22:13 ` Kris Van Hees
0 siblings, 0 replies; 2+ messages in thread
From: Kris Van Hees @ 2025-02-19 22:13 UTC (permalink / raw)
To: eugene.loh; +Cc: dtrace, dtrace-devel
On Wed, Feb 19, 2025 at 04:51:42PM -0500, eugene.loh--- via DTrace-devel wrote:
> 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>
Reviewed-by: Kris Van Hees <kris.van.hees@oracle.com>
and my aplogies for introducing this problem. I believe it was caused by
needing to force test verification in the case that the kprobe option was
selected on a system, and I clearly forgot to revert that before preparing
the actual patch.
Kris
> ---
> 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
>
>
> _______________________________________________
> DTrace-devel mailing list
> DTrace-devel@oss.oracle.com
> https://oss.oracle.com/mailman/listinfo/dtrace-devel
^ permalink raw reply [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