Commit Graph

1638 Commits (85a3b2e4d21c86b9f3329fafbeb02934cab4a784)
 

Author SHA1 Message Date
dependabot[bot] 85a3b2e4d2
Merge pull request #905 from aya-rs/dependabot/cargo/production-dependencies-3ec3d1981c 6 months ago
dependabot[bot] f019ca33ed
build(deps): bump the production-dependencies group with 1 update
Updates the requirements on [object](https://github.com/gimli-rs/object) to permit the latest version.

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

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

Signed-off-by: dependabot[bot] <support@github.com>
6 months ago
Dave Tucker 63d8d4d34b
Merge pull request #528 from dave-tucker/rename-all-the-things
Rename Bpf -> Ebpf across all crates for consistency
6 months ago
Daniel Mellado a4e68ebdbf aya: include license in crate workspace
This PR includes the licenses files in the crate workspace subdirectory.
Without this, they won't be showing on crates.io and would be giving out
errors on tooling such as rust2rpm.

Signed-off-by: Daniel Mellado <dmellado@redhat.com>
7 months ago
Dave Tucker 715e62dd38 chore(aya): Bless public API
Bless the BpfError type alias

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
7 months ago
Michal Rostecki 57a69fe9d2 docs: Use `Ebpf` instead of `Bpf` 7 months ago
Michal Rostecki 110a76cb9a feat(aya): Provide a deprecated `BpfError` alias 7 months ago
Dave Tucker 5c6736b781 ci: Fix GH workflows with new crate names
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
7 months ago
Dave Tucker f81d320142 chore: Fix Mergify configuration
Fix paths and regexp for the new crate names and folders.

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
7 months ago
Dave Tucker d0c244356f chore: Bless public API changes
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
7 months ago
Dave Tucker 8c79b71bd5 feat(aya): Rename Bpf to Ebpf
And BpfLoader to EbpfLoader.
This also adds type aliases to preserve the use of the old names, making
updating to a new Aya release less of a burden. These aliases are marked
as deprecated since we'll likely remove them in a later release.

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
7 months ago
Dave Tucker fd48c55466 feat(aya-obj)!: Rename BpfRelocationError -> EbpfRelocationError
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
7 months ago
Dave Tucker d7af6acb42 chore(aya-ebpf): Rename BpfContext -> EbpfContext
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
7 months ago
Dave Tucker a93e354620 feat(aya-log): Rename BpfLogger to EbpfLogger
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
7 months ago
Dave Tucker cf3e2ca677 feat(aya-obj)!: Rename BpfSectionKind to EbpfSectionKind
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
7 months ago
Dave Tucker ea8073793e chore(aya-ebpf-macros): Rename bpf -> ebpf
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
7 months ago
Dave Tucker 41c61560ea chore(aya-ebpf): Rename bpf -> ebpf
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
7 months ago
Dave Tucker 70ac91dc1e chore(aya-ebpf-bindings): Rename bpf -> ebpf
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
7 months ago
Dave Tucker 21f570a19c chore(aya-ebpf-cty): Rename bpf -> ebpf
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
7 months ago
Dave Tucker 022aff96aa chore: Rename bpf dir to ebpf
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
7 months ago
Dave Tucker d6dfd678f0
Merge pull request #899 from dave-tucker/unused-qualifications
chore: Fix unused_qualifications lints
7 months ago
Dave Tucker 481b73b6d8 chore: Fix unused_qualifications lints
This was failing the docs build.

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
7 months ago
Gary Guo 542306d295 Add `CgroupDevice::query`
This follows closely the existing `LircMode2::query`.
7 months ago
Tamir Duberstein e38eac6352 aya: appease new nightly clippy lints
```
  error: unnecessary qualification
     --> aya/src/maps/ring_buf.rs:434:22
      |
  434 |                 ptr: ptr::NonNull::new(ptr).ok_or(
      |                      ^^^^^^^^^^^^^^^^^
      |
  note: the lint level is defined here
     --> aya/src/lib.rs:72:5
      |
  72  |     unused_qualifications,
      |     ^^^^^^^^^^^^^^^^^^^^^
  help: remove the unnecessary path segments
      |
  434 -                 ptr: ptr::NonNull::new(ptr).ok_or(
  434 +                 ptr: NonNull::new(ptr).ok_or(
      |

  error: unnecessary qualification
     --> aya/src/maps/mod.rs:225:21
      |
  225 |     let mut limit = std::mem::MaybeUninit::<rlimit>::uninit();
      |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |
  help: remove the unnecessary path segments
      |
  225 -     let mut limit = std::mem::MaybeUninit::<rlimit>::uninit();
  225 +     let mut limit = mem::MaybeUninit::<rlimit>::uninit();
      |

  error: unnecessary qualification
     --> aya/src/programs/mod.rs:614:9
      |
  614 |         crate::obj::Program {
      |         ^^^^^^^^^^^^^^^^^^^
      |
  help: remove the unnecessary path segments
      |
  614 -         crate::obj::Program {
  614 +         obj::Program {
      |

  error: unnecessary qualification
     --> aya/src/util.rs:373:14
      |
  373 |     unsafe { std::slice::from_raw_parts(bpf_name.as_ptr() as
      *const _, length) }
      |              ^^^^^^^^^^^^^^^^^^^^^^^^^^
      |
  help: remove the unnecessary path segments
      |
  373 -     unsafe { std::slice::from_raw_parts(bpf_name.as_ptr() as
      *const _, length) }
  373 +     unsafe { slice::from_raw_parts(bpf_name.as_ptr() as *const _,
      length) }
      |

  error: unnecessary qualification
      --> aya/src/maps/mod.rs:1130:47
       |
  1130 |                     .copy_from_slice(unsafe {
       std::mem::transmute(TEST_NAME) });
       |                                               ^^^^^^^^^^^^^^^^^^^
       |
  note: the lint level is defined here
      --> aya/src/lib.rs:72:5
       |
  72   |     unused_qualifications,
       |     ^^^^^^^^^^^^^^^^^^^^^
  help: remove the unnecessary path segments
       |
  1130 -                     .copy_from_slice(unsafe {
       std::mem::transmute(TEST_NAME) });
  1130 +                     .copy_from_slice(unsafe {
       mem::transmute(TEST_NAME) });
       |
```
7 months ago
Alessandro Decina 84ed505275 aya-bpf-macros: fix cgroup/skb section name
When no expected attach type is passed, the section name must be
cgroup/skb not cgroup_skb.

Fixes #896
7 months ago
Dave Tucker b6a84b658a Release aya-log-common v0.1.14, aya-log v0.2.0 7 months ago
Dave Tucker 4f0f095775 docs(aya-log-common): Add CHANGELOG
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
7 months ago
Dave Tucker 9abb7160e5 docs(aya-log): Add CHANGELOG
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
7 months ago
Dave Tucker c22a6963d4 Release aya-log-common v0.1.14, aya-log v0.2.0 7 months ago
Dave Tucker 0e99fa0f34 Release aya-obj v0.1.0, aya v0.12.0, safety bump aya-log v0.2.0 7 months ago
Dave Tucker 13b1fc63ef chore: Don't use path deps in workspace
This moves the path dependencies back into the per-crate Cargo.toml.
It is required such that the release tooling can correctly calculate
which version constraints require changing when we perform a release.

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
7 months ago
Dave Tucker c010505f19 ci: Remove old release workflows
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
7 months ago
Dave Tucker daa5a47310
Merge pull request #892 from dave-tucker/breaking-changes-v2
docs(aya): Document more breaking changes
7 months ago
Dave Tucker 431ce23f27
Merge pull request #891 from dave-tucker/changelog
Add Generated Changelogs for aya and aya-obj
7 months ago
Dave Tucker 2d9d7a1a0b docs(aya): Document more breaking changes
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
7 months ago
Dave Tucker 3a8274d445 chore: Disable markdownlint for generated files
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
7 months ago
Dave Tucker 12280a83f9 docs(aya): Add CHANGELOG
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
7 months ago
Dave Tucker 72e8aab6c8 docs(aya-obj): Add CHANGELOG
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
7 months ago
Dave Tucker 5c9c044719
Merge pull request #889 from dave-tucker/breaking-changes
docs: Document breaking changes
7 months ago
Dave Tucker 281ac1ac02 docs: Document breaking changes
This provides a `BREAKING-CHANGES.md` that we can populate per-crate.
Doing so will allow us to pull this content into our changelog and
websites to make things easier for users.

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
7 months ago
Tamir Duberstein 3369169aac aya: appease new nightly clippy lints
```
  error: unnecessary use of `get("foo").is_some()`
      --> aya-obj/src/obj.rs:1690:26
       |
  1690 |         assert!(obj.maps.get("foo").is_some());
       |                          ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `contains_key("foo")`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check
  note: the lint level is defined here
      --> aya-obj/src/lib.rs:68:9
       |
  68   | #![deny(clippy::all, missing_docs)]
       |         ^^^^^^^^^^^
       = note: `#[deny(clippy::unnecessary_get_then_check)]` implied by `#[deny(clippy::all)]`

  error: unnecessary use of `get("foo").is_some()`
      --> aya-obj/src/obj.rs:1777:26
       |
  1777 |         assert!(obj.maps.get("foo").is_some());
       |                          ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `contains_key("foo")`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check

  error: unnecessary use of `get("bar").is_some()`
      --> aya-obj/src/obj.rs:1778:26
       |
  1778 |         assert!(obj.maps.get("bar").is_some());
       |                          ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `contains_key("bar")`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check

  error: unnecessary use of `get("baz").is_some()`
      --> aya-obj/src/obj.rs:1779:26
       |
  1779 |         assert!(obj.maps.get("baz").is_some());
       |                          ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `contains_key("baz")`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check

  error: unnecessary use of `get(".bss").is_some()`
      --> aya-obj/src/obj.rs:1799:26
       |
  1799 |         assert!(obj.maps.get(".bss").is_some());
       |                          ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `contains_key(".bss")`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check

  error: unnecessary use of `get(".rodata").is_some()`
      --> aya-obj/src/obj.rs:1810:26
       |
  1810 |         assert!(obj.maps.get(".rodata").is_some());
       |                          ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `contains_key(".rodata")`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check

  error: unnecessary use of `get(".rodata.boo").is_some()`
      --> aya-obj/src/obj.rs:1821:26
       |
  1821 |         assert!(obj.maps.get(".rodata.boo").is_some());
       |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `contains_key(".rodata.boo")`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check

  error: unnecessary use of `get(".data").is_some()`
      --> aya-obj/src/obj.rs:1832:26
       |
  1832 |         assert!(obj.maps.get(".data").is_some());
       |                          ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `contains_key(".data")`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check

  error: unnecessary use of `get(".data.boo").is_some()`
      --> aya-obj/src/obj.rs:1843:26
       |
  1843 |         assert!(obj.maps.get(".data.boo").is_some());
       |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `contains_key(".data.boo")`
```
7 months ago
dependabot[bot] 499c6bf8d1
Merge pull request #888 from aya-rs/dependabot/cargo/production-dependencies-ba653fb7e8 7 months ago
dependabot[bot] d71d5f72ff
build(deps): bump the production-dependencies group with 1 update
Updates the requirements on [nix](https://github.com/nix-rust/nix) to permit the latest version.

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

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

Signed-off-by: dependabot[bot] <support@github.com>
7 months ago
Michal Rostecki 417679be9e
Merge pull request #887 from dave-tucker/release-toml
chore: Fix release.toml
7 months ago
Dave Tucker 5393618081 chore: Fix release.toml
post-release-commit-message was deprecated a while back.

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
7 months ago
Dave Tucker 0fadd69537
Merge pull request #882 from dave-tucker/metadata
chore: Use the cargo workspace package table
7 months ago
Dave Tucker b3e7ef741c chore: Use the cargo workspace package table
This allows for inheritance of common fields from the workspace root.
The following fields have been made common:

- authors
- license
- repository
- homepage
- edition

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
7 months ago
Dave Tucker 664bb47abf
Merge pull request #883 from dave-tucker/libelf
Fix macOS CI
7 months ago
Dave Tucker 6e9dcee702 ci: Use nightly-2022-02-12 on macOS
LLVM-18 hasn't been released on macOS yet

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
7 months ago
Dave Tucker 0c58bb66b6 integration-test: Fix build.rs output
The cargo::warning seems to ignore output after a newline.
Iterate over the entire rendered message and print it line-by-line.

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
7 months ago