swananan
63d0505a37
Merge ee9d35a200 into 0780eef640
3 days ago
swananan
ee9d35a200
uprobe: bundle attach location+cookie via UProbeAttachPoint
...
This follows the #1417 review discussion: by bundling location
+ cookie into a UProbeAttachPoint we get a more idiomatic Into<_>
entry point, keep the one-to-one relationship enforced by the type
system, and make it easier to extend attach with multi-location
support without introducing parallel arrays or a brand new API.
3 days ago
dependabot[bot]
0780eef640
build(deps): bump the github-actions group with 3 updates
...
Bumps the github-actions group with 3 updates: [DavidAnson/markdownlint-cli2-action](https://github.com/davidanson/markdownlint-cli2-action ), [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request ) and [actions/cache](https://github.com/actions/cache ).
Updates `DavidAnson/markdownlint-cli2-action` from 21 to 22
- [Release notes](https://github.com/davidanson/markdownlint-cli2-action/releases )
- [Commits](https://github.com/davidanson/markdownlint-cli2-action/compare/v21...v22 )
Updates `peter-evans/create-pull-request` from 7 to 8
- [Release notes](https://github.com/peter-evans/create-pull-request/releases )
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v7...v8 )
Updates `actions/cache` from 4 to 5
- [Release notes](https://github.com/actions/cache/releases )
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md )
- [Commits](https://github.com/actions/cache/compare/v4...v5 )
---
updated-dependencies:
- dependency-name: DavidAnson/markdownlint-cli2-action
dependency-version: '22'
dependency-type: direct:production
update-type: version-update:semver-major
dependency-group: github-actions
- dependency-name: peter-evans/create-pull-request
dependency-version: '8'
dependency-type: direct:production
update-type: version-update:semver-major
dependency-group: github-actions
- dependency-name: actions/cache
dependency-version: '5'
dependency-type: direct:production
update-type: version-update:semver-major
dependency-group: github-actions
...
Signed-off-by: dependabot[bot] <support@github.com>
5 days ago
Tamir Duberstein
5bf66d6127
integration-test: appease clippy
...
Before this change:
```
warning: manual saturating arithmetic
--> test/integration-test/src/tests/ring_buf.rs:235:9
|
235 | / data.len()
236 | | .checked_sub(RING_BUF_MAX_ENTRIES - 1)
237 | | .unwrap_or_default(),
| |________________________________^ help: consider using `saturating_sub`: `data.len().saturating_sub(RING_BUF_MAX_ENTRIES - 1)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_saturating_arithmetic
= note: `-W clippy::manual-saturating-arithmetic` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::manual_saturating_arithmetic)]`
warning: manual saturating arithmetic
--> test/integration-test/src/tests/ring_buf.rs:244:20
|
244 | let min_seen = max_seen.checked_sub(max_dropped).unwrap_or_default();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `saturating_sub`: `max_seen.saturating_sub(max_dropped)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_saturating_arithmetic
warning: manual saturating arithmetic
--> test/integration-test/src/tests/ring_buf.rs:245:24
|
245 | let min_rejected = max_rejected.checked_sub(dropped).unwrap_or_default();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `saturating_sub`: `max_rejected.saturating_sub(dropped)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_saturating_arithmetic
warning: `integration-test` (lib test) generated 3 warnings (run `cargo clippy --fix --lib -p integration-test --tests` to apply 3 suggestions)
```
5 days ago
Tamir Duberstein
28ae4b9826
test: properly spell "dependency"
1 week ago
Michal R
800f9f9fea
ci/lint: Do not install stable toolchain
...
We run clippy and miri only with nightly.
2 weeks ago
Michal R
ab187058d8
ci: Enable `llvm-link-static` feature for bpf-linker
...
Rust CI does not provide dynamic libLLVM tarballs for macOS—only static
ones. Since recent versions of bpf-linker require explicit linkage
configuration for libLLVM, enable the `llvm-link-static` feature to
ensure correct static linking.
Make sure bpf-linker's build.rs sees the downloaded LLVM by adding it
to PATH. On macOS, set the `{CXXSTDLIB,ZLIB}_PATH` variables to point
to the brew prefixes with static libraries it needs.
Given that now we link statically all libLLVM's dependencies and macOS
provides only dynamic zlib, we need to install static zlib from brew.
2 weeks ago
Daniel Mellado
7a3c03e178
Add licese for aya-obj
...
This commit adds a link for the needed licenses in aya-obj for fedora
packaging.
Signed-off-by: Daniel Mellado <dmellado@fedoraproject.org>
3 weeks ago
dependabot[bot]
a22ec3792a
build(deps): update object requirement in the cargo-crates group
...
Updates the requirements on [object](https://github.com/gimli-rs/object ) to permit the latest version.
Updates `object` to 0.38.0
- [Changelog](https://github.com/gimli-rs/object/blob/master/CHANGELOG.md )
- [Commits](https://github.com/gimli-rs/object/compare/0.37.0...0.38.0 )
---
updated-dependencies:
- dependency-name: object
dependency-version: 0.38.0
dependency-type: direct:production
dependency-group: cargo-crates
...
Signed-off-by: dependabot[bot] <support@github.com>
4 weeks ago
dependabot[bot]
fc2320bb5d
build(deps): bump actions/checkout in the github-actions group
...
Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout ).
Updates `actions/checkout` from 5 to 6
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](https://github.com/actions/checkout/compare/v5...v6 )
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-version: '6'
dependency-type: direct:production
update-type: version-update:semver-major
dependency-group: github-actions
...
Signed-off-by: dependabot[bot] <support@github.com>
4 weeks ago
Tamir Duberstein
d238b2ea6f
Release crates
...
- aya v0.13.2
- aya-build v0.1.3
- aya-ebpf v0.1.2
- aya-ebpf-bindings v0.1.2
- aya-ebpf-cty v0.2.3
- aya-ebpf-macros v0.1.2
- aya-log v0.2.2
- aya-log-common v0.1.16
- aya-log-ebpf v0.1.2
- aya-log-ebpf-macros v0.1.1
- aya-log-parser v0.1.14
- aya-obj v0.2.2
Signed-off-by: Tamir Duberstein <tamird@gmail.com>
1 month ago
Dave Tucker
acb1ddd2ec
docs: Add release documentation
...
This describes the current process for performing releases from the
aya workspace.
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
1 month ago
dependabot[bot]
75cd7e835f
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 20 to 21
- [Release notes](https://github.com/davidanson/markdownlint-cli2-action/releases )
- [Commits](https://github.com/davidanson/markdownlint-cli2-action/compare/v20...v21 )
---
updated-dependencies:
- dependency-name: DavidAnson/markdownlint-cli2-action
dependency-version: '21'
dependency-type: direct:production
update-type: version-update:semver-major
dependency-group: github-actions
...
Signed-off-by: dependabot[bot] <support@github.com>
1 month ago
Tamir Duberstein
7a8ad146f4
Add macos-latest
...
There's no way to get hardware acceleration on arm64 at all, so let's at
least make sure our stuff keeps working on macOS.
1 month ago
Tamir Duberstein
46221ad11d
probe: use RAII to clean up in the error path
1 month ago
Tamir Duberstein
72810f095f
aya: ProbeKind is Entry/Return
...
We already have separate types for KProbe and UProbe.
1 month ago
Tamir Duberstein
a4a3c1641f
probe: use exhaustive matches
1 month ago
Tamir Duberstein
1944c4aa00
perf_event: refactor perf_event_open_trace_point
...
Rewrite it in terms of perf_event_open.
1 month ago
Tamir Duberstein
d4b2dde78a
perf_event: inline `perf_event_open_bpf`
...
This function has one caller and provides no abstraction.
1 month ago
Tamir Duberstein
7e07f85edc
perf_attach: privatize PerfLink
...
There's no way to obtain this type externally.
1 month ago
Tamir Duberstein
27c7f1c84f
programs: disambiguate `fd` names
1 month ago
Tamir Duberstein
1791d497d3
programs: remove superfluous type ascription
1 month ago
Tamir Duberstein
14a844256a
macros: remove glob imports
1 month ago
Tamir Duberstein
2a33c642de
.github: remove push-to-fork
...
We need to create the fork first.
1 month ago
Tamir Duberstein
62a92af00e
.github: restrict permissions
1 month ago
Tamir Duberstein
b21284f36b
.github: move permissions to workflow root
1 month ago
Tamir Duberstein
a3282e1d14
.github: make minimally-authorized token
...
We only use this to download public repos.
1 month ago
Tamir Duberstein
9518ff8ca6
.github: use alls-green
1 month ago
Tamir Duberstein
5dd6d94342
.github: update reference
...
The referenced issue has hundreds of automated mentions, making it quite
hard to look at.
1 month ago
Friday Ortiz
ab38afe95d
perf_event: support hardware breakpoints
...
Implement `PerfEventConfig::Breakpoint`, allowing users to attach
hardware breakpoints. Generate `HW_BREAKPOINT_*` and `struct
bpf_perf_event_data` in support of this feature and update the type of
`PerfEventContext` accordingly.
Add a test exercising R, W, RW, and X breakpoints. Note that R
breakpoints are unsupported on x86, and this is asserted in the test.
Extend the VM integration test harness and supporting infrastructure
(e.g. `download_kernel_images.sh`) to download kernel debug packages and
mount `System.map` in initramfs. This is needed (at least) on the aarch
6.1 Debian kernel which was not compiled with `CONFIG_KALLSYMS_ALL=y`
for some reason, and the locations of globals are not available in
kallsyms. To attach breakpoints to these symbols in the test pipeline,
we need to read them from System.map and apply the KASLR offset to get
their real address. The `System.map` file is not provided in the kernel
package by default, so we need to extract it from the corresponding
debug package. The KASLR offset is computed using `gunzip` which appears
in kallsyms on all Debian kernels tested.
Co-authored-by: Tamir Duberstein <tamird@gmail.com>
1 month ago
Tamir Duberstein
d1f2e99e6a
xtask: release mode
...
Since a7cfc694bd we are unpacking dpkg
archives in native Rust and since ... we are downloading and unpacking
debug archives which are around 10x larger than kernel archives for the
same version. Thus build with optimizations so we spend less time in
archive extraction.
1 month ago
Tamir Duberstein
0484ab5c57
xtask: use `-cpu host` iff host == guest
1 month ago
Tamir Duberstein
fd18c3f4ab
.github: shard arm64 virtualized integration
...
Github arm64 runners don't support nested virtualization and they broke
nested virtualization on macos-15-intel so we must go nuclear.
1 month ago
Tamir Duberstein
e2f09ac62f
.github: move comments to Brewfile
...
This is where the dependencies are.
1 month ago
Tamir Duberstein
7288a2b8da
.github: remove stale comment
...
GNU tar is not needed since 5f046899b5 .
1 month ago
JPaja
d8f5497884
feat: add `Ebpf::maps_disjoint_mut`
...
Implemented using `HashMap::get_disjoint_mut` introduced in Rust 1.86.0.
1 month ago
Tamir Duberstein
65865e8dfc
.github: disable macos-15-intel
...
These builds are timing out, see
https://github.com/actions/runner-images/issues/13277 .
1 month ago
Tamir Duberstein
989a465f0c
xtask: avoid extracting complete archives
...
Now that we're no longer shelling out to do this, we can avoid most of
the work. Operate directly on the archive, unpacking only what we need.
1 month ago
Tamir Duberstein
2b8cd557aa
xtask: drop build script logging prefix
...
This code doesn't run under cargo.
1 month ago
Tamir Duberstein
112ab47fcd
Add clippy coverage for doctests
1 month ago
Tamir Duberstein
18c7f7ccd6
perf_event: push down type safety
...
This makes it more difficult to mishandle callers of `perf_event_open`.
Change `wakeup_events = 0` to 1; per `man 2 perf_event_open`:
Prior to Linux 3.0, setting wakeup_events to 0 resulted in
no overflow notifications; more recent kernels treat 0 the
same as 1.
1 month ago
Tamir Duberstein
7e405c216e
perf_event: simplify PerfEventScope
1 month ago
Tamir Duberstein
866cbe4837
all: bump MSRV to 1.87.0
...
Use newly stabilized `is_multiple_of`.
1 month ago
Tamir Duberstein
468b9b73db
xtask: use `-cpu host` on x86
...
We have started to see errors in CI:
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID[eax=80000001h].ECX.svm [bit 2]
The internet says this is the remedy.
1 month ago
swananan
4fbce44b6a
aya: tolerate proc map trailing newline
...
Proc maps terminate with a newline so split(b'\n') yields an empty
slice at the end. Filter it out before parsing so the absolute-path
fallback for pid-scoped attach doesn't get short-circuited by a
ProcMap::ParseLine error.
1 month ago
Tim W
17573e0e47
aya-build: plumb features of ebpf crates
...
This allows callers to select features of the ebpf crate.
2 months ago
Tamir Duberstein
948b8553ee
aya-build: guess `bpf_target_arch` from `HOST`
...
Remove the use of `CARGO_CFG_TARGET_ARCH` in ebpf crate build scripts,
moving it back only to `aya_build::build_ebpf` where it refers to the
userspace crate's target. In the ebpf crates restore the use of `HOST`
as the default compilation target when neither `--cfg bpf_target_arch`
nor `AYA_BPF_TARGET_ARCH` are provided.
2 months ago
Tamir Duberstein
fe3f5c4e7d
aya-build: read AYA_BPF_TARGET_ARCH
...
This allows users to set `bpf_target_arch` from the environment without
touching RUSTFLAGS.
2 months ago
Tamir Duberstein
4b0ddfc2b0
aya-build: simplify
...
Cargo sets `CARGO_CFG_BPF_TARGET_ARCH` so we don't have to inspect
`CARGO_ENCODED_RUSTFLAGS`.
2 months ago
Tamir Duberstein
0c7c8097b2
aya-build: clarify naming
2 months ago