Commit Graph

1735 Commits (247486cb7ddd83d9c334a05194f4df78df881039)
 

Author SHA1 Message Date
Tamir Duberstein 247486cb7d Remove stale workaround 2 months ago
Tamir Duberstein 5397c1ca4b Remove unused `allow(dead_code)`
See 31fe9628cf.
2 months ago
Michal Rostecki 6dab7176f5 chore: Bless public API 2 months ago
Michal Rostecki a75fc2f769 aya-log: Allow logging `core::net::Ipv4Addr` and `core::net::Ipv6Addr`
IP address types are available in `core`, so they can be used also in
eBPF programs. This change adds support of these types in aya-log.

* Add implementation of `WriteTuBuf` to these types.
* Support these types in `Ipv4Formatter` and `Ipv6Formatter`.
* Support them with `DisplayHint::Ip`.
* Add support for formatting `[u8; 4]`, to be able to handle
  `Ipv4Addr::octets`.
2 months ago
ajwerner 2cd9858ea9
Merge pull request #991 from l2dy/typo-1
docs(aya): fix typo
2 months ago
Zero King f1773d5af4 docs(aya): fix typo 2 months ago
Dave Tucker 8015e10079
Merge pull request #989 from aya-rs/codegen
Update libbpf to 686f600bca59e107af4040d0838ca2b02c14ff50
2 months ago
dave-tucker 8d7446e011 [codegen] Update libbpf to 686f600bca59e107af4040d0838ca2b02c14ff50
Update libbpf to 686f600bca59e107af4040d0838ca2b02c14ff50

Files changed:
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

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
2 months ago
Dave Tucker 104f449c0f
Merge pull request #988 from tyrone-wu/codegen/bpf-stats-type
codegen: add `bpf_stats_type` to codegen
2 months ago
tyrone-wu 86e279ef0a
codegen: add bpf_stats_type
Added `bpf_stats_type` enum to codegen bindings.

Refs: #959
2 months ago
Dave Tucker d5414bf10c
Merge pull request #983 from ajwerner/fix-variable-name
aya::programs::uprobe: fix bad variable name
2 months ago
Andrew Werner d413e2f285 aya::programs::uprobe: fix bad variable name
The variable fn_name was very much *not* the fn_name, but rather the
object file path.
2 months ago
Wouter Dullaert b8a22fa040 feat(aya-ebpf): Add memmove to the public-api 3 months ago
Wouter Dullaert fb0a339adf feat(aya-ebpf): Add integration test for memmove implementation 3 months ago
Wouter Dullaert 7ad3926d99 feat(aya-ebpf): Implement memmove
The compiler will emit this function for certain operations, but aya
currently does not provide an implementation.
This leads to ebpf loading failures as the kernel can't find the symbol when
loading the program.

