Commit Graph

1595 Commits (417679be9ec7509698e474b9f7bf873f6627e917)
 

Author SHA1 Message Date
Michal Rostecki 417679be9e
Merge pull request #887 from dave-tucker/release-toml
chore: Fix release.toml
9 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>
9 months ago
Dave Tucker 0fadd69537
Merge pull request #882 from dave-tucker/metadata
chore: Use the cargo workspace package table
9 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>
9 months ago
Dave Tucker 664bb47abf
Merge pull request #883 from dave-tucker/libelf
Fix macOS CI
9 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>
9 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>
9 months ago
Dave Tucker 2d721971cf
Merge pull request #885 from dave-tucker/nightly-up
chore: Appease clippy unused imports
9 months ago
Dave Tucker 770a95e077 chore: Appease clippy unused imports
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
9 months ago
Tamir Duberstein 963dd13219 Appease rustc dead_code lint
Some of these are legit, others are false positives. I've filed
https://github.com/rust-lang/rust/issues/120770 for the latter.
9 months ago
Σrebe - Romain GERARD c31cce4a36 fix(aya-sock-map): invalid transmute when calling fd
Corrent an invalid transmutation for sock_map.
fd is already a ref of MapFd, so transmuting &fd to &SockMapFd is
equivalent to transmuting &&SockMapFd into &SockMapFd which is buggy.
9 months ago
Dave Tucker 46b48053df
Merge pull request #878 from alessandrod/missing-exports
aya/programs: export some missing modules
9 months ago
Alessandro Decina f491f56204 aya: bless API 9 months ago
Alessandro Decina a23772239a deps: update hashbrown
Hashbrown depends on ahash which used to use feature(stdsimd) which as
been removed in https://github.com/rust-lang/rust/issues/27731.

Latest hashbrown bumps ahash which doesn't use the removed feature
anymore.
9 months ago
Alessandro Decina 2be705bfa0 aya/programs: reformat to please rustfmt 9 months ago
Alessandro Decina 9b4f87646d Reorder imports a bit 9 months ago
Alessandro Decina d570450a0c aya/programs: export some missing modules
Previously we were only re-exporting the program types from these, so
links and other pub types were not exported.
9 months ago
Alessandro Decina 0f6a734392 aya: perf_event: add inherit argument to attach() 10 months ago
dependabot[bot] 3fedc2a706
Merge pull request #872 from aya-rs/dependabot/cargo/production-dependencies-18caeb64e4 10 months ago
Michal Rostecki c05a3b69b7 aya-obj: Handle lack of match of enum variants correctly
When comparing `local_spec` with `target_spec` for enum relocations,
we can encounter a situation when a matchinng variant in a candidate
spec doesn't exist.

Before this change, such case wasn't handled explicitly, therefore
resulted in returning currently constructed `target_spec` at the
end. The problem is that such `target_spec` was, due to lack of
match, incomplete. It didn't contain any `accessors` nor `parts`.

Later usage of such incomplete `target_spec` was leading to panics,
since the code operating on enums' `target_spec` expects at least
one `accessor` to be available.

Fixes #868
10 months ago
Alessandro Decina 92b1947885 aya: add StackTraceMap::remove() 10 months ago
Tamir Duberstein 057f27dc20 public-api: regenerate
StructuralEq has been removed.

