Commit Graph

7 Commits (d5cb3dd6b57c79cb42a6148da2c4e86768292038)

Author SHA1 Message Date
Michal R d5cb3dd6b5 aya-ebpf: Make use of `Borrow` and `BorrowMut` in map methods
Let callers pass either owned objects or references. We do that already
in the user-space methods.
1 month ago
Tamir Duberstein 5f5305c2a8
lint all crates; enable strict pointer lints 1 month ago
Michal R 3569c9afc3 aya-ebpf: Take `c_void` instead of `bpf_map_def` in map helpers
`bpf_map_def` is a legacy map definition. To be able to introduce BTF
map definitions, make the `lookup` and `remove` helpers work with
`c_void` and let the callers cast the map types to it.
2 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.
8 months ago
Tamir Duberstein ea5f7e3015 Reduce the scope of expected warnings
This fixes a few safety comments to avoid the warnings.
8 months ago
Tamir Duberstein 601c89dd23 aya-ebpf: extract insert,remove,lookup
These functions (and more) are duplicated all over the place.
8 months ago
Dave Tucker 41c61560ea chore(aya-ebpf): Rename bpf -> ebpf
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
2 years ago