The implementation is based on https://github.com/rust-lang/compiler-builtins/blob/master/src/mem/mod.rs#L29-L40
and https://github.com/rust-lang/compiler-builtins/blob/master/src/mem/impls.rs#L128-L135
Only the simplest case has been implemented, none of the word optimizations,
since memcpy also doesn't seem to have them.
3 months ago
dependabot[bot] 09815d3c0c
Merge pull request #980 from aya-rs/dependabot/cargo/cargo-crates-95ee854e2a 3 months ago
dependabot[bot] d581431d9a
build(deps): update public-api requirement in the cargo-crates group
Updates the requirements on [public-api](https://github.com/Enselic/cargo-public-api) to permit the latest version.

Updates `public-api` to 0.35.1
- [Release notes](https://github.com/Enselic/cargo-public-api/releases)
- [Changelog](https://github.com/Enselic/cargo-public-api/blob/main/rustdoc-json/CHANGELOG.md)
- [Commits](https://github.com/Enselic/cargo-public-api/compare/public-api-v0.35.0...public-api-v0.35.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
3 months ago
Tamir Duberstein bac059fd41 Bump kernel image revision
6.1.0-15 seems to have been pulled.
3 months ago
Dave Tucker 06aa5c8ed3
Merge pull request #978 from aya-rs/codegen
Update libbpf to c1a6c770c46c6e78ad6755bf596c23a4e6f6b216
3 months ago
dave-tucker 8b50a6a573 [codegen] Update libbpf to c1a6c770c46c6e78ad6755bf596c23a4e6f6b216
Update libbpf to c1a6c770c46c6e78ad6755bf596c23a4e6f6b216

Files changed:
M	aya-obj/src/generated/linux_bindings_aarch64.rs
M	aya-obj/src/generated/linux_bindings_armv7.rs
A	aya-obj/src/generated/linux_bindings_powerpc64.rs
M	aya-obj/src/generated/linux_bindings_riscv64.rs
A	aya-obj/src/generated/linux_bindings_s390x.rs
M	aya-obj/src/generated/linux_bindings_x86_64.rs
M	ebpf/aya-ebpf-bindings/src/aarch64/bindings.rs
M	ebpf/aya-ebpf-bindings/src/armv7/bindings.rs
A	ebpf/aya-ebpf-bindings/src/powerpc64/bindings.rs
A	ebpf/aya-ebpf-bindings/src/powerpc64/helpers.rs
M	ebpf/aya-ebpf-bindings/src/riscv64/bindings.rs
A	ebpf/aya-ebpf-bindings/src/s390x/bindings.rs
A	ebpf/aya-ebpf-bindings/src/s390x/helpers.rs
M	ebpf/aya-ebpf-bindings/src/x86_64/bindings.rs

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
3 months ago
Dave Tucker c34abd6418
Merge pull request #977 from dave-tucker/xtask-codegen-fix
chore(xtask): Create bindings dir
3 months ago
Dave Tucker b20b1f1b0a chore(xtask): Create bindings dir
If the bindings directory doesn't exist then create it.

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
3 months ago
Dave Tucker 3bd71925cf
Merge pull request #976 from dave-tucker/fix-codegen-2
ci: Fix codegen and prep for s390/ppc64el
3 months ago
Dave Tucker 64ec062c84 ci: Fix codegen and prep for s390/ppc64el
Adds missing libelf headers that are now included
as part of libbpf-internal.h. Adds ppc64el and
s390x to the cross environment.

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
3 months ago
Dave Tucker 3fc6f47281
Merge pull request #975 from dave-tucker/s390-ppc-codegen
chore(xtask): Add s390x and powerpc64 to codegen
3 months ago
Billy McFall 62efed1853 chore(xtask): Add s390x and powerpc64 to codegen
This commit adds the s390x and powerpc architectures
to codegen. This will enable an upcoming PR to add
support for aya to support theses architectures
in both aya and aya-ebpf.

Co-authored-by: Dave Tucker <dave@dtucker.co.uk>
Signed-off-by: Billy McFall <22157057+Billy99@users.noreply.github.com>
3 months ago
Tamir Duberstein bfafe9e786 public-api: regenerate
See https://github.com/rust-lang/rust/commit/ec201b86.
3 months ago
Tamir Duberstein 35aa9ac1a5 public-api: regenerate
See https://github.com/Enselic/cargo-public-api/pull/584.

Constant values are no longer considered part of the API.
3 months ago
belohnung 38d8e32baa fix(aya): fix panic when creating map on custom ubuntu kernel 3 months ago
Tamir Duberstein 78acd74bad Appease clippy
```
error: match can be simplified with `.unwrap_or_default()`
   --> aya/src/util.rs:157:13
    |
157 | /             match s.map(str::parse).transpose() {
158 | |                 Ok(option) => option,
159 | |                 Err(ParseIntError { .. }) => None,
160 | |             }
    | |_____________^ help: replace it with: `s.map(str::parse).transpose().unwrap_or_default()`
```
3 months ago
dependabot[bot] bf20a8c892
Merge pull request #965 from aya-rs/dependabot/cargo/cargo-crates-f36f6a6c13 3 months ago
dependabot[bot] 37777a0d5a
build(deps): update public-api requirement in the cargo-crates group
Updates the requirements on [public-api](https://github.com/Enselic/cargo-public-api) to permit the latest version.

Updates `public-api` to 0.33.1
- [Release notes](https://github.com/Enselic/cargo-public-api/releases)
- [Changelog](https://github.com/Enselic/cargo-public-api/blob/main/rustdoc-json/CHANGELOG.md)
- [Commits](https://github.com/Enselic/cargo-public-api/compare/public-api-v0.33.1...public-api-v0.33.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
3 months ago
Tamir Duberstein 781914f058 Don't deny unused_qualifications
Nightly added stuff to the prelude.
4 months ago
tyrone-wu 5e13283f59 fix: fix rustdocs-args ordering in taplo to -D warnings
This fixes the current rustdoc build error by correcting the ordering of
`rustdoc-args` to `-D warnings`. Additionally, this also removes the
`recorder_arrays` field (defaults to false) so that the order is not
modified, which is what caused the error in the first place.
4 months ago
dependabot[bot] 0ec87f6e4f
Merge pull request #955 from aya-rs/dependabot/cargo/cargo-crates-d36358862b 4 months ago
dependabot[bot] dd92b41a59
build(deps): bump the cargo-crates group with 2 updates
Updates the requirements on [nix](https://github.com/nix-rust/nix) and [object](https://github.com/gimli-rs/object) to permit the latest version.

Updates `nix` to 0.28.0
- [Changelog](https://github.com/nix-rust/nix/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nix-rust/nix/compare/v0.28.0...v0.28.0)

Updates `object` to 0.35.0
- [Changelog](https://github.com/gimli-rs/object/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gimli-rs/object/compare/0.35.0...0.35.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
4 months ago
Tamir Duberstein 4e843a3523 Remove deny(pointer_structural_match)
```
warning: lint `pointer_structural_match` has been removed: converted into hard error, see RFC #3535 <https://rust-lang.github.io/rfcs/3535-constants-in-patterns.html> for more information
  --> aya/src/lib.rs:57:5
   |
57 |     pointer_structural_match,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(renamed_and_removed_lints)]` on by default
```
4 months ago
Tamir Duberstein 683cedfe48 Appease clippy
warning: doc list item missing indentation
  --> test/integration-test/build.rs:20:5
   |
20 | /// prevent their use for the time being.
   |     ^
   |
   = help: if this is supposed to be its own paragraph, add a blank line
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
   = note: `#[warn(clippy::doc_lazy_continuation)]` on by default
help: indent this line
   |
20 | ///   prevent their use for the time being.
   |     ++
4 months ago
Tamir Duberstein 3808ad5520 Reduce dependabot toil 4 months ago
Alessandro Decina bde4b5f86b
Merge pull request #938 from swananan/enhance_urpobe_symbol_lookup
aya: add symbol lookup in associated debug files
4 months ago
Alessandro Decina c7898c596f Fix clippy 4 months ago
swananan 462514ed4c aya: adjust symbol lookup tests for object crate alignment requirements
The object::File::parse API requires parameter to be aligned with 8 bytes.
Adjusted the Vec in the tests with miri to meet this requirement.
4 months ago
Alessandro Decina a2c8fcab4e aya: bless API changes
The equivalent crate has a blanket implementation smh. We don't depend
on it directly it's pulled in by the object crate.
4 months ago
dependabot[bot] 040e47c28b
Merge pull request #924 from aya-rs/dependabot/github_actions/production-dependencies-e915e9eb26 4 months ago
dependabot[bot] 5d0cefce8a
Merge pull request #930 from aya-rs/dependabot/cargo/production-dependencies-9eca24263e 4 months ago
swananan e6e1bfeb58 aya: add symbol lookup in associated debug files
This change enhances the logic for symbol lookup in uprobe or uretprobe.
If the symbol is not found in the original binary, the search continues
in the debug file associated through the debuglink section. Before
searching the symbol table, it compares the build IDs of the two files.
The symbol lookup will only be terminated if both build IDs exist and do
not match. This modification does not affect the existing symbol lookup
logic.

Refs: #936
4 months ago
dependabot[bot] e34e8536d4
build(deps): bump DavidAnson/markdownlint-cli2-action
Bumps the production-dependencies group with 1 update: [DavidAnson/markdownlint-cli2-action](https://github.com/davidanson/markdownlint-cli2-action).


Updates `DavidAnson/markdownlint-cli2-action` from 15 to 16
- [Release notes](https://github.com/davidanson/markdownlint-cli2-action/releases)
- [Commits](https://github.com/davidanson/markdownlint-cli2-action/compare/v15...v16)

---
updated-dependencies:
- dependency-name: DavidAnson/markdownlint-cli2-action
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: production-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
5 months ago
dependabot[bot] dc9ed22aeb
build(deps): update object requirement
Updates the requirements on [object](https://github.com/gimli-rs/object) to permit the latest version.

Updates `object` to 0.34.0
- [Changelog](https://github.com/gimli-rs/object/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gimli-rs/object/compare/0.34.0...0.34.0)

---
updated-dependencies:
- dependency-name: object
  dependency-type: direct:production
  dependency-group: production-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
5 months ago
Tamir Duberstein e4f9ed8d79 Allowlist expected cfgs
See https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg.
5 months ago
Tamir Duberstein b603c665a9 Deny warnings 5 months ago