Thread (6 messages) 6 messages, 2 authors, 2021-09-28

Re: [PATCH bpf-next v3 2/3] libbpf: support detecting and attaching of writable tracepoint program

From: Andrii Nakryiko <hidden>
Date: 2021-09-28 23:11:37
Also in: bpf

On Tue, Sep 28, 2021 at 6:53 AM Hou Tao [off-list ref] wrote:
quoted hunk ↗ jump to hunk
Program on writable tracepoint is BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE,
but its attachment is the same as BPF_PROG_TYPE_RAW_TRACEPOINT.

Signed-off-by: Hou Tao <redacted>
---
 tools/lib/bpf/libbpf.c | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
index ef5db34bf913..b874c0179084 100644
--- a/tools/lib/bpf/libbpf.c
+++ b/tools/lib/bpf/libbpf.c
@@ -7976,6 +7976,10 @@ static const struct bpf_sec_def section_defs[] = {
                .attach_fn = attach_raw_tp),
        SEC_DEF("raw_tp/", RAW_TRACEPOINT,
                .attach_fn = attach_raw_tp),
+       SEC_DEF("raw_tracepoint.w/", RAW_TRACEPOINT_WRITABLE,
+               .attach_fn = attach_raw_tp),
+       SEC_DEF("raw_tp.w/", RAW_TRACEPOINT_WRITABLE,
+               .attach_fn = attach_raw_tp),
Unfortunately I just refactored these SEC_DEF() definitions, please
rebase because this won't apply cleanly anymore. Otherwise it looks
good to me.
        SEC_DEF("tp_btf/", TRACING,
                .expected_attach_type = BPF_TRACE_RAW_TP,
                .is_attach_btf = true,
--
2.29.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help