Commit Graph

1743 Commits (492feb2147da669487cfde5c3ad5633137f84245)
 

Author SHA1 Message Date
martinsoees 492feb2147 Remove relocation test by type
The 'ignore_map_by_type' function has been removed. Also renamed test function and simplified the relocation builder since 'by_name' is the only option now
martinsoees 787d08b031 remove unintended explicit type declaration in code unrelated to this PR
martinsoees 0b0d4c7e97 Map import unused in usage example
martinsoees 37de0d1a26 Merge branch 'main' into ebpfloader_disable_unsupported_maps
martinsoees 71ec04eb25 Proper rustdoc reference to Ebpfloader::set_global
martinsoees 2e0bc82078 Review comments
- Removed 'ignore_map_by_type' since 'ignore_map_by_name' makes more sense
martinsoees 7b9f1d26d1 Review comments
- Removed 'ignore_map_by_type' since 'ignore_map_by_name' makes more sense
Dave Tucker d5414bf10c
Merge pull request from ajwerner/fix-variable-name
aya::programs::uprobe: fix bad variable name
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.
Wouter Dullaert b8a22fa040 feat(aya-ebpf): Add memmove to the public-api
Wouter Dullaert fb0a339adf feat(aya-ebpf): Add integration test for memmove implementation
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.
dependabot[bot] 09815d3c0c
Merge pull request from aya-rs/dependabot/cargo/cargo-crates-95ee854e2a
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>
Tamir Duberstein bac059fd41 Bump kernel image revision
6.1.0-15 seems to have been pulled.
Dave Tucker 06aa5c8ed3
Merge pull request from aya-rs/codegen
Update libbpf to c1a6c770c46c6e78ad6755bf596c23a4e6f6b216
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>
Dave Tucker c34abd6418
Merge pull request from dave-tucker/xtask-codegen-fix
chore(xtask): Create bindings dir
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>
Dave Tucker 3bd71925cf
Merge pull request from dave-tucker/fix-codegen-2
ci: Fix codegen and prep for s390/ppc64el
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>
Dave Tucker 3fc6f47281
Merge pull request from dave-tucker/s390-ppc-codegen
chore(xtask): Add s390x and powerpc64 to codegen
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>
Tamir Duberstein bfafe9e786 public-api: regenerate
See https://github.com/rust-lang/rust/commit/ec201b86.
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.
martinsoees d9cd8de7fc Properly cfg gate std and non-std
martinsoees b05ab1599d Applied cargo fmt to fix formatting
martinsoees c3084fd6a7 removed newline at end of file
martinsoees ad2dc1b7f0 Fixed doc test
martinsoees 0e35566479 indentation
martinsoees b49c3001f1 Added integration tests for ignoring maps by type and by name
martinsoees aad4ad4fd3 Changed name to 'ignore_map_by_type' and created a similar function that does the same by name. Fixed renaming and added the new 3rd argument to relocate_maps() for rbpf test case
belohnung 38d8e32baa fix(aya): fix panic when creating map on custom ubuntu kernel
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()`
```
martinsoees c725b9d69e All tests are passing now
martinsoees 5276a91846 Remove println import, added code comments and re-added patch_map_data (removed by mistake)
martinsoees 3525560c4a Added documentation to
martinsoees 74f5acf419 Ignore relocation of maps that should be ignored.
This makes it possible to have bytecode with unsupported map types such as BPF_MAP_TYPE_RINGBUF on a target kernel that doesn't have that map type
dependabot[bot] bf20a8c892
Merge pull request from aya-rs/dependabot/cargo/cargo-crates-f36f6a6c13
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>
Tamir Duberstein 781914f058 Don't deny unused_qualifications
Nightly added stuff to the prelude.
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.
dependabot[bot] 0ec87f6e4f
Merge pull request from aya-rs/dependabot/cargo/cargo-crates-d36358862b
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>
Tamir Duberstein 4e843a3523 Remove deny(pointer_structural_match)
```
warning: lint `pointer_structural_match` has been removed: converted into hard error, see RFC  <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
```
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.
   |     ++
Tamir Duberstein 3808ad5520 Reduce dependabot toil
Alessandro Decina bde4b5f86b
Merge pull request from swananan/enhance_urpobe_symbol_lookup
aya: add symbol lookup in associated debug files
Alessandro Decina c7898c596f Fix clippy
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.