Commit Graph

1840 Commits (0bf67c3ce5c1f4a16089af42c37abc6b2b8cb6f9)
 

Author SHA1 Message Date
dependabot[bot] 0bf67c3ce5
Merge pull request #1095 from aya-rs/dependabot/cargo/cargo-crates-ed849d205f 2 months ago
Tamir Duberstein 5ab67dce08
Use TargetKind enum and Target::is_proc_macro
These are added in cargo_metadata 0.19.0.
2 months ago
dependabot[bot] ea139050cf
build(deps): bump the cargo-crates group 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.18.1
- [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.18.0...0.18.1)

Updates `public-api` to 0.41.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.41.0...public-api-v0.41.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2 months ago
Michal Rostecki c6ec4f9b80 chore: Pin `libc` to `0.2.163`
`0.2.164` and `0.2.165` are affected by rust-lang/libc#4149. Pin the
last working version until a proper fix is released.
2 months ago
Tamir Duberstein 119049f2a2 Define `{detach,take_link}` in macro when possible 2 months ago
Michal Rostecki 85c73af1fe doc(aya): Improve the description of `take_link` methods
Don't mix the tenses.
2 months ago
Michal Rostecki bf2164c92f feat(aya): Add iterator program type
BPF iterators[0] are a way to dump kernel data into user-space and an
alternative to `/proc` filesystem.

This change adds support for BPF iterators on the user-space side. It
provides a possibility to retrieve the outputs of BPF iterator programs
both from sync and async Rust code.

