Repository navigation
Conversation
44c45c3 to
495a3d9
Compare
495a3d9 to
96710c5
Compare
|
@olsajiri #2116 introduces 7.2 (and 7.3 when new verifier log parser lands) to CI. Please also take a look if the tracing_multi_* tests can be fixed. I'm not sure how they're supposed to work after you've introduced skeletons to the selftests. Perhaps these just need to be cleaned up after linking, not sure. |
awesome! thanks
ok, will check |
96710c5 to
48cb80b
Compare
There was a problem hiding this comment.
🟡 Changes recommended
Program FD lifetime is unsafe during attachment, and type-specific tracing-multi link metadata is inaccessible.
2 open findings
What changed in this PR
Adds Linux 7.2 tracing-multi link support for attaching tracing programs to multiple kernel functions.
Changes:
- Adds tracing-multi attach types, syscall plumbing, link wrapping, and feature detection.
- Adds attachment/input tests and ELF section mappings.
- Documents new section names.
AIL: 4
| File | Description |
|---|---|
types.go |
Exposes tracing-multi attach types. |
link/tracing_multi.go |
Implements tracing-multi attachment. |
link/tracing_multi_test.go |
Tests attachment and validation. |
link/link_other.go |
Recognizes tracing-multi links. |
internal/sys/tracing_multi.go |
Defines link-create syscall attributes. |
internal/kfunc/kfunc.go |
Resolves kernel function BTF IDs. |
features/link.go |
Adds kernel feature detection. |
features/link_test.go |
Tests feature detection. |
elf_reader_test.go |
Tests tracing-multi ELF sections. |
docs/ebpf/concepts/section-naming.md |
Documents section names. |
attachtype_string.go |
Adds attach-type string mappings. |
Files not reviewed (1)
- attachtype_string.go: Generated file
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| attr.Cookies = sys.SlicePointer(opts.Cookies) | ||
| } | ||
|
|
||
| fd, err := sys.LinkCreateTracingMulti(attr) |
| type tracingMulti struct { | ||
| RawLink | ||
| } |
d67f162 to
4a19e18
Compare
Making sure it gets tested as other section types. Signed-off-by: Jiri Olsa <jolsa@kernel.org>
AIL: 2 Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Adding the syscall types needed to read tracing_multi link info. AIL: 2 Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Exposesing attach types through the public ebpf API. AIL: 2 Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Add a feature probe for tracing_multi link support. AIL: 2 Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Adding tests for both kfunc lookup modes. AIL: 2 Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Implementing the link.AttachTracingMulti for attaching tracing program to multiple kernel functions via tracing_multi link. Adding support for FEntry, FExit, and FSession multi-attach modes and attachment cookies. AIL: 2 Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Adding support for retrieving tracing_multi link data through link.Info() as a TracingMultiInfo object. TracingMultiInfo.Targets() returns each target’s BTF ID, address and cookie. AIL: 2 Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Adding tests for tracing_multi link attachment. AIL: 2 Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Adding test for retrieving tracing_multi link targets. AIL: 2 Signed-off-by: Jiri Olsa <jolsa@kernel.org>
4a19e18 to
d96bca7
Compare

wip