Commit Graph

7 Commits (63d0505a379479d51c74feac5e03b55ce8b7c9cc)

Author SHA1 Message Date
swananan ee9d35a200 uprobe: bundle attach location+cookie via UProbeAttachPoint
This follows the #1417 review discussion: by bundling location
+ cookie into a UProbeAttachPoint we get a more idiomatic Into<_>
entry point, keep the one-to-one relationship enforced by the type
system, and make it easier to extend attach with multi-location
support without introducing parallel arrays or a brand new API.
4 days ago
Andrew Werner 03e8487177 aya: rename `set_` methods on `EbpfLoader`
This loader is more of a builder, so these `set_` methods didn't
quite fit. See [this discussion][1] for the motivation.

[1]: https://reviewable.io/reviews/aya-rs/aya/1318#gh-2384180366
2 months ago
Tamir Duberstein e5306901a0
Skip `test_uprobe_cookie` on kernel < 5.15 2 months ago
Tamir Duberstein 5f5305c2a8
lint all crates; enable strict pointer lints 3 months ago
Tamir Duberstein 0b1fbe1cd3
integration-test: add missing `test_log` decorator
Use the fully qualified macro name which composes better with
`test_case` and makes it easier to spot cases where it is missing.
6 months ago
Tamir Duberstein f0a9f19ddc Bump edition to 2024
Change FromRawTracepointArgs::arg to return T rather than *const T which
seems to have been returning a dangling pointer.

Arguably this is not strictly necessary; edition 2024 seems to be
focused on increased strictness around unsafe code which doesn't unlock
new functionality for our users. That said, this work revealed an
apparent bug (see above) that we wouldn't otherwise catch due to
allow-by-default lints.
10 months ago
Andrew Werner 628b7fb022 aya::programs::uprobe: add support for cookies
Fixes #1132.

Note that this change does not add support in the public API for kprobes
or tracepoints, but it's a trivial matter of plumbing.

Along the way, the Uprobe::attach API is cleaned up to make the
attachment location more coherent. The logic being: if we're going to be
breaking the API anyway, may as well clean it up a bit.

Furthermore, the aya::sys::bpf_link_attach function is cleaned up by
properly modeling the the union in the final field with a rust enum.
11 months ago