bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [QUESTION] usage of libbpf_probe_bpf_prog_type API
@ 2023-03-30 17:12 andrea terzolo
  2023-04-04 22:32 ` Andrii Nakryiko
  0 siblings, 1 reply; 7+ messages in thread
From: andrea terzolo @ 2023-03-30 17:12 UTC (permalink / raw)
  To: bpf

Hi all!

If I can I would like to ask one question about the
`libbpf_probe_bpf_prog_type` API. The idea is to use `fentry/fexit`
bpf progs only if they are available and fall back to simple `kprobes`
when they are not. Is there a way to probe `BPF_TRACE_FENTRY` support
with `libbpf` APIs? I was looking at `libbpf_probe_bpf_prog_type` API
but it seems to check the `prog_type` rather than the `attach_type`,
when I call it `libbpf_probe_bpf_prog_type(BPF_PROG_TYPE_TRACING,
NULL);` it returns `1` even if `fentry/fexit` progs are not supported
on my machine. Is there a way to probe this feature with other
`libbpf` APIs?

Thank you in advance for your time,
Andrea

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

end of thread, other threads:[~2023-04-21 16:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-30 17:12 [QUESTION] usage of libbpf_probe_bpf_prog_type API andrea terzolo
2023-04-04 22:32 ` Andrii Nakryiko
2023-04-08 13:34   ` andrea terzolo
2023-04-12 18:48     ` Andrii Nakryiko
2023-04-13 21:37       ` andrea terzolo
2023-04-17 23:48         ` Andrii Nakryiko
2023-04-21 16:34           ` andrea terzolo

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