Tamir Duberstein
fe99fa1d2e
ebpf: run clippy with target=bpf
...
This build warnings from integration tests and makes `aya-ebpf`'s build
script stricter.
2 weeks ago
Tamir Duberstein
552b69367f
xtask: remove outdated snippet
...
We handed this to QEMU in e3bfeb9dd6
.
2 weeks ago
Tamir Duberstein
bb45904b08
xtask: patch gen_init_cpio.c
...
Recent changes[0][1] have broken compatibility with macOS; add a patch
to conditionally compile these snippets.
Patch and compile the source unconditionally; caching only the network
portion is good enough and less error prone.
[0] ae18b94099
[1] 97169cd6d9
2 weeks ago
dependabot[bot]
8e31f5fa43
Merge pull request #1355 from aya-rs/dependabot/cargo/cargo-crates-7838c61200
2 weeks ago
dependabot[bot]
ace02870f2
build(deps): update cargo_metadata requirement in the cargo-crates group
...
Updates the requirements on [cargo_metadata](https://github.com/oli-obk/cargo_metadata ) to permit the latest version.
Updates `cargo_metadata` to 0.22.0
- [Release notes](https://github.com/oli-obk/cargo_metadata/releases )
- [Changelog](https://github.com/oli-obk/cargo_metadata/blob/main/CHANGELOG.md )
- [Commits](https://github.com/oli-obk/cargo_metadata/compare/0.22.0...0.22.0 )
---
updated-dependencies:
- dependency-name: cargo_metadata
dependency-version: 0.22.0
dependency-type: direct:production
dependency-group: cargo-crates
...
Signed-off-by: dependabot[bot] <support@github.com>
2 weeks ago
Tamir Duberstein
5f5305c2a8
lint all crates; enable strict pointer lints
3 weeks ago
Tamir Duberstein
ec3eacc1d8
Increase VM memory
...
Since 6.1.0-40 we're seeing `Initramfs unpacking failed: write error`.
3 weeks ago
Tamir Duberstein
d1bb7bcc38
deny clippy::unnecessary_cast
3 weeks ago
Tamir Duberstein
be4d74fd06
deny clippy::fn_to_numeric_cast{,_with_truncation}
3 weeks ago
Tamir Duberstein
fa03dbdb46
deny clippy::char_lit_as_u8
3 weeks ago
Tamir Duberstein
a7206b9098
deny clippy::cast_precision_loss
3 weeks ago
Tamir Duberstein
72104c4076
deny clippy::cast_lossless
3 weeks ago
Tamir Duberstein
82e72a14ad
Remove unused import
...
```
error: unused import: `define_linear_ds_test`
--> test/integration-ebpf/src/linear_data_structures.rs:59:5
|
59 | use define_linear_ds_test;
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D unused-imports` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(unused_imports)]`
error: could not compile `integration-ebpf` (bin "linear_data_structures") due to 1 previous error
```
3 weeks ago
Tamir Duberstein
d1fdbb9930
Update to macOS 15 ( #1351 )
3 weeks ago
Thomas Eizinger
e2a68ee384
aya-log: add `#[must_use]` attribute to `EbpfLogger`
3 weeks ago
Tamir Duberstein
30182463bd
aya-obj: explicitly enable hashbrown features
4 weeks ago
tamird
32071bdca7
public-api: regenerate
4 weeks ago
Michal R
0b2a544ddd
aya-ebpf: Add BTF array definition
...
Before this change, Aya supported only legacy BPF map definitions, which
are instances of the `bpf_map_def` struct and end up in the `maps` ELF
section.
This change introduces a BTF map definition for arrays, with custom
structs indicating the metadata of the map, which end up in the `.maps`
section.
Co-authored-by: Tamir Duberstein <tamird@gmail.com>
4 weeks ago
Michal R
e0ceb6214b
aya-obj: Remove `Safety: union` comments
...
They serve no purpose, there are no unions no unsafe operations around.
4 weeks ago
Tamir Duberstein
658ae0fbb9
aya-obj: simplify using CStr::from_bytes_until_nul
4 weeks ago
Michal R
d5e4e9270a
aya-ebpf: Remove irrelevant `FIXME` comment
...
eBPF verifier in recent kernels should be smart enough to track map
map types and catch invalid pointer casts. Rust type system makes sure
that the `get` method can return only the same type the map was created
with. Therefore, safe usage of Aya map types shouldn't cause element
type mismatches.
Manual alignment checks (`pointer::is_aligned` or manual pointer
arithmetic operations) cause the following verifier error:
```
bitwise operator &= on pointer prohibited
```
And it extremely unlikely `bpf_map_lookup_elem` ever returns a
misaligned pointer.
4 weeks 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.
4 weeks ago
Adam Schreck
263e864cd9
aya: add Map::from_map_data() for pinned map access
...
Enables creation of Map enum variants directly from MapData instances,
allowing user-space handles to pinned BPF maps without requiring the
original BPF object.
Supports multiple BPF map types.
Motivation:
- Simplifies accessing pinned maps from user space applications.
- Avoids full BPF reloads and potential deadlocks.
- Matches existing ergonomic APIs like LruHashMap::try_from.
- Keeps user code safe and idiomatic.
Closes https://github.com/aya-rs/aya/issues/1305 .
Includes test coverage to validate the new API.
4 weeks ago
Tamir Duberstein
214fe3c367
aya-log-common: seal Argument
1 month ago
Tamir Duberstein
353b83383d
aya-log-ebpf: zero copy!
1 month ago
Tamir Duberstein
3f60168d4b
ring_buf: add RingBufBytes for raw byte slices
1 month ago
Tamir Duberstein
8e2632921f
aya-log: add DST test
1 month ago
Tamir Duberstein
f537dc6684
ring_buf: destructure, avoid `as` casts
1 month ago
Tamir Duberstein
aa47acc507
aya-log-ebpf: allow macros in expr position
...
This is load-bearing in aya-template.
1 month ago
Tamir Duberstein
222b2cb88f
.github: avoid spurious CI failures in forks
...
This spams my email every day.
1 month ago
Xiaobo Liu
53ec616411
ebpf: add peak() method to Queue and Stack
...
Add integration tests covering push,pop,peek for both types.
Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
Signed-off-by: Tamir Duberstein <tamird@gmail.com>
1 month ago
Addison Crump
f6606473af
aya-log: properly hint log level to verifier
...
The log level implementation in b36cbc3eb8
was incomplete as the verifier could reject programs which exceeded
their instruction limits within logging statements. This commit
addresses this issue by making the log level static variable immutable
(s.t. the compiler puts it in a read-only section) and adds an
additional test which the verifier will reject as an infinite loop iff
it is unable to detect that the static variable would otherwise allow
the logging.
1 month ago
Tamir Duberstein
b36cbc3eb8
implement load-time log level mask
1 month ago
dependabot[bot]
a0b63b8811
build(deps): bump the cargo-crates group with 2 updates ( #1333 )
1 month ago
tamird
23cbab571c
aya-obj, aya-ebpf-bindings: regenerate
...
libbpf commit: 20ea95b4505c477af3b6ff6ce9d19cee868ddc5d
2 months ago
dependabot[bot]
9261554e3c
build(deps): bump the cargo-crates group with 2 updates
...
Updates the requirements on [dialoguer](https://github.com/console-rs/dialoguer ) and [network-types](https://github.com/vadorovsky/network-types ) to permit the latest version.
Updates `dialoguer` to 0.11.0
- [Changelog](https://github.com/console-rs/dialoguer/blob/main/CHANGELOG.md )
- [Commits](https://github.com/console-rs/dialoguer/compare/v0.11.0...v0.11.0 )
Updates `network-types` to 0.0.8
- [Release notes](https://github.com/vadorovsky/network-types/releases )
- [Changelog](https://github.com/vadorovsky/network-types/blob/main/CHANGELOG.md )
- [Commits](https://github.com/vadorovsky/network-types/compare/v0.0.8...v0.0.8 )
---
updated-dependencies:
- dependency-name: dialoguer
dependency-version: 0.11.0
dependency-type: direct:production
dependency-group: cargo-crates
- dependency-name: network-types
dependency-version: 0.0.8
dependency-type: direct:production
dependency-group: cargo-crates
...
Signed-off-by: dependabot[bot] <support@github.com>
2 months ago
Xiaobo Liu
4fe920f761
xtask: add the target method to Architecture
...
Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
2 months ago
dependabot[bot]
2869cb884c
build(deps): update cargo_metadata requirement in the cargo-crates group
...
Updates the requirements on [cargo_metadata](https://github.com/oli-obk/cargo_metadata ) to permit the latest version.
Updates `cargo_metadata` to 0.21.0
- [Release notes](https://github.com/oli-obk/cargo_metadata/releases )
- [Changelog](https://github.com/oli-obk/cargo_metadata/blob/main/CHANGELOG.md )
- [Commits](https://github.com/oli-obk/cargo_metadata/compare/0.21.0...0.21.0 )
---
updated-dependencies:
- dependency-name: cargo_metadata
dependency-version: 0.21.0
dependency-type: direct:production
dependency-group: cargo-crates
...
Signed-off-by: dependabot[bot] <support@github.com>
2 months ago
Tamir Duberstein
a01b1d8b76
.github: build bpf-linker with llvm-21
2 months ago
dependabot[bot]
9a367c11b0
build(deps): bump actions/checkout in the github-actions group
...
Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout ).
Updates `actions/checkout` from 4 to 5
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](https://github.com/actions/checkout/compare/v4...v5 )
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-version: '5'
dependency-type: direct:production
update-type: version-update:semver-major
dependency-group: github-actions
...
Signed-off-by: dependabot[bot] <support@github.com>
2 months ago
Tamir Duberstein
a3aa387a2e
remove superfluous commas
2 months ago
Tamir Duberstein
0d1193720b
doc: generate docs in macro
...
Remove a bunch of repetition and missing links.
2 months ago
Tamir Duberstein
9996f7a300
Allow `+debN` kernels
...
Seems 6.12 is now being marked `+deb13`.
2 months ago
Tamir Duberstein
8ee12d337f
doc: fix rustdoc link in macro
...
`$wrapper` is not visible to rustdoc before expansion. Build the link
after expansion.
2 months ago
dependabot[bot]
fff92f8529
Merge pull request #1311 from aya-rs/dependabot/cargo/cargo-crates-0a212f8889
2 months ago
Tamir Duberstein
5b9d432a61
github: fix PR triggers
2 months ago
Tamir Duberstein
5b8c4ed630
public-api: fix argument comment
2 months ago
dependabot[bot]
c251ec82c0
build(deps): update public-api requirement in the cargo-crates group
...
Updates the requirements on [public-api](https://github.com/cargo-public-api/cargo-public-api ) to permit the latest version.
Updates `public-api` to 0.49.0
- [Release notes](https://github.com/cargo-public-api/cargo-public-api/releases )
- [Changelog](https://github.com/cargo-public-api/cargo-public-api/blob/main/CHANGELOG.md )
- [Commits](https://github.com/cargo-public-api/cargo-public-api/compare/public-api-v0.49.0...public-api-v0.49.0 )
---
updated-dependencies:
- dependency-name: public-api
dependency-version: 0.49.0
dependency-type: direct:production
dependency-group: cargo-crates
...
Signed-off-by: dependabot[bot] <support@github.com>
2 months ago
Xiaobo Liu
44ec978bd3
aya-log: Implement `AsFd` for `EbpfLogger`
...
This change implements the `AsFd` trait for the `EbpfLogger` struct.
This allows obtaining a `BorrowedFd` from an `EbpfLogger` instance, which is safer than using `AsRawFd`.
This improves the ergonomics of using `EbpfLogger` with APIs that accept file descriptors.
Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
3 months ago
dependabot[bot]
f635d80708
build(deps): bump the cargo-crates group across 1 directory with 2 updates
...
Updates the requirements on [cargo_metadata](https://github.com/oli-obk/cargo_metadata ) and [public-api](https://github.com/cargo-public-api/cargo-public-api ) to permit the latest version.
Updates `cargo_metadata` to 0.20.0
- [Release notes](https://github.com/oli-obk/cargo_metadata/releases )
- [Changelog](https://github.com/oli-obk/cargo_metadata/blob/main/CHANGELOG.md )
- [Commits](https://github.com/oli-obk/cargo_metadata/compare/0.20.0...0.20.0 )
Updates `public-api` to 0.48.0
- [Release notes](https://github.com/cargo-public-api/cargo-public-api/releases )
- [Changelog](https://github.com/cargo-public-api/cargo-public-api/blob/main/CHANGELOG.md )
- [Commits](https://github.com/cargo-public-api/cargo-public-api/compare/public-api-v0.48.0...public-api-v0.48.0 )
---
updated-dependencies:
- dependency-name: cargo_metadata
dependency-version: 0.20.0
dependency-type: direct:production
dependency-group: cargo-crates
- dependency-name: public-api
dependency-version: 0.48.0
dependency-type: direct:production
dependency-group: cargo-crates
...
Signed-off-by: dependabot[bot] <support@github.com>
3 months ago