[0] https://docs.kernel.org/bpf/bpf_iterators.html
2 months ago
Kursat Aktas c81f5e475e
Introducing Aya Guru on Gurubase.io (#1085)
Introducing Aya Guru on Gurubase.io

Signed-off-by: Kursat Aktas <kursat.ce@gmail.com>
2 months ago
Tamir Duberstein a77db17ec8 cargo fmt 2 months ago
banditopazzo a16755089b Avoid warning with `allow_unsupported_maps`
Remove the warning log altogether; either it's an error or it isn't.
2 months ago
Michal Rostecki 0b58d3eb6d bpf: Add `bpf_strncmp` helper
The `bpf_strncmp` helper allows for better string comparison in eBPF
programs.

Added in https://github.com/torvalds/linux/commit/c5fb19937455095573a19.
2 months ago
Tamir Duberstein 2e4650e5a5 integration: alphabetize 2 months ago
dependabot[bot] 9e3de444ec build(deps): bump DavidAnson/markdownlint-cli2-action
Bumps the github-actions group with 1 update: [DavidAnson/markdownlint-cli2-action](https://github.com/davidanson/markdownlint-cli2-action).


Updates `DavidAnson/markdownlint-cli2-action` from 17 to 18
- [Release notes](https://github.com/davidanson/markdownlint-cli2-action/releases)
- [Commits](https://github.com/davidanson/markdownlint-cli2-action/compare/v17...v18)

---
updated-dependencies:
- dependency-name: DavidAnson/markdownlint-cli2-action
  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
dependabot[bot] 68ec40fe12
Merge pull request #1090 from aya-rs/dependabot/cargo/cargo-crates-1611d6c133 2 months ago
dependabot[bot] f20a09d053
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.40.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.40.0...public-api-v0.40.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2 months ago
tamird e423fce58f public-api: regenerate 2 months ago
tamird 5075adc01d public-api: regenerate 2 months ago
Tamir Duberstein 08becfdfa8 ci: automatically open PRs to update public API
This is annoying and I'd like to stop doing it.
2 months ago
dependabot[bot] 103eed1395
Merge pull request #1079 from aya-rs/dependabot/cargo/cargo-crates-bfb59a9473 2 months ago
Tamir Duberstein e95a54f593
build(deps): update thiserror to 2.0.3
This removes the fake std module in aya-obj which is no longer needed as
thiserror now properly supports no_std.

Signed-off-by: Tamir Duberstein <tamird@gmail.com>
2 months ago
Tamir Duberstein fbbc2ec050 ci: automatically download latest kernel revs
Let's get off the treadmill.

Switch (almost) all wget usages to curl.
2 months ago
Tamir Duberstein e3bfeb9dd6 Allow QEMU to fall back 3 months ago
dependabot[bot] 05623a0eb7
Merge pull request #1076 from aya-rs/dependabot/cargo/cargo-crates-c08699da63 3 months ago
dependabot[bot] e67a21265b
build(deps): update which requirement in the cargo-crates group
Updates the requirements on [which](https://github.com/harryfei/which-rs) to permit the latest version.

Updates `which` to 6.0.3
- [Release notes](https://github.com/harryfei/which-rs/releases)
- [Changelog](https://github.com/harryfei/which-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/harryfei/which-rs/compare/6.0.0...6.0.3)

---
updated-dependencies:
- dependency-name: which
  dependency-type: direct:production
  dependency-group: cargo-crates
...

Signed-off-by: dependabot[bot] <support@github.com>
3 months ago
Dave Tucker 2791badd94 Release aya v0.13.1
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
3 months ago
Dave Tucker c6a34cade1 Release aya-obj v0.2.1
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
3 months ago
Dave Tucker b2ac9fe85d
Merge pull request #1073 from dave-tucker/reloc-bug
fix(aya): BSS Sections must be filled with zeros
3 months ago
Dave Tucker ca0c32d107 fix(aya): Fill bss maps with zeros
The loader should fill bss maps with zeros according to the size of the
ELF section.
Failure to do so yields weird verifier messages as follows:

```
cannot access ptr member ops with moff 0 in struct bpf_map with off 0 size 4
```

Reference to this in the cilium/ebpf code is here [1].
I could not find a reference in libbpf.

1: d0c8fc1937/elf_reader.go (L1159-L1165)

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
3 months ago
Dave Tucker 3aa2745972 test(init): run test with debug logs
This provides more useful failure messages when integration tests fail

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
3 months ago
Dave Tucker adf16e2102 test: Reproduce relocation bug
Users have reported issues with programs failing the verifier when they
are attempting to read or write to variables that the compiler places in
the .bss section. Add a test that places variables in each section and
exercises read and write operations on them.

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
3 months ago
Tamir Duberstein f9b34fe76f qemu: remove bios argument
I did this for arm64 because we'd get a black screen without it but I
have now confirmed that console=ttyAMA0 solves that problem.

I don't remember why I did it for x86.
3 months ago
Tamir Duberstein 298e2a751c Update public-api to 0.40.0 3 months ago
Tamir Duberstein 240291ab81 Update public-api to 0.39.0 3 months ago
Tamir Duberstein 758a4f9d1e Remove workspace members from workspace.dependencies
Doesn't make much sense to have them here.
3 months ago
Dave Tucker 59b3873a92
Merge pull request #1055 from aya-rs/codegen
Update libbpf to 80b16457cb23db4d633b17ba0305f29daa2eb307
3 months ago
dave-tucker f8ad84c3d3 [codegen] Update libbpf to 80b16457cb23db4d633b17ba0305f29daa2eb307
Update libbpf to 80b16457cb23db4d633b17ba0305f29daa2eb307

Files changed:
M	aya-obj/src/generated/btf_internal_bindings.rs
M	aya-obj/src/generated/linux_bindings_aarch64.rs
M	aya-obj/src/generated/linux_bindings_armv7.rs
M	aya-obj/src/generated/linux_bindings_powerpc64.rs
M	aya-obj/src/generated/linux_bindings_riscv64.rs
M	aya-obj/src/generated/linux_bindings_s390x.rs
M	aya-obj/src/generated/linux_bindings_x86_64.rs
3 months ago
Tyrone Wu 366c599c20 codegen: cgroup_iter_order NFPROTO* nf_inet_hooks
Adds the following to codegen:
- `bpf_cgroup_iter_order`: used in `bpf_link_info.iter.group.order`
- `NFPROTO_*`: used in `bpf_link_info.netfilter.pf`
- `nf_inet_hooks`: used in `bpf_link_info.netfilter.hooknum`

Include `linux/netfilter.h` in `linux_wrapper.h` for `NFPROTO_*` and
`nf_inet_hooks` to generate.
3 months ago
Dave Tucker 0e70838b0f Release aya-log v0.2.1
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
3 months ago
Dave Tucker 04bbbccffa Release aya-log-common v0.1.15, aya-log-ebpf v0.1.1 3 months ago
Dave Tucker c3f0c7dc3f chore: Prepare for aya-log-ebpf release
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
3 months ago
Dave Tucker 59082f572c Release aya-ebpf-cty v0.2.2, aya-ebpf-bindings v0.1.1, aya-ebpf-macros v0.1.1, aya-ebpf v0.1.1
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
3 months ago
Dave Tucker c169b727e6 Release aya-obj v0.2.0, aya v0.13.0, safety bump aya v0.13.0
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
3 months ago
astoycos 5478cac008 feat(aya): Implement TCX
This commit adds the initial support for TCX
bpf links. This is a new, multi-program, attachment
type allows for the caller to specify where
they would like to be attached relative to other
programs at the attachment point using the LinkOrder
type.

Signed-off-by: astoycos <astoycos@redhat.com>
Co-authored-by: Andre Fredette <afredette@redhat.com>
Co-authored-by: Dave Tucker <dave@dtucker.co.uk>
Co-authored-by: Tamir Duberstein <tamird@gmail.com>
3 months ago
dependabot[bot] 1d272f38bd build(deps): update hashbrown requirement in the cargo-crates group
Updates the requirements on [hashbrown](https://github.com/rust-lang/hashbrown) to permit the latest version.

Updates `hashbrown` to 0.15.0
- [Changelog](https://github.com/rust-lang/hashbrown/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/hashbrown/compare/v0.14.3...v0.15.0)

---
updated-dependencies:
- dependency-name: hashbrown
  dependency-type: direct:production
  dependency-group: cargo-crates
...

Signed-off-by: dependabot[bot] <support@github.com>
3 months ago
Tamir Duberstein aa240baadf Appease clippy
```
error: the following explicit lifetimes could be elided: 'data, 'file
    --> aya-obj/src/obj.rs:1083:6
     |
1083 | impl<'data, 'file, 'a> TryFrom<&'a ObjSection<'data, 'file>> for Section<'a> {
     |      ^^^^^  ^^^^^                             ^^^^^  ^^^^^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
```
4 months ago
GrigorenkoPV 55ed9e0546
fix(aya-log): print &[u8] using full width (#1008)
Otherwise `&[1u8, 0u8]` cannot be distinguished from `&[0x10u8]` (they both become 10)
4 months ago
Vladimir Petrzhikovskii d05110fd86 perf: cache `nr_cpus` in a thread_local 4 months ago
Tamir Duberstein afd777b705 Clarify `Arc` usage
Absent this it's easy to miss that there's an `Arc` being cloned here.
4 months ago
Tamir Duberstein e992c280cb Replace `Arc` with `&'static` 4 months ago
Tamir Duberstein 0e867572ff Avoid intermediate allocations in parse_cpu_ranges 4 months ago