Commit Graph

2110 Commits (dbffe0ebbbd0a4083c3601ae232582d6599e216b)
 

Author SHA1 Message Date
Dave Tucker dbffe0ebbb
Merge 480859a8da into 214fe3c367 3 days ago
Tamir Duberstein 214fe3c367
aya-log-common: seal Argument 3 days ago
Tamir Duberstein 353b83383d
aya-log-ebpf: zero copy! 3 days ago
Tamir Duberstein 3f60168d4b
ring_buf: add RingBufBytes for raw byte slices 4 days ago
Tamir Duberstein 8e2632921f
aya-log: add DST test 4 days ago
Tamir Duberstein f537dc6684
ring_buf: destructure, avoid `as` casts 4 days ago
Tamir Duberstein aa47acc507
aya-log-ebpf: allow macros in expr position
This is load-bearing in aya-template.
6 days ago
Tamir Duberstein 222b2cb88f
.github: avoid spurious CI failures in forks
This spams my email every day.
6 days 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>
7 days 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 week ago
Tamir Duberstein b36cbc3eb8
implement load-time log level mask 1 week ago
dependabot[bot] a0b63b8811
build(deps): bump the cargo-crates group with 2 updates (#1333) 1 week ago
tamird 23cbab571c aya-obj, aya-ebpf-bindings: regenerate
libbpf commit: 20ea95b4505c477af3b6ff6ce9d19cee868ddc5d
2 weeks 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>
3 weeks ago
Xiaobo Liu 4fe920f761 xtask: add the target method to Architecture
Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
3 weeks 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>
4 weeks ago
Tamir Duberstein a01b1d8b76
.github: build bpf-linker with llvm-21 4 weeks 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>
1 month ago
Tamir Duberstein a3aa387a2e
remove superfluous commas 1 month ago
Tamir Duberstein 0d1193720b
doc: generate docs in macro
Remove a bunch of repetition and missing links.
1 month ago
Tamir Duberstein 9996f7a300
Allow `+debN` kernels
Seems 6.12 is now being marked `+deb13`.
1 month ago
Tamir Duberstein 8ee12d337f
doc: fix rustdoc link in macro
`$wrapper` is not visible to rustdoc before expansion. Build the link
after expansion.
1 month ago
dependabot[bot] fff92f8529
Merge pull request #1311 from aya-rs/dependabot/cargo/cargo-crates-0a212f8889 1 month ago
Tamir Duberstein 5b9d432a61
github: fix PR triggers 1 month ago
Tamir Duberstein 5b8c4ed630
public-api: fix argument comment 1 month 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>
1 month 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>
2 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>
2 months ago
Xiaobo Liu 0b732c3d46 aya-log: simplify map name matching using direct Option comparison
Replace match statement with direct Option comparison for cleaner code

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
2 months ago
Xiaobo Liu cab559b9d9 aya-log: Use `None` instead of wildcard in `Format` impls
The `Format` implementations for various types were using a wildcard `_`
to match the `None` case on `Option<DisplayHint>`.

This is incorrect as it would also match any `Some(...)` variants that
were not explicitly handled, leading to unexpected behavior.

This commit changes the wildcard `_` to an explicit `None` match to
ensure that only the `None` case is handled, making the matching more
explicit and correct.

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
2 months ago
Michal Rostecki 727dfcd7ee
ci: Fix bpf-linker installation (#1295)
We've recently added an xtask to bpf-linker (aya-rs/bpf-linker#282),
which resulted in multiple binary targets. Therefore, bpf-linker has
to be installed with the following command:

```
cargo install --git https://github.com/aya-rs/bpf-linker.git bpf-linker
```

The last argument (`bpf-linker`) specifies the binary target.
2 months ago
Tamir Duberstein 35332f2288
aya: remove `AsyncPerfEventArray{,Buffer}`
Rather than support N async runtimes, push this to the user. The
relevant types (`PerfEventArrayBuffer` and `RingBuffer`) implement
`As{,Raw}Fd` which is sufficient with integration with tokio, smol, and
other async runtimes.
2 months ago
Thomas Bertschinger ab182be622 aya: `construct_debuglink_path()` should be infallible
`construct_debuglink_path()` returns a `Result`, but it doesn't actually
do anything that can fail. This means callers must do a useless
`unwrap()` to get at the return value.

This fixes the signature to reflect that the function is infallible.
2 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.
2 months ago
Tamir Duberstein 61376c4608
aya-log: Remove tokio dep
Require the caller to provide their own executor.
2 months ago
Tamir Duberstein 3f02127b6b
aya: `impl AsFd for RingBuf`
This bound is needed for e.g. `smol::Async`.
2 months ago
Tamir Duberstein 9be2d723ce
aya-log: Replace AsyncPerfEventArray with RingBuf
This doesn't get us to zero copy because the reserve/submit APIs do not
support DSTs for reasons I don't remember.

Now that it is unused in userspace, move `LOG_BUF_CAPACITY` to
`aya-log-ebpf` by making its type `LogValueLength` which obviates the
need for `log_value_length_sufficient`.
2 months ago
Tamir Duberstein 8fb19264da
aya-log-ebpf: tidy up `macro_support`
Move top level items into and remove unused items from `macro_support`.
2 months ago
Tamir Duberstein 600927d6fc
aya-log-ebpf: use destructuring 2 months ago
Tamir Duberstein 90c2165231
Avoid shadowing `buf` 2 months ago
Tamir Duberstein 6a9ef2b43b
Replace macros with loops 2 months ago
Tamir Duberstein 87188f621a
Remove pointless `map_err` calls 2 months ago
Tamir Duberstein 44b26b3b50 integration-test: use only readable interest 2 months ago
Tamir Duberstein 5fa52ac5c1 integration-test: remove an allocation 2 months ago
Tamir Duberstein f08772ec2f test-distro: enable rust backtrace 2 months ago
dependabot[bot] cfff75166c 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.47.1
- [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.47.0...public-api-v0.47.1)

---
updated-dependencies:
- dependency-name: public-api
  dependency-version: 0.47.1
  dependency-type: direct:production
  dependency-group: cargo-crates
...

Signed-off-by: dependabot[bot] <support@github.com>
3 months ago
Tamir Duberstein 30d5c9f53e Remove dead code expectation fixed upstream
See https://github.com/rust-lang/rust/commit/c93fac7d64394c6b926d863c19.
3 months ago
tamird bd0424ca61 aya-obj, aya-ebpf-bindings: regenerate
libbpf commit: 20ea95b4505c477af3b6ff6ce9d19cee868ddc5d
3 months ago
Tamir Duberstein eda29958f8 Use CRABBY_GITHUB_TOKEN for regen PRs
See https://github.com/peter-evans/create-pull-request/issues/48.
3 months ago
dependabot[bot] 6d5826fe99
Merge pull request #1277 from aya-rs/dependabot/cargo/cargo-crates-2948a9e609 3 months ago