See 0df7810734.
10 months ago
dependabot[bot] 79c1d8495e
Merge pull request #873 from aya-rs/dependabot/github_actions/production-dependencies-4cb50122c4 10 months ago
dependabot[bot] b4d34d4d51
build(deps): bump the production-dependencies group with 1 update
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 14 to 15
- [Release notes](https://github.com/davidanson/markdownlint-cli2-action/releases)
- [Commits](https://github.com/davidanson/markdownlint-cli2-action/compare/v14...v15)

---
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>
10 months ago
dependabot[bot] b8743ac5f9
build(deps): bump the production-dependencies group with 2 updates
Updates the requirements on [env_logger](https://github.com/rust-cli/env_logger) and [which](https://github.com/harryfei/which-rs) to permit the latest version.

Updates `env_logger` to 0.10.2
- [Release notes](https://github.com/rust-cli/env_logger/releases)
- [Changelog](https://github.com/rust-cli/env_logger/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-cli/env_logger/compare/v0.10.0...v0.10.2)

Updates `which` to 5.0.0
- [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/5.0.0...5.0.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
10 months ago
Tamir Duberstein fd2fb98792 Revert "bpf: appease nightly lint"
This reverts commit 9861c1446e.

This no longer warns. See
https://github.com/rust-lang/rust/commit/d95d6ceecb372c66ed18a4e7a0bbb7.
10 months ago
Tamir Duberstein 80736c5db2 Batch dependabot updates 10 months ago
Tamir Duberstein 09851a2090
Merge pull request #865 from tamird/appease-lint
aya: appease new nightly clippy lints
10 months ago
Tamir Duberstein 7022528f04
aya: appease new nightly clippy lints
```
  error: this call to `as_ref.map(...)` does nothing
     --> aya/src/bpf.rs:536:30
      |
  536 |                 let btf_fd = btf_fd.as_ref().map(Arc::clone);
      |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `btf_fd.clone()`
      |
      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref
  note: the lint level is defined here
     --> aya/src/lib.rs:41:5
      |
  41  |     clippy::all,
      |     ^^^^^^^^^^^
      = note: `#[deny(clippy::useless_asref)]` implied by `#[deny(clippy::all)]`

  error: could not compile `aya` (lib) due to 1 previous error
  warning: build failed, waiting for other jobs to finish...
  error: initializer for `thread_local` value can be made `const`
    --> aya/src/sys/fake.rs:14:61
     |
  14 |     pub(crate) static TEST_MMAP_RET: RefCell<*mut c_void> = RefCell::new(ptr::null_mut());
     |                                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `const { RefCell::new(ptr::null_mut()) }`
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#thread_local_initializer_can_be_made_const
     = note: `#[deny(clippy::thread_local_initializer_can_be_made_const)]` implied by `#[deny(clippy::all)]`
```
10 months ago
Tamir Duberstein 53df49e535
Merge pull request #862 from tamird/update-api
public-api: regenerate
10 months ago
Tamir Duberstein 1edd42aa0a
public-api: regenerate
`Send + Sync` became `Sync + Send` for reasons I don't understand.
10 months ago
Tamir Duberstein 604742a2f2
Merge pull request #861 from tamird/appease-lint
Appease new nightly lints
10 months ago
Tamir Duberstein 9861c1446e
bpf: appease nightly lint
```
error: field `0` is never read
   --> bpf/aya-bpf/src/helpers.rs:737:22
    |
737 | pub struct PrintkArg(u64);
    |            --------- ^^^
    |            |
    |            field in this struct
    |
    = note: `PrintkArg` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis
    = note: `-D dead-code` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(dead_code)]`
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
    |
737 | pub struct PrintkArg(());
    |                      ~~
```

See https://github.com/rust-lang/rust/issues/119659.
10 months ago
Tamir Duberstein 7c1bfeffe8
aya: appease nightly lint
```
error: lint `unused_tuple_struct_fields` has been renamed to `dead_code`
  --> aya/src/lib.rs:74:5
   |
74 |     unused_tuple_struct_fields,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `dead_code`
   |
   = note: `-D renamed-and-removed-lints` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(renamed_and_removed_lints)]`
```

See https://github.com/rust-lang/rust/commit/9fcf9c141068984ffcbb4cb00c.
10 months ago
Alessandro Decina e1aefa4e87 aya: bless API change 10 months ago
Alessandro Decina 2257cbeccb tc: add SchedClassifier::attach_to_link
Similar to Xdp::attach_to_link, can be used to replace/upgrade the
program attached to a link.
10 months ago
Alessandro Decina b13645b13d tc: add SchedClassifierLink::attach_type() getter
The link already exposes priority() and handle(). Expose attach_type()
too.
10 months ago
Dave Tucker 13f21dce1b
Merge pull request #858 from dave-tucker/ringbuf-doctests
Fix docs build
11 months ago
Dave Tucker 19af2497d7 aya-bpf: Fix XDP Map documentation
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
11 months ago
Dave Tucker e9e2f48d4f aya: Fix ringbuf docs
doctests are not running in CI and therefore the didn't catch the
ringbuf docs failures. This commit fixes the issues in the examples.

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
11 months ago
Dave Tucker ec51881403 ci: Add doctests to workflow
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
11 months ago
Tamir Duberstein 44f416a617
Merge pull request #855 from tamird/fix-lint
init: appease clippy
11 months ago
Tamir Duberstein af935f84bf
init: appease clippy
```
warning: in a `match` scrutinee, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a `let`
   --> init/src/main.rs:127:23
    |
127 |               match (|| {
    |  _______________________^
128 | |                 let entry = entry.context("read_dir(/bin) failed")?;
129 | |                 let path = entry.path();
130 | |                 let status = std::process::Command::new(&path)
...   |
139 | |                 }
140 | |             })() {
    | |_____________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#blocks_in_conditions
    = note: `#[warn(clippy::blocks_in_conditions)]` on by default
```

https://github.com/rust-lang/rust-clippy/pull/11853 landed in nightly.
11 months ago
Tamir Duberstein 890e799072
Merge pull request #854 from tamird/github-no-brew-update
.github: avoid homebrew automatic update
11 months ago
Tamir Duberstein ea2492144a
.github: avoid homebrew automatic update
This is slow and prone to failure; see
https://github.com/aya-rs/aya/actions/runs/7204446013/job/19625908097.
11 months ago
Tamir Duberstein 1e99ac9323
Merge pull request #853 from tamird/public-api-mac
xtask: allow public-api regen on aarch64-apple-darwin
11 months ago
dependabot[bot] be94044f31
Merge pull request #847 from aya-rs/dependabot/cargo/public-api-0.33.1 11 months ago
dependabot[bot] b3ec33e763
build(deps): update public-api requirement from 0.32.0 to 0.33.1
Updates the requirements on [public-api](https://github.com/Enselic/cargo-public-api) to permit the latest version.
- [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/v0.32.0...v0.32.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
11 months ago
Tamir Duberstein 5041aa41de
xtask: allow public-api regen on aarch64-apple-darwin
```
CARGO_CFG_BPF_TARGET_ARCH=x86_64 cargo +nightly xtask public-api --bless --target x86_64-unknown-linux-gnu
```
11 months ago
Dave Tucker 8227aa5da3
Merge pull request #852 from tianyin/patch-1
s/BBF/BPF
11 months ago