200 KiB
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.12.0 (2024-02-28)
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
-
Appease clippy unused imports
-
tracefs review fixes
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.
Documentation
- 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. - Add labels for optional features
Following the lead of crates like tokio and nix, we now annotate APIs
that require optional features. This helps in cases where a user wants
to have an
AsyncPerfEventArray
which is documented on crates.io, but it's not obvious that you have to enable theasync
feature. - Add crabby logo
- Document more breaking changes
- Add CHANGELOG
New Features
- get_tracefs function
Bug Fixes
- 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.
- Relax unnecessarily strict atomic ordering on probe event_alias
- remove useless
any
all
in cfg.
Other
-
reformat to please rustfmt
-
export some missing modules Previously we were only re-exporting the program types from these, so links and other pub types were not exported.
-
perf_event: add inherit argument to attach()
-
add StackTraceMap::remove()
-
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)]`
-
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.
-
add SchedClassifier::attach_to_link Similar to Xdp::attach_to_link, can be used to replace/upgrade the program attached to a link.
-
add SchedClassifierLink::attach_type() getter The link already exposes priority() and handle(). Expose attach_type() too.
-
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.
-
pin for (async)perf_event_array Implement pinning for perf_event_array and async_perf_event_array. Additionally make the core MapData.pin method operate on a reference rather than a mutable reference.
-
make RingBuf: Send + Sync There was no reason for them not to be -- the APIs all require mutable references and hold onto mutable references, so there cannot be internal concurrency. The !Send + !Sync came from the MMap, but not for any good reason.
-
extracting program and map names with the same function
-
add MapInfo struct following the same pattern as ProgramInfo This makes the APIs for loading maps and programs more similar.
-
support loading a map by fd This adds support to loading maps by fd similarly to the way programs can be loaded by fd.
-
make KernelVersion::code public
-
Add markdownlint This adds a linter to catch common markdown formatting errors. The linter used is markdownlint-cli2 which is available on all platforms and has an associated Github Action to automate these checks in CI.
Configuration is checked in at .markdownlint-cli2.yaml.
You may run the check locally using
markdownlint-cli2
. Or you may install the extension for VSCode: DavidAnson.vscode-markdownlint -
update async-io requirement from 1.3 to 2.0 Updates the requirements on async-io to permit the latest version.
updated-dependencies:
- dependency-name: async-io dependency-type: direct:production ...
-
fix unused async-io dependency linter error Not using the
dep:
syntax created a Cargo feature flag for async-io, though this feature alone does nothing without theasync_std
orasync_tokio
features. -
Implement RingBuf This implements the userspace binding for RingBuf.
Instead of streaming the samples as heap buffers, the process_ring function takes a callback to which we pass the event's byte region, roughly following [libbpf]'s API design. This avoids a copy and allows marking the consumer pointer in a timely manner.
-
move mmap from perf_buffer.rs to sys/mod.rs mmap() is needed for the ring buffer implementation, so move it to a common module
-
impl Fromobj::InvalidMapTypeError for MapTypeError
-
sort variants Missed in
5e637071c1
due to merge skew with7b71c7e1cd
. -
import types from std::ffi rather than libc
-
sort variants
-
remove redundant keys
default-features = false
is already in the root Cargo.toml. -
add pin() api
-
Adds new
maps_mut()
API to the BpfManager to allow us to iterate though and pin all of maps at the same time. -
Adds new pin(Path)/unpin(Path) api to Maps so they can be generically pinned AFTER load.
-
Adds macro for pinning explicit map types in aya. Convert all explicit map types "inner" field to be pub crate in order to facilitate this.
-
-
fix libbpf_pin_by_name Aligns with libbpf for the special LIBBPF_PIN_BY_NAME map flag. Specifically if the flag is provided without a pin path default to "/sys/fs/bpf".
-
Deprecate
syscall_prefix
Using the prefix only for the host architecture is often not enough, kernels usually provide symbols for more architectures, which are used by multilib applications. Handling them might or might not be necessary depending on the use case. Due to that complexity, we decided to let the callers to handle prefixes the way they prefer. -
group_imports = "StdExternalCrate" High time we stop debating this; let the robots do the work.
-
Fix program loading on kernels with a patch > 255
-
fix load time and add test Time since boot is defined as the UNIX_EPOCH plus the duration since boot. which is realtime - boottime NOT boottime - realtime.
Add a integration test to ensure this doesn't happen again.
-
make maps work on kernels not supporting ProgIds On startup, the kernel is probed for support of chained program ids for CpuMap, DevMap and DevMapHash, and will patch maps at load time to have the proper size. Then, at runtime, the support is checked and will error out if a program id is passed when the kernel does not support it.
-
use ProgramFd instead of impl AsRawFd Not having a generic here allows to pass
None
without specifying the actual type you don't care about. -
add documentation for XDP maps
-
fix docstring missing trailing period
-
add support for chained xdp programs in {cpu,dev}map set/insert functions can now take an optional bpf program fd to run once the packet has been redirected from the main probe
-
add support for map-bound XDP programs Such programs are to be bound to cpumap or devmap instead of the usual network interfaces.
-
Update XDP maps implementations Map impls changed since this was first written.
-
Implement XDP Map Types This commit adds implementations for:
- xskmap
- devmap
- devmap_hash
- cpumap
Which can all be used to redirect XDP packets to various different locations
-
Make MapData::pin pub This is to solve a use-case where a user (in this case bpfd) may want to:
- MapData::from_pin to open a pinned map from bpffs
- MapData::pin to pin that object into another bpffs
Both operations should be easily accomplished without needing to cast a MapData into a concrete Map type - e.g aya::maps::HashMap.
-
Remove MapData::pinned BPF objects can be pinned multiple times, to multiple different places. Tracking whether or not a map is pinned in a bool is therefore not sufficient. We could track this in a HashSet, but there is really no reason to track it at all.
-
fix typos, avoid fallible conversions
-
MapData::{obj, fd} are private
-
MapFd
andSockMapFd
are owned -
add program_info() api to program Add a new api to the outer level
Program
structure which allows users to get the program's kernel info before casting it to an explicit program variant. -
support TryFrom for LRU hash maps The macro to implement TryFrom for MapData didn't have the ability to specify that more than one variant of MapData can be valid for a single map implementation. Support for new syntax was added to the macro so that the implementation can succeed for both valid variants in the HashMap and PerCpuHashMap impl.
-
rework TryFrom macros The old macros were repetitive and inflexible. This unifies the various macros used to generate TryFrom implementations for map implementations from the relevant map enum variants.
Cleanup in anticipation of fixing #636.
The API changes are just about renaming the return to Self and Self::Error; they are not real changes.
-
access inner through async Avoid holding onto raw file descriptors.
Remove some implied bounds (BorrowMut implies Borrow).
-
ProgAttachLink and LircLink hold owned FDs
-
use OwnedFd
-
Use AsFd when attaching fds to programs This is a breaking change but adds another level of safety to ensure the file descriptor we receive is valid. Additionally, this allows aya to internally easily duplicate this file descriptor using std library methods instead of manually calling
dup
which doesn't duplicate with the CLOSE_ON_EXEC flag that is standard pratice to avoid leaking the file descriptor when exec'ing. -
Use BorrowedFd when using the program fd in sys/bpf.rs This commit reveals but does not address a file descriptor leak in LircLink2::query. This function returns a list of
LircLink
s where each of them have a program file descriptor that is not going to be closed. This commit does not add this leak; it merely makes it louder in the code. -
support non-UTF8 probing
-
avoid path UTF-8 assumptions
-
deny various allow-by-default lints
-
fix docs build Appease the new lint rustdoc::redundant_explicit_links that was added in https://github.com/rust-lang/rust/pull/113167.
-
BloomFilter::insert takes &mut self This is consistent with all the other maps.
-
MapData::fd is non-optional The primary driver of change here is that
MapData::create
is now a factory function that returnsResult<Self, _>
rather than mutating&mut self
. The remaining changes are consequences of that change, the most notable of which is the removal of several errors which are no longer possible. -
use RAII to close FDs
-
ProgramData::attach_prog_fd
is owned This prevents a file descriptor leak when extensions are used.This is an API breaking change.
-
ProgramFd
is owned -
add helper methods for ProgramInfo
- Add helper methods to get useful information from the ProgramInfo
object which is returned by the
loaded_programs()
API. Specifically this code mirrors thebpftool prog
command in terms of useful fields. - Add a new API macro to each aya
Program
type to allow us to fetch its accompanyingProgramInfo
metadata after its been loaded. - Add a new ProgramInfo constructor that builds a new instance using a raw fd.
- Add a smoke test for the loaded_programs() API as well as all the relevant methods on the ProgramInfo type.
- Add helper methods to get useful information from the ProgramInfo
object which is returned by the
-
Plug attach_btf_obj_fd leak
-
Don't store bpf_fd in MapData This is only used in create and therefore can be passed as a parameter.
-
refactor btf_obj_get_info_by_fd to share code
-
add map_ids to bpf_prog_get_info_by_fd Allows the caller to pass a slice which the kernel will populate with map ids used by the program.
-
avoid vector allocation when parsing ksyms
-
Use OwnedFd in FdLink.
-
Remove name from ProgramSection The name here is never used as we get the program name from the symbol table instead.
-
refactor target resolution This attempts to do fewer lossy conversions and to avoid some allocations.
-
extract library path resolving The function is extracted so that a test could be written. This test is valid on linux-gnu targets, and it doesn't need any special privileges. This is in anticipation of removing the code that uses this functionality (seemingly incidentally) from integration tests.
-
Set BPF_F_SLEEPABLE for sleepable programs
-
preallocate the vector This code badly needs tests :(
-
plug file descriptor leak This leaked a file descriptor if bpf_prog_get_info_by_fd failed.
-
push error construction up
-
make
loaded_programs
opaque -
extract common SyscallError We currently have 4 copies of this.
-
sys_bpf
takes mut ref Some syscalls mutate the argument, we can't be passing an immutable reference here. -
avoid repeating BPF_BTF_LOAD dance
-
Return
OwnedFd
forperf_event_open
. This fixes a file descriptor leak when creating a link of BPF_PERF_EVENT attach type. -
better panic messages Always include operands in failing assertions. Use assert_matches over manual match + panic.
-
Use Arc when loading BTF fd This fixes an existing file descriptor leak when there is BTF data in the loaded object.
To avoid lifetime issues while having minimal impact to UX the
OwnedFd
returned from the BPF_BTF_LOAD syscall will be wrapped in anArc
and shared accross the programs and maps of the loaded BPF file. -
Make SysResult generic on Ok variant
-
bpf_prog_get_fd_by_id returns OwnedFd
-
Define dependencies on the workspace level This way we will avoid version mismatches and make differences in features across our crates clearer.
-
Ignore embedded BTF error if not truely required This allows fallback to BTF manual relocation when BTF loading fail when not truely required.
-
compile C probes using build.rs
- Add libbpf as a submodule. This prevents having to plumb its location around (which can't be passed to Cargo build scripts) and also controls the version against which codegen has run.
- Move bpf written in C to the integration-test crate and define constants for each probe.
- Remove magic; each C source file must be directly enumerated in the build script and in lib.rs.
-
don't allocate static strings
-
Make Features part of the public API This commit adds a new probe for bpf_attach_cookie, which would be used to implement USDT probes. Since USDT probes aren't currently supported, we this triggers a dead_code warning in clippy.
There are cases where exposing FEATURES - our lazy static - is actually helpful to users of the library. For example, they may wish to choose to load a different version of their bytecode based on current features. Or, in the case of an orchestrator like bpfd, we might want to allow users to describe which features their program needs and return nice error message is one or more nodes in their cluster doesn't support the necessary feature set.
To do this without breaking the API, we make all the internal members of the
Features
andBtfFeatures
structs private, and add accessors for them. We then add afeatures()
API to avoid leaking the lazy_static. -
Remove iter_key from LPM Trie API Based on the discussion in Discord we've decided to drop the iter_key() API for LPM Trie. According to the kernel self-tests and experimentation done in Aya, providing a key into bpf_map_get_next_id will either:
- If key is an EXACT match, proceed iterating through all keys in the trie from this point
- If key is NOT an EXACT match, proceed iterating through all keys in the trie starting at the leftmost entry.
An API in Aya could be crafted that gets the LPM match + less specific matches for a prefix using these semantics BUT it would only apply to userspace. Therefore we've opted out of fixing this.
-
replace os::unix::prelude with os::fd
-
allow global value to be optional This allow to not error out when a global symbol is missing from the object.
-
add syscall_prefix and syscall_fnname_add_prefix These two functions are needed because kernel symbols representing syscalls have architecture-specific prefixes.
These are the equivalent of bcc's get_syscall_fnname and get_syscall_prefix.
-
Fix uprobe support on 4.16 and lower Fix uprobe support on Ubuntu 18.04.
-
Add support for old ld.so.cache format This fix uprobe support on Debian 10. (and possibly others) This implement support to parse the original libc5 format.
-
Make probe event_alias unique This fixes issues when trying to attach the same kernel function multiple times on 4.17 and lower (possibly upper too?)
-
Do not create data maps on kernel without global data support Fix map creation failure when a BPF have a data section on older kernel. (< 5.2)
If the BPF uses that section, relocation will fail accordingly and report an error.
-
Move program's functions to the same map
-
update bitflags requirement from 1.2.1 to 2.2.1 Updates the requirements on bitflags to permit the latest version.
-
update object requirement from 0.30 to 0.31 Updates the requirements on object to permit the latest version.
updated-dependencies:
- dependency-name: object dependency-type: direct:production ...
-
flip feature "no_std" to feature "std" This fixes
cargo build --all-features
by sidestepping the feature unification problem described in The Cargo Book[0].Add
cargo hack --feature-powerset
to CI to enforce that this doesn't regress (and that all combinations of features work).Since error_in_core is nightly-only, use core-error and a fake std module to allow aya-obj to build without std on stable.
[0] https://doc.rust-lang.org/cargo/reference/features.html#feature-unification
-
Correctly set the kernel code version for Debian kernel Fix BPF syscall failure related to the kernel code version.
-
Correctly set the kernel code version for Ubuntu kernel Fix BPF syscall failure related to the kernel code version.
-
Add sanitize code for kernels without bpf_probe_read_kernel Required for kernel before 5.5.
Also move Features to aya-obj.
-
Do not use unwrap with btf_fd in bpf_create_map Fixes a crash when trying to create a map of type BPF_MAP_TYPE_PERCPU_ARRAY when btf_fd is None.
Tested on Ubuntu 18.04 (4.15.0-202-generic)
-
support relocations across multiple text sections + fixes Fix R_BPF_64_64 text relocations in sections other than .text (for instance .text.unlikely). Also fix misc bugs triggered by integration tests.
-
make it possible to use set_global() with slices of Pod(s)
-
make it possible to use set_global() with slices of Pod(s)
-
Allow to attach XDP probe by interface index
-
Fix MapData Clone implementation The Clone implementation of MapData was previously not storing the result of the dup operation.
-
Add loaded_programs() API to list all loaded programs This uses a Programs iterator to yield all loaded bpf programs using bpf_prog_get_next_id.
-
MapData should be Borrow, not AsRef We don't ever do ref-to-ref conversion for MapData so Borrow should suffice.
-
Fix is_perf_link_supported This was mistakenly comparing the exit code of the syscall, which is always -1 and not the corresponding error-code. Added unit tests to ensure we don't regress.
-
More discrete feature logging Just use the Debug formatter vs. printing a message for each probe.
-
Enable bpf_link for perf_attach programs This adds support for bpf_link to PerfEvent, Tracepoint, Kprobe and Uprobe programs.
-
Add probe for bpf_link_create for perf programs
-
Make features a lazy_static
-
Add support for multibuffer programs This adds support for loading XDP programs that are multi-buffer capable, which is signalled using the xdp.frags section name. When this is set, we should set the BPF_F_XDP_HAS_FRAGS flag when loading the program into the kernel.
-
Add from_pin for Programs This commit adds from_pin() which allows the creation of a Program from a path on bpffs. This is useful to be able to call
attach
or other APIs for programs that are already loaded to the kernel.This differs from #444 since it implements this on the concrete program type, not the Program enum, allowing the user to pass in any additional context that isn't available from bpf_prog_info.
-
fix Lru and LruPerCpu hash maps They were broken by https://github.com/aya-rs/aya/pull/397
-
update documentation and versioning info
- Set the version number of
aya-obj
to0.1.0
. - Update the description of the
aya-obj
crate. - Add a section in README and rustdoc warning about the unstable API.
- Set the version number of
-
add basic documentation to public members Types relevant to maps are moved into aya_obj::maps. Some members are marked
pub(crate)
again. -
migrate aya::obj into a separate crate To split the crate into two, several changes were made:
- Most
pub(crate)
are nowpub
to allow access from Aya; - Parts of BpfError are merged into, for example, RelocationError;
- BTF part of Features is moved into the new crate;
#![deny(missing_docs)]
is removed temporarily;- Some other code gets moved into the new crate, mainly:
- aya::{bpf_map_def, BtfMapDef, PinningType},
- aya::programs::{CgroupSock*AttachType},
The new crate is currenly allowing missing_docs. Member visibility will be adjusted later to minimize exposure of implementation details.
- Most
-
migrate bindgen destination
-
make btf::RelocationError private
-
fix regression computing pointer sizes Computing pointer sizes was broken in #285
-
fix detaching links on drop
-
add missing TryFrom for HashMap, PerCpuHashMap and LpmTrie
-
update object requirement from 0.29 to 0.30 Updates the requirements on object to permit the latest version.
updated-dependencies:
- dependency-name: object dependency-type: direct:production ...
-
Fix the error message in
MapData::pin()
The syscall name isBPF_OBJ_PIN
, notBPF_OBJ_GET
. -
Remove unused dependencies
-
Disable miri warnings about integer-to-pointer conversions
override_syscall
performs integer-to-pointer conversion. This is considered harmful on the newest Rust nightly which providesptr::from_exposed_addr
, but there is no other way on Rust stable than doingas *const T
, which is what miri is unhappy about. -
add BpfLoader::set_max_entries Add BpfLoader::set_max_entries, which sets the max_entries for the specified map, as the load-time option. The max_entries set at map initialization in the ebpf component can be overwritten by this method called on the userspace component. If you want to set max_entries for multiple maps in an ebpf component, you can do so by calling set_max_entries in the form of a method chain.
-
Rename from_pinned and from_path to from_pin
-
Fix review comments from #387
-
Add integration test for pinning lifecycle
-
Replace From for XdpLink with TryFrom
-
Rename bpf_obj_get_info_by_id
-
fix miss doc period
-
change variant names
-
More pinning fixes This commit fixes a bug and adds some missing lifecycle APIs.
- Adds PinnedLink::from_path to create a pinned link from bpffs
- Adds From for FdLink to allow for ^ to be converted
- Adds From for XdpLink
-
Fix segfault in define_link_wrapper The From<$wrapper> for $base implemention is refers to itself, eventually causing a segfault.
-
Improved BTF Type API This commit removes reliance on generated BtfType structs, as well as adding a dedicated struct for each BTF type. As such, we can now add nice accessors like
bits()
andencoding()
for Int vs. inlined shift/mask operations. -
update
VerifierLogLevel
to use bitflags -
Fix Link Pinning
- Removes OwnedLink
- Allows Links to be converted into FdLink
- Introduces a PinnedLink type to handle wrap FdLink when pinned and support un-pinning
-
update
VerifierLogLevel
level variants -
use enum to set verifier log level
-
expose BPF verifier log level configuration
-
Remove MapError::InvalidPinPath
-
Use PinError for all pinning errors
-
Implement FdLink::pin() This allows for FdLinks to also be pinned to BpfFs. In order for it to be called, the user would first call
take_link
to get the underlying link. This can then be destructured to an FdLink where FdLink::pin() may be called. -
Allow pin to be used on all programs This allows for
pin
to be called asXdp::pin()
or Program::pin() - the same way that unload() can be used. This simplifies the use of this API. -
Fix rlimit warning on for 32bit systems
-
Raise the RLIMIT_MEMLOCK warning only if failed to create a map Also, mention that setting the RLIMIT_MEMLOCK to a higher value is an option.
-
Raise the warning when RMILIT_MEMLOCK is not RLIM_INFINITY Kernels before 5.11 don't use cgroup accounting, so they might reach the RLIMIT_MEMLOCK when creating maps. After this change, we raise a warning recommending to raise the RLIMIT_MEMLOCK.
-
Fix latest nightly lints
-
update object requirement from 0.28 to 0.29 Updates the requirements on object to permit the latest version.
updated-dependencies:
- dependency-name: object dependency-type: direct:production ...
-
Improve Extension Docs
-
Add Extension::attach_to_program() This allows for Extension programs already loaded to the kernel to be attached to another program that is BTF-compatible with the one provided at
load()
time -
Replace ProgramFd trait with struct This removes the ProgramFd trait with a struct that wraps a RawFd. Program::fd() has been implemented as well as fd() for each Program Type. This allows for a better API than requiring the use of the ProgramFd trait.
-
Implement attach_to_link for XDP
-
Add support for bpf_link_update
-
Add Map::fd() function to return a MapFd
-
Add crabby, sync with aya/README.md
-
Implement BPF_PROG_TYPE_CGROUP_SOCK
-
Unload programs on drop
Test
- avoid lossy string conversions We can be strict in tests.
- s/assert!(.*) ==/assert_eq!\1,/
One case manually adjusted to
assert_matches!
. - add the possibility to run a test inside a network namespace For tests that do networking operations, this allows to have a clean-state network namespace and interfaces for each test. Mainly, this avoids "device or resource busy" errors when reusing the loopback interface across tests.
Commit Statistics
- 433 commits contributed to the release over the course of 631 calendar days.
- 631 days passed between releases.
- 182 commits were understood as conventional.
- 0 issues like '(#ID)' were seen in commit messages
Commit Details
view details
- Uncategorized
- Don't use path deps in workspace (
13b1fc6
) - Merge pull request #892 from dave-tucker/breaking-changes-v2 (
daa5a47
) - Merge pull request #891 from dave-tucker/changelog (
431ce23
) - Document more breaking changes (
2d9d7a1
) - Add CHANGELOG (
12280a8
) - Merge pull request #889 from dave-tucker/breaking-changes (
5c9c044
) - Document breaking changes (
281ac1a
) - Merge pull request #882 from dave-tucker/metadata (
0fadd69
) - Use the cargo workspace package table (
b3e7ef7
) - Merge pull request #885 from dave-tucker/nightly-up (
2d72197
) - Appease clippy unused imports (
770a95e
) - Appease rustc dead_code lint (
963dd13
) - Invalid transmute when calling fd (
c31cce4
) - Merge pull request #878 from alessandrod/missing-exports (
46b4805
) - Reformat to please rustfmt (
2be705b
) - Reorder imports a bit (
9b4f876
) - Export some missing modules (
d570450
) - Perf_event: add inherit argument to attach() (
0f6a734
) - Add StackTraceMap::remove() (
92b1947
) - Merge pull request #865 from tamird/appease-lint (
09851a2
) - Appease new nightly clippy lints (
7022528
) - Merge pull request #861 from tamird/appease-lint (
604742a
) - Appease nightly lint (
7c1bfef
) - Add SchedClassifier::attach_to_link (
2257cbe
) - Add SchedClassifierLink::attach_type() getter (
b13645b
) - Merge pull request #858 from dave-tucker/ringbuf-doctests (
13f21dc
) - Fix ringbuf docs (
e9e2f48
) - Pin for (async)perf_event_array (
b176967
) - Merge pull request #843 from ajwerner/ringbuf-send-sync (
931cd55
) - Make RingBuf: Send + Sync (
c06fcc3
) - Extracting program and map names with the same function (
15faca8
) - Add MapInfo struct following the same pattern as ProgramInfo (
4d24d1c
) - Support loading a map by fd (
36420d9
) - Make KernelVersion::code public (
68ba020
) - Merge pull request #746 from dave-tucker/markdownlint (
958931e
) - Add markdownlint (
8780a50
) - Merge pull request #825 from aya-rs/dependabot/cargo/async-io-2.0 (
67fe16e
) - Update async-io requirement from 1.3 to 2.0 (
c89b2d1
) - Merge pull request #821 from Tuetuopay/fix-udeps (
f037a94
) - Fix unused async-io dependency linter error (
984c08c
) - Merge pull request #629 from ajwerner/ringbuf (
6284994
) - Implement RingBuf (
e2cf734
) - Move mmap from perf_buffer.rs to sys/mod.rs (
4af9d1b
) - Impl Fromobj::InvalidMapTypeError for MapTypeError (
b73c0a4
) - Merge pull request #814 from tamird/sort-variants-again (
cb455fe
) - Sort variants (
8462b69
) - Merge pull request #812 from tamird/redundant-cargo (
715d490
) - Merge pull request #813 from tamird/sort-variants (
ae612a0
) - Merge pull request #811 from tamird/libc (
b7ceee4
) - Import types from std::ffi rather than libc (
5cdd1ba
) - Sort variants (
5e63707
) - Remove redundant keys (
cc48523
) - Merge pull request #783 from astoycos/map_pin2 (
ef27bce
) - Add pin() api (
7b71c7e
) - Fix libbpf_pin_by_name (
0bf97eb
) - Merge pull request #806 from vadorovsky/deprecate-syscall-prefix (
66bd85a
) - Deprecate
syscall_prefix
(bd6ba3a
) - Merge pull request #797 from aya-rs/rustfmt-group-imports (
373fb7b
) - Group_imports = "StdExternalCrate" (
d16e607
) - Merge pull request #791 from nrxus/fix-kernel-code-on-submode-gt-255 (
6786383
) - Fix program loading on kernels with a patch > 255 (
0a6a267
) - Merge pull request #527 from Tuetuopay/xdpmaps (
7f9ce06
) - Aya, bpf: misc fixes following review comments (
579e3ce
) - Merge pull request #769 from astoycos/fix-loaded-at (
c130500
) - Fix load time and add test (
dffff1c
) - Make maps work on kernels not supporting ProgIds (
00dc7a5
) - Use ProgramFd instead of impl AsRawFd (
c6754c6
) - Add documentation for XDP maps (
9ed1d3d
) - Fix docstring missing trailing period (
f7fbbcd
) - Add support for chained xdp programs in {cpu,dev}map (
0647927
) - Add support for map-bound XDP programs (
139f382
) - Update XDP maps implementations (
ede3e91
) - Implement XDP Map Types (
ec8293a
) - Merge pull request #790 from dave-tucker/no-map-pinned (
42fd82e
) - Make MapData::pin pub (
938f979
) - Remove MapData::pinned (
0f4021e
) - Merge pull request #782 from astoycos/prog-info (
0b6ea31
) - Merge pull request #770 from aya-rs/mapfd-is-owned (
41d01f6
) - Fix typos, avoid fallible conversions (
0dacb34
) - MapData::{obj, fd} are private (
b4d5a1e
) MapFd
andSockMapFd
are owned (f415926
)- Add program_info() api to program (
6ab7475
) - Merge pull request #775 from aya-rs/perf-as-raw-fd (
92d3056
) - Merge pull request #774 from ajwerner/try_from_LruHash (
8d3fc49
) - Support TryFrom for LRU hash maps (
172859c
) - Merge pull request #777 from ajwerner/ajwerner/TryFrom-macros (
792f467
) - Rework TryFrom macros (
2a1bf60
) - Access inner through async (
8b0c7f1
) - Merge pull request #772 from aya-rs/link-owned (
8668436
) - Merge pull request #771 from aya-rs/xdp-raw (
c4d1d10
) - ProgAttachLink and LircLink hold owned FDs (
204d020
) - Use OwnedFd (
cee0265
) - Merge pull request #723 from nrxus/map-program-owned-fd (
c4643b3
) - Use AsFd when attaching fds to programs (
6895b1e
) - Use BorrowedFd when using the program fd in sys/bpf.rs (
d2e74e5
) - Merge pull request #765 from aya-rs/more-utf8-fixes (
461c275
) - Support non-UTF8 probing (
1ccfdbc
) - Merge pull request #742 from aya-rs/avoid-utf-assumption (
8ffd9bb
) - Avoid path UTF-8 assumptions (
0bba9b1
) - Avoid lossy string conversions (
572d047
) - Merge pull request #763 from aya-rs/lints (
ff8c124
) - Deny various allow-by-default lints (
abda239
) - Merge pull request #764 from aya-rs/fix-docs (
1fa1241
) - Fix docs build (
9ff1bf3
) - Merge pull request #758 from aya-rs/map-fd-not-option (
1d5f764
) - BloomFilter::insert takes &mut self (
a31544b
) - MapData::fd is non-optional (
89bc255
) - Merge pull request #757 from aya-rs/attach-fd-owned (
c7b5cd5
) - Use RAII to close FDs (
3d68fa3
) ProgramData::attach_prog_fd
is owned (ae6526e
)- Merge pull request #744 from aya-rs/programfd-borrowed (
e813a05
) ProgramFd
is owned (504fd1d
)- Merge pull request #637 from astoycos/helpers (
bcc9743
) - Add helper methods for ProgramInfo (
e1a5568
) - Merge pull request #702 from dave-tucker/mapdata-btffd (
03c5012
) - Merge pull request #748 from aya-rs/btf_obj_fd-owned (
7f98e41
) - Plug attach_btf_obj_fd leak (
d88ca62
) - Don't store bpf_fd in MapData (
db975e9
) - Merge pull request #747 from aya-rs/helpers (
5bc922a
) - Refactor btf_obj_get_info_by_fd to share code (
5ac1862
) - Add map_ids to bpf_prog_get_info_by_fd (
c7a19bc
) - Merge pull request #743 from aya-rs/avoid-vec-ksyms (
90cf131
) - Avoid vector allocation when parsing ksyms (
5138c73
) - Merge pull request #740 from addisoncrump/main (
0c0cf70
) - Nuclear option: no symbol resolution in the crate (
ed77727
) - Merge pull request #725 from dave-tucker/enum64 (
2a55fc7
) - Aya, aya-obj: Implement ENUM64 fixups (
e38e256
) - Merge pull request #709 from nrxus/fd-link-owned-fd (
bd5442a
) - Use OwnedFd in FdLink. (
8ebf0ac
) - Merge pull request #720 from dave-tucker/programsection-noname (
e915379
) - Extract trait SymbolResolver (
d8709de
) - Merge pull request #718 from ajwerner/better-code (
ef6308b
) - Remove name from ProgramSection (
cca9b8f
) - Refactor target resolution (
81fb4e5
) - Merge pull request #717 from ajwerner/no-libc-in-integration-tests (
de8604d
) - Merge pull request #711 from dave-tucker/sleepable (
77e9603
) - Extract library path resolving (
dcc6b84
) - Merge pull request #712 from aya-rs/loaded-links (
368ddf1
) - Add links iterator (
30faa5f
) - Merge pull request #716 from aya-rs/prealloc-vec (
b1bf61c
) - Set BPF_F_SLEEPABLE for sleepable programs (
71737f5
) - Preallocate the vector (
89ef97e
) - Plug file descriptor leak (
7bb9b7f
) - Push error construction up (
b1404e9
) - Make
loaded_programs
opaque (a0af7e0
) - Extract common SyscallError (
de8519a
) sys_bpf
takes mut ref (4cb3ea6
)- Merge pull request #714 from aya-rs/dry-btf-load (
f095c59
) - Avoid repeating BPF_BTF_LOAD dance (
7ee6f52
) - Merge pull request #706 from aya-rs/reloc-tests (
3692e53
) - S/assert!(.*) ==/assert_eq!\1,/ (
6f3cce7
) - Merge pull request #707 from aya-rs/one-option-not-two (
4c3219f
) - Reduce state cardinality from 4 to 2 (
0ec9afd
) - Merge pull request #701 from nrxus/perf-event-owned-fd (
445cb8b
) - Return
OwnedFd
forperf_event_open
. (dbfba18
) - Merge pull request #704 from aya-rs/better-panic (
868a9b0
) - Better panic messages (
17f25a6
) - Merge pull request #696 from Tuetuopay/tests-netns (
f705eab
) - Add the possibility to run a test inside a network namespace (
c74813f
) - Merge pull request #699 from aya-rs/cache-again-god-damn-it (
e95f76a
) - Do not escape newlines on Err(LoadError).unwrap() (
8961be9
) - Merge pull request #662 from nrxus/use-owned-fd-for-btf (
13e83b2
) - Use Arc when loading BTF fd (
ea96c29
) - Make SysResult generic on Ok variant (
683a1cf
) - Replace std::os::unix::io for std::os::fd (
c63d990
) - Merge pull request #688 from aya-rs/get-fd-owned (
53d36a3
) - Bpf_prog_get_fd_by_id returns OwnedFd (
76c78e3
) - Merge pull request #667 from vadorovsky/workspace-dependencies (
f554d42
) - Define dependencies on the workspace level (
96fa08b
) - Merge pull request #671 from dave-tucker/misc-fixes (
7ac808c
) - Clippy fixes for latest nightly (
764eb30
) - Merge pull request #656 from aya-rs/kernel-version-fml (
232cd45
) - Handle WSL kernel version strings (
35ed85a
) - Replace matches with assert_matches (
961f45d
) - Merge pull request #650 from aya-rs/test-cleanup (
61608e6
) - Merge pull request #584 from marysaka/fix/btf-kern-optional (
0766e70
) - Don't use env::tempdir (
5407d4a
) - Remove "async" feature (
fa91fb4
) - Ignore embedded BTF error if not truely required (
74b5468
) - Fix build (
242d8c3
) - Merge pull request #520 from astoycos/unsupported-map (
eb60d65
) - Merge pull request #560 from astoycos/fix-perf-link-pin (
edb7baf
) - Add FdLink documentation and example (
80b371f
) - Merge pull request #644 from aya-rs/build-script (
7def6d7
) - Implement FdLink conversions (
58895db
) - Compile C probes using build.rs (
8c61fc9
) - Merge pull request #648 from aya-rs/clippy-more (
a840a17
) - Clippy over tests and integration-ebpf (
e621a09
) - Merge pull request #643 from aya-rs/procfs (
6e9aba5
) - Type-erase KernelVersion::current error (
a1e0130
) - Invert comparison (
6bceb1c
) - Rewrite kernel version logic (
6e570f0
) - Remove procfs dependency (
cc2bc0a
) - Remove verifier log special case (
b5ebcb7
) - Merge pull request #641 from aya-rs/logger-messages-plz (
4c0983b
) - Get verifier logs when loading programs (
b45a5bb
) - Hide details of VerifierLog (
6b94b20
) - Use procfs crate for kernel version parsing (
b611038
) - Merge pull request #642 from aya-rs/less-strings (
32be47a
) - Don't allocate static strings (
27120b3
) - Merge pull request #639 from aya-rs/test-no-bpftool (
e93e3c4
) - Remove dependency on bpftool in integration tests (
ff86f13
) - Merge pull request #531 from dave-tucker/probe-cookie (
bc0d021
) - Make Features part of the public API (
47f764c
) - Merge pull request #526 from dave-tucker/trie (
76d35d1
) - Remove iter_key from LPM Trie API (
00c480d
) - Merge pull request #633 from ajwerner/change-fd-import (
5c6bd55
) - Replace os::unix::prelude with os::fd (
65d10f9
) - Merge pull request #632 from marysaka/feat/global-data-optional (
b2737d5
) - Update aya/src/bpf.rs (
77cce84
) - Allow global value to be optional (
93435fc
) - Fixups in response to alessandrod review (
17930a8
) - Add Unsupported Map type (
b5719c5
) - Merge pull request #625 from FedericoPonzi/issue-534 (
9cdae81
) - Add syscall_prefix and syscall_fnname_add_prefix (
987e848
) - Merge pull request #622 from marysaka/fix/uprobe-416-lower (
e5bac02
) - Fix uprobe support on 4.16 and lower (
49c6f5d
) - Merge pull request #621 from marysaka/fix/uprobe-debian-10 (
41fe944
) - Add support for old ld.so.cache format (
8e9f395
) - Merge pull request #619 from poliorcetics/relax-ordering-probe-alias (
37b7c1e
) - Relax unnecessarily strict atomic ordering on probe event_alias (
243986c
) - Merge pull request #618 from marysaka/fix/aya-probe-event-alias-uniq (
d56ed8f
) - Make probe event_alias unique (
e9be3d9
) - Merge pull request #602 from marysaka/fix/btf-reloc-all-functions (
3a9a54f
) - Merge pull request #616 from nak3/fix-bump (
3211d2c
) - Add a few tweak a code to fix libbpf's API change. (
afb4aa1
) - Fixed a typo in the per_cpu_hashmap documentation (
3d1013d
) - Merge pull request #607 from Hanaasagi/fix-warning (
d4bfd72
) - Remove useless
any
all
in cfg. (0e4aec4
) - Merge pull request #605 from marysaka/fix/global-data-reloc-ancient-kernels (
9c437aa
) - Do not create data maps on kernel without global data support (
591e212
) - Move program's functions to the same map (
9e1109b
) - Merge pull request #592 from probulate/update-bitflags (
67f480e
) - Update bitflags requirement from 1.2.1 to 2.2.1 (
ae8a95b
) - Merge pull request #577 from aya-rs/dependabot/cargo/object-0.31 (
deb054a
) - Merge pull request #545 from epompeii/lsm_sleepable (
120b59d
) - Update object requirement from 0.30 to 0.31 (
4c78f7f
) - Merge pull request #586 from probulate/no-std-inversion (
45efa63
) - Flip feature "no_std" to feature "std" (
33a0a2b
) - Merge branch 'aya-rs:main' into lsm_sleepable (
1f2006b
) - Merge pull request #525 from dave-tucker/borrow (
ed14751
) - Merge pull request #579 from marysaka/fix/ubuntu-debian-kernel-version-code (
1066c6c
) - Correctly set the kernel code version for Debian kernel (
3aeeb81
) - Correctly set the kernel code version for Ubuntu kernel (
f1d8918
) - Merge pull request #582 from marysaka/feature/no-kern-read-sanitizer (
b5c2928
) - Add sanitize code for kernels without bpf_probe_read_kernel (
1132b6e
) - Merge pull request #580 from marysaka/fix/bpf_create_map_panic (
edd9928
) - Do not use unwrap with btf_fd in bpf_create_map (
7c25fe9
) - Merge pull request #572 from alessandrod/reloc-fixes (
542ada3
) - Support relocations across multiple text sections + fixes (
93ac3e9
) - Aya, aya-obj: refactor map relocations (
401ea5e
) - Review (
85714d5
) - Program_section (
17f497c
) - Merge pull request #557 from drewvis/main (
b13070a
) - Make it possible to use set_global() with slices of Pod(s) (
bcb2972
) - Added code check comment (
8f64cf8
) - Add check for empty tracefs mounts (
3a2c0cd
) - Revert "aya: make it possible to use set_global() with slices of Pod(s)" (
8ef00c4
) - Make it possible to use set_global() with slices of Pod(s) (
b614ffd
) - Merge pull request #548 from kriomant/feature-xdp-attach-by-index (
d6319f9
) - Don't leak libc types (
ce60854
) - Fix formatting (
896e3ab
) - Rename method and fix comment (
676b5cd
) - Allow to attach XDP probe by interface index (
2e3c177
) - Merge pull request #539 from marysaka/fix/map_data_clone (
113e3ef
) - Fix MapData Clone implementation (
94049ec
) - Merge pull request #524 from dave-tucker/prog_list (
d9878a6
) - Add loaded_programs() API to list all loaded programs (
de4905a
) - MapData should be Borrow, not AsRef (
b1a70fc
) - Merge pull request #523 from dave-tucker/fix_perf_link (
56c1438
) - Fix is_perf_link_supported (
ce79de7
) - Merge pull request #522 from dave-tucker/perf_link (
d7d6442
) - More discrete feature logging (
7479c1d
) - Enable bpf_link for perf_attach programs (
d0b3d3b
) - Add probe for bpf_link_create for perf programs (
763b92a
) - Make features a lazy_static (
ce22ca6
) - Merge pull request #519 from dave-tucker/frags (
bc83f20
) - Add support for multibuffer programs (
a18693b
) - Merge pull request #496 from dave-tucker/program-from-pinned3 (
811ab29
) - Add from_pin for Programs (
7a720ab
) - Merge pull request #515 from alessandrod/fix-lru-hash (
cfa693b
) - Fix Lru and LruPerCpu hash maps (
c22014c
) - Merge pull request #512 from astoycos/crucial-btf-fixes (
27017ca
) - Support BTF key/value specification for all maps (
52e6250
) - Merge pull request #445 from anfredette/tc-link-recon (
22d7931
) - Address review comments from @alessandrod (
7c24296
) - Merge pull request #471 from banditopazzo/tracefs_mount_select (
7e5637b
) - Tracefs review fixes (
48fdf5a
) - Get_tracefs function (
c6c4ac7
) - Updates after rebase due to changes in define_link_wrapper (
d43879d
) - Remove SchedClassifierLink description (
6766532
) - Address review comments (
2972d46
) - Address review comments (
65f5b76
) - Rename SchedClassifierLink:new() to new_tc_link() (
849796c
) - Additional edits to SchedClassifierLink documentation. (
67efc33
) - Combine updates to SchedClassifierLink example made by Dave Tucker (
6563e6c
) - Add example for SchedClassifierLink::new() (
c3a8400
) - Support reconstruction of
SchedClassifierLink
(f46fd17
) - Expose inner errors (
1899d5f
) - Merge pull request #484 from vadorovsky/update-tokio (
bea0e83
) - Update Tokio and inventory (
dad75f4
) - Merge pull request #475 from yesh0/aya-obj (
897957a
) - Update documentation and versioning info (
9c451a3
) - Add basic documentation to public members (
e52497c
) - Migrate aya::obj into a separate crate (
ac49827
) - Migrate bindgen destination (
81bc307
) - Btf relocs: don't panic on failed relocation (
c6f93b1
) - Make btf::RelocationError private (
aba99ea
) - Fix regression computing pointer sizes (
12e422b
) - Resolve symbol address for PIE executables (
1a22792
) - Fix detaching links on drop (
b3ae778
) - Merge pull request #461 from FallingSnow/main (
9f5d157
) - Fix LpnTrieKeys -> LpmTrieKeys typo (
10ac595
) - Merge pull request #466 from bpfdeploy-io/ml/cgroup-device (
d1919a8
) - Fix doctest issue (
925504f
) - Fix CI, clippy and feedback (
4b6d97e
) - Add support for BPF_PROG_TYPE_CGROUP_DEVICE (
8f1163a
) - Fix formatting (
a44f054
) - Merge pull request #460 from Tuetuopay/owned-per-cpu-hash-map (
66d435f
) - Remove old test (
1368eb9
) - Add ability to iterate over lpmtrie key matches (
9a3682e
) - Fix lpmtrie iter returning nothing (
8fe64ae
) - Add missing TryFrom for HashMap, PerCpuHashMap and LpmTrie (
51bb50e
) - Iterate lpmtrie (
e4182a9
) - Merge pull request #456 from dmitris/uninlined_format_args (
16b029e
) - Fix uninlined_format_args clippy issues (
055d94f
) - Merge pull request #450 from aya-rs/dependabot/cargo/object-0.30 (
1ded0e6
) - Update object requirement from 0.29 to 0.30 (
1fe7bba
) - Merge pull request #452 from vadorovsky/fix-lint (
9382de7
) - Fix clippy error (
176d61a
) - Merge pull request #418 from anfredette/tc-handle (
7fef833
) - Make doc fixes (
abb75ba
) - Merge pull request #431 from 0b01/refs (
88d7777
) - Fix formatting (
76e417a
) - Support both attach() and attach_with_options() for SchedClassifier (
a3e3e80
) - Merge pull request #435 from vadorovsky/pin-fix-error-msg (
3e089a6
) - Fix the error message in
MapData::pin()
(e0a9895
) - Make sure everything is marked correctly (
6ce60ad
) - Fix array (
9525b1a
) - Fix wrong bounds (
575fea4
) - Cargo fmt (
fbfbedb
) - Use & (
9991ffb
) - Add test case (
e9ec257
) - Use Borrow instead (
1247ffc
) - Use a struct for setting priority and handle in SchedClassfier attach (
af3de84
) - Support using handle in tc programs (
ac07608
) - Merge pull request #397 from astoycos/refactor-map-api2 (
d6cb1a1
) - Fix doc links, update rustdoc args (
82edd68
) - Make map APIs return an option (
f3262e8
) - Fixups4 (
4ddf260
) - Fixups 3 (
440097d
) - Fixups 2 (
939d16c
) - Fixups (
8009361
) - Implement Copy for MapData (
893f9f4
) - Use SockMapFd (
898a14d
) - Core refactor of Map API (
1aefa2e
) - Merge branch 'aya-rs:main' into integration-tests-cli-options (
4183c7a
) - Merge pull request #411 from abhijeetbhagat/fix-warnings (
94bc93e
) - Fix all clippy warnings (
6c813b8
) - Merge pull request #406 from dave-tucker/unused-deps (
57ab0d7
) - Remove unused dependencies (
ec2bd69
) - Merge pull request #404 from dave-tucker/async-docs (
14ba644
) - Add labels for optional features (
95e8c78
) - Merge pull request #398 from vadorovsky/fix-miri (
3f2f3a8
) - Disable miri warnings about integer-to-pointer conversions (
43aff57
) - Avoid integer to pointer casts (
2432677
) - Merge pull request #393 from aztecher/impl-set_max_entries (
a93a975
) - Add BpfLoader::set_max_entries (
2eccf1d
) - Merge pull request #394 from vadorovsky/clippy (
6eca4f5
) - Fix clippy warnings (
5a4b5ff
) - Merge pull request #391 from dave-tucker/fix-387 (
e696389
) - Rename from_pinned and from_path to from_pin (
5693fb9
) - Fix review comments from #387 (
de6fa98
) - Merge pull request #387 from astoycos/map-from-prog (
eb26a6b
) - Add
from_pinned
andfrom_fd
methods (8a9cbf1
) - Merge pull request #378 from dave-tucker/pin-fixes-again (
98e25ca
) - Add integration test for pinning lifecycle (
7c244e1
) - Replace From for XdpLink with TryFrom (
f961cbb
) - Rename bpf_obj_get_info_by_id (
6af2053
) - Merge pull request #376 from conectado/verifier-log-level (
fe22b02
) - Fix miss doc period (
3bed2c2
) - Change variant names (
c30ae6e
) - More pinning fixes (
4b5b9ab
) - Merge pull request #384 from aya-rs/codegen (
7b99a57
) - [codegen] Update libbpf to efd33720cdf4a0049323403df5daad0e9e894b3dUpdate libbpf to efd33720cdf4a0049323403df5daad0e9e894b3d (
ed849ff
) - Merge pull request #381 from aya-rs/codegen (
49c5a94
) - [codegen] Update libbpf to efd33720cdf4a0049323403df5daad0e9e894b3dUpdate libbpf to efd33720cdf4a0049323403df5daad0e9e894b3d (
8e96011
) - Merge pull request #379 from dave-tucker/fix-link-segfault (
9451699
) - Fix segfault in define_link_wrapper (
18584e2
) - Merge pull request #285 from dave-tucker/btf-redux (
66b4f79
) - Improved BTF Type API (
f34ebeb
) - Update
VerifierLogLevel
to use bitflags (7b14319
) - Merge pull request #366 from dave-tucker/pin-redux-2 (
4826bf7
) - Fix Link Pinning (
4c1d645
) - Merge pull request #371 from conectado/verifier-log-level (
b95adc3
) - Update
VerifierLogLevel
level variants (a602525
) - Use enum to set verifier log level (
edd8039
) - Expose BPF verifier log level configuration (
3211646
) - Change from Rust edition 2018 to 2021 (
944d6b8
) - Add support for setting priority for classifier programs (
207c689
) - Merge pull request #355 from dave-tucker/rm-map-pin-path (
55a7e3c
) - Remove MapError::InvalidPinPath (
03a15b9
) - Merge pull request #343 from dave-tucker/pinning-redux (
8e6c9ad
) - Use PinError for all pinning errors (
34ba2bc
) - Implement FdLink::pin() (
64f8a43
) - Allow pin to be used on all programs (
5726b6d
) - Merge pull request #350 from dave-tucker/monorepo (
f37a514
) - Fix rlimit warning on for 32bit systems (
c9e70a8
) - Merge pull request #140 from dave-tucker/btf-maps (
73ee3cf
) - Support BTF Maps (
f976229
) - Merge pull request #344 from vadorovsky/rlimit-v2 (
fa4347a
) - Raise the RLIMIT_MEMLOCK warning only if failed to create a map (
3d592d0
) - Merge pull request #342 from vadorovsky/rlimit (
a7fa938
) - Raise the warning when RMILIT_MEMLOCK is not RLIM_INFINITY (
bebe98e
) - Merge pull request #336 from dave-tucker/clippy (
6188c9d
) - Fix latest nightly lints (
336faf5
) - Merge pull request #330 from aya-rs/dependabot/cargo/object-0.29 (
f2fb211
) - Update object requirement from 0.28 to 0.29 (
661a215
) - Merge pull request #328 from drewkett/map-update-no-key (
a301a56
) - Merge pull request #282 from dave-tucker/bpfd (
e5f455f
) - Improve Extension Docs (
004f3dd
) - Add Extension::attach_to_program() (
9e85b92
) - Replace ProgramFd trait with struct (
b441332
) - Implement attach_to_link for XDP (
fd52bfe
) - Add support for bpf_link_update (
ccb1897
) - Have bpf_map_update_elem take Option<&K> for key (
36edf09
) - Add Map::fd() function to return a MapFd (
623579a
) - Merge pull request #320 from dave-tucker/moar-crabby-docs (
ed3b690
) - Add crabby, sync with aya/README.md (
2b98259
) - Add crabby logo (
713cd4e
) - Merge pull request #315 from dave-tucker/sock (
7549eb9
) - Implement BPF_PROG_TYPE_CGROUP_SOCK (
7b21a2d
) - Unload programs on drop (
0cd1e51
)
- Don't use path deps in workspace (
v0.11.0 (2022-06-06)
Other
-
Rename forget_link to take_link
-
Add support for BPF_PROG_TYPE_SK_LOOKUP
-
Export program modules This allows access to XdpLink, XdpLinkId etc... which is currently unavailable since these modules are private
-
fix new lints on nightly
-
Add all crates to sidebar
-
Add BPF_PROG_TYPE_CGROUP_SOCK_ADDR
-
Implement forget_link
-
Fix lint against latest nightly
-
Relocate maps using symbol_index Since we support multiple maps in the same section, the section_index is no longer a unique way to identify maps. This commit uses the symbol index as the identifier, but falls back to section_index for rodata and bss maps since we don't retrieve the symbol_index during parsing.
-
revert version to 0.10.7 The world isn't ready to have pre-releases in git
-
rework links Remove LinkRef and remove the Rc<RefCell<_>> that was used to store type-erased link values in ProgramData. Among other things, this allows
Bpf
to beSend
, which makes it easier to use it with async runtimes.Change the link API to:
let link_id = prog.attach(...)?; ... prog.detach(link_id)?;
Link ids are strongly typed, so it's impossible to eg:
let link_id = uprobe.attach(...)?; xdp.detach(link_id);
As it would result in a compile time error.
Links are still stored inside ProgramData, and unless detached explicitly, they are automatically detached when the parent program gets dropped.
-
Support multiple maps in map sections This commit uses the symbol table to discover all maps inside an ELF section. Instead of doing what libbpf does - divide the section data in to equal sized chunks - we read in to section data using the symbol address and offset, thus allowing us to support definitions of varying lengths.
-
perf_buffer: call BytesMut::reserve() internally This changes PerfBuffer::read_events() to call BytesMut::reserve() internally, and deprecates PerfBufferError::MoreSpaceNeeded.
This makes for a more ergonomic API, and allows for a more idiomatic usage of BytesMut. For example consider:
let mut buffers = vec![BytesMut::with_capacity(N), ...]; loop { let events = oob_cpu_buf.read_events(&mut buffers).unwrap(); for buf in &mut buffers[..events.read] { let sub: Bytes = buf.split_off(n).into(); process_sub_buf(sub); } ... }
This is a common way to process perf bufs, where a sub buffer is split off from the original buffer and then processed. In the next iteration of the loop when it's time to read again, two things can happen:
-
if processing of the sub buffer is complete and
sub
has been dropped, read_events() will call buf.reserve(sample_size) and hit a fast path in BytesMut that will just restore the original capacity of the buffer (assuming sample_size <= N). -
if processing of the sub buffer hasn't ended (eg the buffer has been stored or is being processed in another thread), buf.reserve(sample_size) will actually allocate the new memory required to read the sample.
In other words, calling buf.reserve(sample_size) inside read_events() simplifies doing zero-copy processing of buffers in many cases.
-
Commit Statistics
- 45 commits contributed to the release over the course of 57 calendar days.
- 79 days passed between releases.
- 13 commits were understood as conventional.
- 3 unique issues were worked on: #256, #264, #268
Commit Details
view details
- #256
- Add support for BPF_PROG_TYPE_CGROUP_SYSCTL (
f721021
)
- Add support for BPF_PROG_TYPE_CGROUP_SYSCTL (
- #264
- Program unload API (
e2685c9
)
- Program unload API (
- #268
- Add support for BPF_PROG_TYPE_CGROUP_SOCKOPT (
e68d734
)
- Add support for BPF_PROG_TYPE_CGROUP_SOCKOPT (
- Uncategorized
- (cargo-release) version 0.11.0 (
d85b36f
) - Merge pull request #306 from dave-tucker/take_link (
4ae5bc4
) - Rename forget_link to take_link (
b2a6f00
) - Merge pull request #296 from aya-rs/codegen (
de8ab7f
) - [codegen] Update libbpf to 4eb6485c08867edaa5a0a81c64ddb23580420340Update libbpf to 4eb6485c08867edaa5a0a81c64ddb23580420340 (
bbb34b3
) - Merge pull request #286 from nak3/add-BPF_MAP_TYPE_BLOOM_FILTER (
1633700
) - Fix typo, take & to query the value (
c192817
) - Merge pull request #265 from dave-tucker/sklookup (
a047354
) - Add support for BPF_PROG_TYPE_SK_LOOKUP (
2226b89
) - Add support for BPF_MAP_TYPE_BLOOM_FILTER (
c4262f7
) - Merge pull request #281 from dave-tucker/export (
7d8365c
) - Export program modules (
824baf9
) - Merge pull request #279 from aya-rs/codegen (
de1559a
) - [codegen] Update libbpf to 47595c2f08aece55baaf21ed0b72f5c5abf2cb5eUpdate libbpf to 47595c2f08aece55baaf21ed0b72f5c5abf2cb5e (
4767664
) - Merge pull request #278 from dave-tucker/riscv (
b71fe64
) - Riscv scaffolding for codegen (
edaa70b
) - Merge pull request #276 from dave-tucker/clippy (
0d7fb44
) - Fix new lints on nightly (
4a32e7d
) - Merge pull request #273 from dave-tucker/fix_sidebar (
9904237
) - Add all crates to sidebar (
ba312c4
) - Merge pull request #263 from nak3/cgroup-skb-attach-type (
63b6286
) - Merge pull request #267 from aya-rs/codegen (
aacf6ec
) - [codegen] Update libbpf to 86eb09863c1c0177e99c2c703092042d3cdba910Update libbpf to 86eb09863c1c0177e99c2c703092042d3cdba910 (
7f7c78a
) - Use map() (
5d22869
) - Merge pull request #261 from dave-tucker/cgroup_sock (
8fd8816
) - Add BPF_PROG_TYPE_CGROUP_SOCK_ADDR (
af54b6c
) - Set attach type during load for BPF_PROG_TYPE_CGROUP_SKB (
29c10fa
) - Merge pull request #253 from dave-tucker/forget (
2fca4ae
) - Implement forget_link (
8069ad1
) - Merge pull request #254 from dave-tucker/clippy (
e71e07f
) - Fix lint against latest nightly (
cdaa3af
) - Merge pull request #252 from dave-tucker/multimap-relo (
4afc5ea
) - Relocate maps using symbol_index (
d1f2215
) - Revert version to 0.10.7 (
4e57d1f
) - Merge pull request #251 from aya-rs/codegen (
e1f448e
) - [codegen] Update libbpf to 3a4e26307d0f9b227e3ebd28b443a1a715e4e17dUpdate libbpf to 3a4e26307d0f9b227e3ebd28b443a1a715e4e17d (
d6ca3e1
) - Merge pull request #249 from alessandrod/new-links (
b039ac5
) - Rework links (
cb57d10
) - Merge pull request #181 from dave-tucker/multimap (
5472ac0
) - Support multiple maps in map sections (
f357be7
) - Merge pull request #243 from alessandrod/perf-reserve (
a1d4499
) - Perf_buffer: call BytesMut::reserve() internally (
ad1636d
)
- (cargo-release) version 0.11.0 (
v0.10.7 (2022-03-19)
Chore
- formatting
Bug Fixes
-
make maps compatible with kernel <= 4.14 In kernel 4.15 and additional parameter was added to allow maps to have names but using this breaks on older kernels.
This change makes it so the name is only added on kernels 4.15 and newer.
Other
-
fix lint errors
-
Improve documentation of set_global method Use
static
instead ofconst
and mention the necessity of usingcore::ptr::read_volatile
. -
Fix Loading from cgroup/skb sections
fa037a88e2
allowed for cgroup skb programs that did not specify an attach direction to use the cgroup/skb section name per the convention established in libbpf. It did not add the necessary code to load programs from those sections which is added in this commit -
implement Pod for arrays of Pod types If a type is POD (meaning it can be converted to a byte array), then an array of such type is POD.
-
update parking_lot requirement from 0.11.1 to 0.12.0 Updates the requirements on parking_lot to permit the latest version.
updated-dependencies:
- dependency-name: parking_lot dependency-type: direct:production ...
-
fix func_info/line_info offsets Given the new start instruction offset, rebase func_infos and line_infos.
-
relocate .text references Handle relocations against .text symbols in all instructions not just calls. Makes it so that let x = &some_function triggers linking of some_function in the current program and handles the resulting relocation accordingly.
Among other things, enables the use of bpf_for_each_map_elem.
-
Replace / in DATASEC before load to kernel This replaces the / character with a . which is allowed in the kernel names. Not allowing a forward slash is perhaps a kernel bug, but lets fix it up here as it's commonly used for Aya
-
fix match arms Don't match on kind and use if let... Match on the BtfType
-
add a test for each BTF fix
-
fix borrow check errors
-
Merge Fixup and Sanitzation to single step Aya will now perform sanitzation and fixups in a single phase, requiring only one pass over the BTF. This modifies the parsed BTF in place.
-
Fix BTF verifier output Currently errors can occur if the verifier output is > buffer as we get ENOMEM. We should only provide a log_buf if initial load failed, then retry up to 10 times to get full verifier output.
To DRY this logic it has been moved to a function so its shared with program loading
-
fix sanitization if BTF_FUNC_GLOBAL is not supported The lower 16 bits were not actually being cleared.
-
fixup func protos If an argument has a type, it must also have a name, see btf_func_check in the kernel.
-
run fixup in place
-
Fix name truncation
-
Truncate long program names
-
Add support for BTF_TYPE_KIND_{TAG,DECL_TAG} Adds support for two new BTF kinds including feature probes and BTF sanitization
-
Fix BTF type resolution for Arrays and Ints The union of
size
andtype
is unused in BTF_KIND_ARRAY. Type information of elements is in the btf_array struct that follows in the type_ field while the index type is in the index_type field.For BTF_KIND_INT, only the offset should be compared and size and signedness should be ignored.
-
maps: rename from_pinned() to open_pinned()
-
Retrieve program from pinned path
-
allocate func/line_info buffers outside if the pointer isn't valid in the current code!
-
document the public api
-
Add fixup for PTR types from Rust
-
Add Btf::to_bytes This allows for parsed BTF to be re-encoded such that it could be loaded in to the kernel. It moves bytes_of to the utils package. We could use Object::bytes_of, but this requires the impl of the Pod trait on generated code.
-
Fix for rename of BPF_ -> BPF_CORE_
-
update object requirement from 0.27 to 0.28 Updates the requirements on object to permit the latest version.
updated-dependencies:
- dependency-name: object dependency-type: direct:production ...
-
Remove unnecessary unsafe markers on map iteration. Map iteration can yield stale keys and values by virtue of sharing a data structure with BPF programs which can modify it. However, all accesses remain perfectly safe and will not cause memory corruption or data races.
-
eliminate name duplication in maps and programs. Map and ProgramData objects had unnecessarily cloned strings for their names, despite them being just as easily available to external users via bpf.maps() and bpf.programs().
-
use correct program name when relocating
-
Improve section detection This commit improves section detection. Previously, a section named "xdp_metadata" would be interpretted as a program section, which is incorrect. This commit first attempts to identify a BPF section by name, then by section.kind() == SectionKind::Text (executable code). The computed section kind is stored in the Section so variants can be easily matched on later.
-
remove unnecessary usage of &dyn trait in favor of impl trait. This should improve performance in most situations by eliminating unnecessary fat pointer indirection.
-
programs_mut iterator to complement programs.
-
close file descriptors on Map drop.
-
expand include_bytes_aligned to accept expressions. This allows one to this macro with literal expressions involving macros such as concat! and env!.
-
fix test warnings
Commit Statistics
- 105 commits contributed to the release over the course of 123 calendar days.
- 125 days passed between releases.
- 39 commits were understood as conventional.
- 1 unique issue was worked on: #111
Commit Details
view details
- #111
- Fix test warnings (
761cb79
)
- Fix test warnings (
- Uncategorized
- (cargo-release) version 0.10.7 (
f01497e
) - Fix lint errors (
9a642d3
) - Merge pull request #228 from nak3/fix-socket_filter (
d690710
) - Merge pull request #229 from dave-tucker/fix_cgroup_skb_attach_v2 (
3dc9308
) - Merge pull request #224 from Tuetuopay/pod-arrays (
02c376c
) - Merge pull request #238 from vadorovsky/fix-doc-set-global (
5269ab5
) - Improve documentation of set_global method (
7dd2e3d
) - Merge pull request #237 from hi120ki/fix-typo-fentry (
7fdf37a
) - Fix typo in aya/src/programs/fentry.rs (
ab46253
) - Fix unit test (
5725a97
) - Fix socket_filter section match (
9e41317
) - Merge pull request #234 from xonatius/patch-1 (
e0d818f
) - Fix typo in aya/README.md (
49e998d
) - Fix Loading from cgroup/skb sections (
5ee1321
) - Merge pull request #222 from aya-rs/dependabot/cargo/parking_lot-0.12.0 (
00e34ec
) - Implement Pod for arrays of Pod types (
08211f6
) - Update parking_lot requirement from 0.11.1 to 0.12.0 (
ab7eed2
) - Merge pull request #161 from nimrodshn/add_lpm_trie (
2a18239
) - Fix #128: Add support for BPF_MAP_TYPE_LPM_TRIE map (
c6e66d8
) - Merge pull request #179 from dave-tucker/btf_datasec_name (
6316748
) - Merge pull request #177 from alessandrod/ptr-relocs (
b2182c6
) - Fix func_info/line_info offsets (
f169a3f
) - Relocate .text references (
8202105
) - Replace / in DATASEC before load to kernel (
825bb3a
) - Merge pull request #175 from dave-tucker/merge_fixup_sanitize (
1904aea
) - Fix match arms (
99fa85e
) - Add a test for each BTF fix (
326825a
) - Fix borrow check errors (
4efc206
) - Merge Fixup and Sanitzation to single step (
a1b46ec
) - Merge pull request #164 from dave-tucker/btf_verifier (
06f8938
) - Fix BTF verifier output (
5d8b279
) - Merge pull request #173 from alessandrod/func-proto-fixup (
d9496df
) - Merge pull request #174 from alessandrod/func-global-fix (
f70ab2c
) - Fix sanitization if BTF_FUNC_GLOBAL is not supported (
7ad0524
) - Fixup func protos (
9ba2e14
) - Run fixup in place (
89b5dd3
) - Merge pull request #168 from dave-tucker/decl_tag (
b45a160
) - Merge pull request #172 from dave-tucker/name_trunc (
b93188f
) - Fix name truncation (
8f9a32f
) - Merge pull request #171 from dave-tucker/nametoolong (
dccdc45
) - Truncate long program names (
437432c
) - Add support for BTF_TYPE_KIND_{TAG,DECL_TAG} (
5d9ff70
) - Merge pull request #169 from dave-tucker/fix_array_relo (
1492d85
) - Merge pull request #157 from dave-tucker/doc-aya (
6a91fdf
) - Fix BTF type resolution for Arrays and Ints (
686ce45
) - Merge pull request #167 from aya-rs/codegen (
0118773
) - Update libbpf to be89b28f96be426e30a2b0c5312d13b30ee518c7 (
324c679
) - Maps: rename from_pinned() to open_pinned() (
4e9bc32
) - Merge pull request #165 from dave-tucker/prog_pinned (
f12054a
) - Retrieve program from pinned path (
abc8d27
) - Merge pull request #163 from aya-rs/codegen (
353b5f9
) - Update libbpf to 22411acc4b2c846868fd570b2d9f3b016d2af2cb (
0619f80
) - Merge pull request #158 from dave-tucker/btf-fix (
001348a
) - Allocate func/line_info buffers outside if (
83cfe56
) - Document the public api (
bca0158
) - Merge pull request #127 from dave-tucker/ext (
c5a10f8
) - Add fixup for PTR types from Rust (
877c760
) - Add BPF_PROG_TYPE_EXT (
5c6131a
) - Add Btf::to_bytes (
379bb31
) - Merge pull request #146 from dave-tucker/ro-maps (
faa3676
) - Mark .rodata maps as readonly and freeze on load (
65a0b83
) - Merge pull request #145 from aya-rs/codegen (
3a4c84f
) - Fix for rename of BPF_ -> BPF_CORE_ (
2b7dda7
) - Update libbpf to 19656636a9b9a2de1f71fa3135709295c16701cc (
05d4bc3
) - Support for fentry and fexit programs (
7e2fcd1
) - Update object requirement from 0.27 to 0.28 (
54b0c67
) - Merge pull request #136 from nimrodshn/add_impl_pod_for_u128 (
6313ddf
) - Implement Pod for u128 (
24a292f
) - Merge pull request #134 from aya-rs/codegen (
f34b76c
) - Update libbpf to 93e89b34740c509406e948c78a404dd2fba67b8b (
17d43cd
) - Merge pull request #125 from dave-tucker/btf (
26d188c
) - Merge pull request #131 from eero-thia/thia/safe_iter (
441a660
) - Remove unnecessary unsafe markers on map iteration. (
1897036
) - Merge pull request #120 from eero-thia/thia/dedup (
07a6016
) - Eliminate name duplication in maps and programs. (
f56dd0a
) - Merge pull request #130 from wg/main (
a340c2a
) - Use correct program name when relocating (
bb8a813
) - Improve section detection (
e4d9774
) - Merge pull request #115 from eero-thia/thia/impl_trait (
a03426f
) - Remove unnecessary usage of &dyn trait in favor of impl trait. (
daa7ea6
) - Merge pull request #116 from eero-thia/thia/close (
98b36b2
) - Merge pull request #121 from eero-thia/thia/programs_mut (
2955ca1
) - Programs_mut iterator to complement programs. (
c7f8db9
) - Merge pull request #122 from eero-thia/thia/include_bytes_aligned (
a6bf554
) - Close file descriptors on Map drop. (
1584bc4
) - Expand include_bytes_aligned to accept expressions. (
f8f17a0
) - Merge pull request #108 from deverton/kprobe-debugfs (
6db30fa
) - Refactoring after feedback. (
0e84610
) - Support pid filtering in debugfs (
606c326
) - Handle probe entry offsets (
1dc7554
) - Merge branch 'main' into kprobe-debugfs (
4e6aeb2
) - Merge pull request #109 from deverton/dynamic-kver (
b82d7f0
) - Updates based on feedback (
3dff6e8
) - Use current kernel version as default if not specified (
4277205
) - Functional detach of debugfs probes. (
42c9737
) - Fix event_alias comparison when looking in event list (
a4faabc
) - Don't duplicate perf_attach code and formatting (
84fa219
) - Attempt auto detach of probe for debugfs (
d0321bd
) - Support k/uprobes on older kernels. (
34aa790
) - Merge pull request #107 from deverton/skip-map-name (
5b0e518
) - Formatting (
07e3824
) - Stub
kernel_version
for tests (49f6a8e
) - Fix lint issues (
d966881
) - Make maps compatible with kernel <= 4.14 (
fc08611
)
- (cargo-release) version 0.10.7 (
v0.10.6 (2021-11-13)
Other
-
fix name parsing for sk_skb sections This commit fixes name parsing of sk_skb sections such that both named and unnamed variants will work correctly.
-
netlink: use NETLINK_EXT_ACK from libc crate NETLINK_EXT_ACK is available since libc crate version 0.2.105, see https://github.com/rust-lang/libc/releases/tag/0.2.105
-
fix incorrect section size for .bss
-
improve map errors to be more descriptive
-
pass Btf by reference instead of loading new Btf in Lsm::load
-
implement btf tracepoint programs
-
fix include_bytes_aligned! macro to work in some corner cases I found a corner case in my own development workflow that caused the existing macro to not work properly. The following changes appear to fix things. Ideally, we could add some test cases to CI to prevent regressions. This would require creating a dedicated directory to hold test cases so that we can "include" them at compile time.
-
introduce include_bytes_aligned!() macro This is a helper macro that can be used to include bytes at compile-time that can then be used in Bpf::load(). Unlike std's include_bytes!(), this macro also ensures that the resulting byte array is correctly aligned so that it can be parsed as an ELF binary.
-
update object requirement from 0.26 to 0.27 Updates the requirements on object to permit the latest version.
updated-dependencies:
- dependency-name: object dependency-type: direct:production ...
Commit Statistics
- 22 commits contributed to the release over the course of 22 calendar days.
- 28 days passed between releases.
- 9 commits were understood as conventional.
- 0 issues like '(#ID)' were seen in commit messages
Commit Details
view details
- Uncategorized
- (cargo-release) version 0.10.6 (
182182d
) - Merge pull request #104 from dave-tucker/fix_skskb_load (
daf8630
) - Fix name parsing for sk_skb sections (
352e54b
) - Merge pull request #98 from aya-rs/codegen (
f632f81
) - Update libbpf to 16dfb4ffe4aed03fafc00e0557b1ce1310a09731 (
4a7f47d
) - Merge pull request #94 from tklauser/netlink-ext-ack-libc (
563d4ba
) - Netlink: use NETLINK_EXT_ACK from libc crate (
2136f05
) - Merge pull request #90 from willfindlay/fix-bss (
dd7e1de
) - Fix incorrect section size for .bss (
1e6b1af
) - Merge pull request #89 from willfindlay/errors (
3a8e4fe
) - Improve map errors to be more descriptive (
27d803b
) - Merge pull request #85 from willfindlay/tp_btf (
17b730c
) - Pass Btf by reference instead of loading new Btf in Lsm::load (
6b6d4af
) - Implement btf tracepoint programs (
6539cbb
) - Merge pull request #68 from vadorovsky/lsm (
140005d
) - Add support for raw tracepoint and LSM programs (
169478c
) - Merge pull request #78 from willfindlay/main (
56fd09c
) - Fix include_bytes_aligned! macro to work in some corner cases (
99f6f9e
) - Merge pull request #76 from willfindlay/load_include_bytes (
a947747
) - Introduce include_bytes_aligned!() macro (
4df4e9c
) - Bump libbpf to 92c1e61a605410b16d6330fdd4a7a4e03add86d4 (
03e9935
) - Update object requirement from 0.26 to 0.27 (
c99dcfb
)
- (cargo-release) version 0.10.6 (
v0.10.5 (2021-10-15)
Other
- fix call relocation bug Take the section offset into account when looking up relocation entries
- Disable Stacked Borrows and skip some tests The perf_buffer code fails due to stacked borrows, skip this for now. munmap isn't supported by miri.
- fix clippy
- improve docs a bit and make BpfLoader default to loading BTF if available
- loader: take BTF info as reference Allows sharing the same BTF info across many loaders
Commit Statistics
- 7 commits contributed to the release over the course of 17 calendar days.
- 24 days passed between releases.
- 5 commits were understood as conventional.
- 0 issues like '(#ID)' were seen in commit messages
Commit Details
view details
- Uncategorized
- (cargo-release) version 0.10.5 (
4152e8b
) - Fix call relocation bug (
59a1854
) - Disable Stacked Borrows and skip some tests (
dc4b928
) - Fix clippy (
52c5189
) - Improve docs a bit and make BpfLoader default to loading BTF if available (
64e3fb4
) - Loader: take BTF info as reference (
5f8f18e
) - Implement Pinning For Programs and Maps (
9426f36
)
- (cargo-release) version 0.10.5 (
v0.10.4 (2021-09-21)
Other
- minor PerfEvent API tweaks
- run xtask codegen aya
- only consider Text symbols as relocatable functions
- fix bug with nested call relocations Use the correct offset when looking up relocation entries while doing nested call relocations.
- update authors and repository link
- Fix size of Unknown variant The size of Unknown should be ty_size, otherwise when it is encountered, we never advance the cursor and it creates an infinite loop.
- Add some tests for reading btf data
- Add bindings for BTF_KIND_FLOAT
Commit Statistics
- 13 commits contributed to the release over the course of 38 calendar days.
- 52 days passed between releases.
- 8 commits were understood as conventional.
- 0 issues like '(#ID)' were seen in commit messages
Commit Details
view details
- Uncategorized
- (cargo-release) version 0.10.4 (
a7f5b37
) - Bump obj to 0.26 (
a10a7b3
) - Minor PerfEvent API tweaks (
98361a4
) - Run xtask codegen aya (
b0a05e7
) - Add support for PerfEvent programs. (
c39dff6
) - Only consider Text symbols as relocatable functions (
c56a6b1
) - Fix bug with nested call relocations (
d9fc0f4
) - Make Clippy Happy (
e9bad0b
) - Update authors and repository link (
9c27910
) - Remove docs. Update URLs to aya-rs (
8acb92d
) - Fix size of Unknown variant (
4e1ce25
) - Add some tests for reading btf data (
569b8ca
) - Add bindings for BTF_KIND_FLOAT (
753a683
)
- (cargo-release) version 0.10.4 (
v0.10.3 (2021-07-31)
Bug Fixes
- pass BTF object by reference in order to allow multiple eBPF programs to share it and save memory (closes #30).
Other
- programs: tweak LircMode2::query doc.
- netlink: fix clippy lint
- fix clippy warnings
- tc: add qdisc_detach_program qdisc_detach_program can be used to detach all the programs that have the given name. It's useful when you want to detach programs that were attached by some other process (eg. iproute2), or when you want to detach programs that were previously left attached because the program that attached them was killed.
- netlink: fix alignment when writing attributes
- netlink: fix handling of multipart messages
- tc: clean up netlink code a bit
- fix formatting
- fix clippy warnings
- obj: improve parse_map_def tests Add a test that checks that we handle ELF section padding correctly and simplify the other tests.
- don't error out parsing padded map sections
- tc: make qdisc_add_clsact return io::Error
- kprobe: remove pid argument Kprobes can only be attached globally. Per-pid logic needs to be implemented on the BPF side with bpf_get_current_pid_tgid.
- add minimum kernel version for each map and program type
- add missing load() in kprobe example
- support both bpf_map_def layout variants
Libbpf and iproute2 use two slightly different
bpf_map_def
layouts. This change implements support for loading both. - netlink: tc: use ptr::read_unaligned instead of deferencing a potentially unaligned ptr
- netlink: port TC code to using new nlattr utils
- netlink: refactor nlattr writing code
- netlink: introduce NestedAttrs builder and switch XDP to it NestedAttrs is a safe interface for writing nlattrs. This is the first step towards making the netlink code safer and easier to maintain.
- refactor program section parsing This renames aya::obj::ProgramKind to aya::obj::ProgramSection and moves all the program section parsing to ProgramSection::from_str.
- fix tracepoint prefix in a couple more places
- fix trace point section name Trace points have prefix "tracepoint" not "trace_point".
Commit Statistics
- 29 commits contributed to the release over the course of 43 calendar days.
- 43 days passed between releases.
- 24 commits were understood as conventional.
- 3 unique issues were worked on: #18, #31, #32
Commit Details
view details
- #18
- Add minimum kernel version for each map and program type (
35f15f7
)
- Add minimum kernel version for each map and program type (
- #31
- #32
- Implement query for lirc programs (
81e07e9
)
- Implement query for lirc programs (
- Uncategorized
- (cargo-release) version 0.10.3 (
f30abca
) - Programs: tweak LircMode2::query doc. (
66a12ff
) - Netlink: fix clippy lint (
8c03ba0
) - Fix clippy warnings (
fa2cbe2
) - Tc: add qdisc_detach_program (
c2a90c2
) - Netlink: fix alignment when writing attributes (
0a9d021
) - Netlink: fix handling of multipart messages (
abb199e
) - Tc: clean up netlink code a bit (
9185f32
) - Fix formatting (
d996a88
) - Fix clippy warnings (
0878c45
) - Obj: improve parse_map_def tests (
21e01df
) - Don't error out parsing padded map sections (
b657930
) - Added support for armv7-unknown-linux-gnueabi and armv7-unknown-linux-gnueabihf (
8311abf
) - Tc: make qdisc_add_clsact return io::Error (
9c8e78b
) - Aya, aya-ebpf-bindings: regenerate bindings (
122a530
) - Kprobe: remove pid argument (
08c71df
) - Add missing load() in kprobe example (
bb15e82
) - Support both bpf_map_def layout variants (
d8d3117
) - Netlink: tc: use ptr::read_unaligned instead of deferencing a potentially unaligned ptr (
5f0ff16
) - Netlink: port TC code to using new nlattr utils (
7f2ceaf
) - Netlink: refactor nlattr writing code (
d9b5ab5
) - Netlink: introduce NestedAttrs builder and switch XDP to it (
c240a2c
) - Refactor program section parsing (
bb595c4
) - Fix tracepoint prefix in a couple more places (
0188622
) - Fix trace point section name (
a0151dd
) - Merge pull request #4 from seanyoung/doctest (
521ef09
)
- (cargo-release) version 0.10.3 (
v0.10.2 (2021-06-17)
Other
- tc: fix QdiscRequest layout
Commit Statistics
- 5 commits contributed to the release over the course of 1 calendar day.
- 1 day passed between releases.
- 1 commit was understood as conventional.
- 0 issues like '(#ID)' were seen in commit messages
Commit Details
view details
v0.10.1 (2021-06-16)
Commit Statistics
- 3 commits contributed to the release.
- 0 commits were understood as conventional.
- 0 issues like '(#ID)' were seen in commit messages
Commit Details
view details
v0.10.0 (2021-06-15)
Other
-
add more fields to Cargo.toml
-
bump version to 0.10
-
add doc aliases for maps and programs
-
refactor tc code a bit and add docs
-
improve async perf map docs
-
tweak PerfEventArray docs
-
ProgramArray: more doc fixes
-
ProgramArray: tweak docs
-
implement ProgramFd for CgroupSkb
-
fix CgroupSkb docs
-
programs: add support for BPF_PROG_TYPE_CGROUP_SKB programs
-
programs: fix detaching programs attached with bpf_prog_attach
-
programs: fix syscall name in errors
-
handle reordered functions LLVM will split .text into .text.hot .text.unlikely etc and move the content around in order to improve locality. We need to parse all the text sections or relocations can potentially fail.
-
improve call relocation error messages
-
BpfError: set the #[source] attribute for RelocationErrors
-
add support for attaching and detaching TC programs This change adds support for attaching TC programs directly from aya, without having to use iproute2/tc.
-
add support for Stack and Queue maps
-
add id and pinning fields to bpf_map_def
-
netlink: improve error messages
-
add support for BPF_PROG_TYPE_SCHED_CLS programs
-
perf_map: fix bug when max_entries=0 When a perf map has max_entries=0, max_entries is dynamically set at load time to the number of possible cpus as reported by /sys/devices/system/cpu/possible.
This change fixes a bug where instead of setting max_entries to the number of possible cpus, we were setting it to the cpu index of the last possible cpu.
-
update generated bindings Update generated bindings with kernel headers from libbpf 4ccc1f0
-
xdp: fix detaching on kernels older than 5.7 XDP_FLAGS_REPLACE was added in 5.7. Now for kernels >= 5.7 whenever we detach an XDP program we pass along the program fd we expect to be detaching. For older kernels, we just detach whatever is attached, which is not great but it's the way the API worked pre XDP_FLAGS_REPLACE.
-
xdp: set flags when attaching with netlink
-
fix BpfError display strings
-
fix warnings
-
programs: rework load_program() retry code a bit
-
programs: add support for SkMsg programs
-
maps: add SockHash
-
add support for SockOps programs
-
add support BPF_PROG_TYPE_SK_SKB programs and SockMaps
-
fix program array key size
-
small doc fixes
-
more docs
-
consolidate errors into ProgramError::SyscallError
-
split aya::programs::probe into ::kprobe and ::uprobe & add docs
-
add maps::StackTraceMap Map type for BPF_MAP_TYPE_STACK_TRACE.
-
add util::kernel_symbols() kernel_symbols() can be used to load /proc/kallsyms in a BTreeMap. Useful for looking up symbols from stack addresses.
-
add bpf_map_lookup_elem_ptr
-
tweak docs
-
rename ProgramArray::unset to ProgramArray::clear_index
-
rename ProgramArray::keys to ProgramArray::indices
-
maps: add PerCpuArray
-
rework IterableMap and ProgramArray Make MapKeys not use IterableMap. Leave only ProgramArray::get, ProgramArray::set and ProgramArray::unset exposed as the other syscalls don't work consistently for program arrays.
-
PerCpuKernelMem doesn't need to be public
-
add aya::maps::Array
-
add aya::maps::array and move ProgramArray under it
-
hash_map: add doc aliases for HASH and LRU_HASH
-
per_cpu_hash_map: add support for BPF_MAP_TYPE_LRU_PERCPU_HASH
-
maps: introduce MapError::KeyNotFound Change get() from -> Result<Option, MapError> to -> Result<V, MapError> where MapError::KeyNotFound is returned instead of Ok(None) to signify that the key is not present.
-
rename MapError::NotFound to MapError::MapNotFound
-
add PerCpuHashMap
-
move hash_map.rs to hash_map/hash_map.rs
-
hash_map: factor out common hash code This is in preparation of adding new hash map types
-
fix warnings
-
don't export VerifierLog
-
HashMap: add support for LRU maps
-
more docs
-
tweak docs
-
rename perf map and add docs Rename the perf_map module to just perf, and rename PerfMap to PerfEventArray.
-
maps: add docs and make the hash_map and program_array modules public
-
add HashMap docs
-
make HashMap::new private
-
add ProgramArray docs
-
make ProgramArray::new private
-
remove pop() lookup_and_delete_elem is only supported for QUEUE and STACK maps at the moment.
-
add some docs for the crate and
Bpf
-
maps: group syscall errors into MapError::SyscallError
-
fix bindings for PERF_EVENT_IOC_{ENABLE|DISABLE|SET_BPF}
-
remove TryInto magic from program()/program_mut() too For programs it's actually useful being able to get the underlying Program enum, for example when iterating/loading all the programs
-
remove TryInto cleverness from map() and map_mut() Require callers to call try_into() explicitly. It's more characters, but it's easier to understand/document.
Also introduce MapError::NotFound instead of returning Result<Option<_>>.
-
fix some badly completed match arms
-
fix verifier log handling
-
add support for function calls
-
section: collecting relocations can't fail anymore
-
obj: rename symbol_table to symbols_by_index
-
add Program::name() and make ::prog_type() public
-
bpf: Add Bpf::programs()
-
bpf: remove lifetime param from previous signature
-
maps: add Map::name() and Map::map_type()
-
add Bpf::maps() to get all the maps
-
switch to rustified enums
-
generate code with xtask
-
xdp BPF_LINK_CREATE was added in 5.9
-
obj: implement sane defaults for license and kernel version Default to license=GPL and kernel_version=any
-
implement missing bit of retprobes
-
sys: fix warning
-
rename gen-bindings to gen-bindings.sh
-
tweak error display
-
support max_entries=0 When a PerfMap has max_entries=0, set max_entries to the number of available CPUs.
-
add possible_cpus()
-
enable only the std feature for the futures crate
-
add explicit BTF argument to the load API Add a
target_btf: Option<Btf>
argument to Bpf::load. None can be passed to indicate to skip BTF relocation, for example for kernels that don't support it. Some(btf) can be used to pass BTF parsed with Btf::from_sys_fs() or Btf::parse/parse_file.Finally, add a simpler Bpf::load_file(path) that uses from_sys_fs() internally to simplify the common case.
-
add support for attaching with custom xdp flags
-
rework ProgramError a bit Move type specific errors to XdpError SocketFilterError etc.
Annotate all source errors with #[source]
-
add internal API to create links
-
fail new() for high level wrappers if the underlying map hasn't been created
-
remove unused methods
-
add AsyncPerfMap When the async_tokio or async_std features are enabled, AsyncPerfMap provides an async version of PerfMap which returns a future from read_events()
-
split in sub modules
-
implement AsRawFd
Commit Statistics
- 121 commits contributed to the release over the course of 110 calendar days.
- 102 commits were understood as conventional.
- 0 issues like '(#ID)' were seen in commit messages
Commit Details
view details
- Uncategorized
- Copy readme into aya/ (
94b5e2e
) - Add more fields to Cargo.toml (
7694bac
) - Doc fixes (
be0b7bb
) - Bump version to 0.10 (
9f7b017
) - Add doc aliases for maps and programs (
768640d
) - More docs (
293e66a
) - Refactor tc code a bit and add docs (
ad58e17
) - More docs (
11e21e8
) - More doc fixes (
6c7df27
) - Improve async perf map docs (
28158e6
) - Tweak PerfEventArray docs (
6ecf7da
) - ProgramArray: more doc fixes (
6772595
) - ProgramArray: tweak docs (
4bde0c5
) - Implement ProgramFd for CgroupSkb (
2cda5db
) - Fix CgroupSkb docs (
2d7b9b2
) - Programs: add support for BPF_PROG_TYPE_CGROUP_SKB programs (
08a68fa
) - Programs: fix detaching programs attached with bpf_prog_attach (
fb3e2f7
) - Programs: fix syscall name in errors (
6658025
) - Handle reordered functions (
81a0b61
) - Improve call relocation error messages (
b92b1e1
) - BpfError: set the #[source] attribute for RelocationErrors (
20b2d4c
) - Add support for attaching and detaching TC programs (
6974d34
) - Add support for Stack and Queue maps (
31f8d71
) - Add id and pinning fields to bpf_map_def (
40b7da6
) - Netlink: improve error messages (
dc4e020
) - Add support for BPF_PROG_TYPE_SCHED_CLS programs (
5effc97
) - Perf_map: fix bug when max_entries=0 (
4222b14
) - Update generated bindings (
3b7ffd0
) - Xdp: fix detaching on kernels older than 5.7 (
30d2b25
) - Xdp: set flags when attaching with netlink (
607cf68
) - Fix BpfError display strings (
bb7728a
) - Fix warnings (
9e12c93
) - Programs: rework load_program() retry code a bit (
9a24f20
) - Programs: add support for SkMsg programs (
1441754
) - Maps: add SockHash (
dad300c
) - Add support for SockOps programs (
ca4b3bf
) - Add support BPF_PROG_TYPE_SK_SKB programs and SockMaps (
b57cace
) - Fix program array key size (
b6cd813
) - Small doc fixes (
0b3e532
) - More docs (
79f1b38
) - Consolidate errors into ProgramError::SyscallError (
683a58e
) - Split aya::programs::probe into ::kprobe and ::uprobe & add docs (
ae863bc
) - Add maps::StackTraceMap (
d9634ae
) - Add util::kernel_symbols() (
67c9cc0
) - Add bpf_map_lookup_elem_ptr (
2cdb10e
) - Tweak docs (
ad6d059
) - Rename ProgramArray::unset to ProgramArray::clear_index (
f464279
) - Rename ProgramArray::keys to ProgramArray::indices (
9ad2a5e
) - Maps: add PerCpuArray (
b0364f7
) - Rework IterableMap and ProgramArray (
74d5f17
) - PerCpuKernelMem doesn't need to be public (
aa3a30d
) - Add aya::maps::Array (
1746bbf
) - Add aya::maps::array and move ProgramArray under it (
c3b9021
) - Hash_map: add doc aliases for HASH and LRU_HASH (
6cec8be
) - Per_cpu_hash_map: add support for BPF_MAP_TYPE_LRU_PERCPU_HASH (
7a989b4
) - Maps: introduce MapError::KeyNotFound (
635dcd4
) - Rename MapError::NotFound to MapError::MapNotFound (
fd142e4
) - Add PerCpuHashMap (
3a5b289
) - Move hash_map.rs to hash_map/hash_map.rs (
d5098c9
) - Hash_map: factor out common hash code (
6a12a48
) - Fix warnings (
ac83273
) - Don't export VerifierLog (
46e0a2e
) - HashMap: add support for LRU maps (
7c6ae76
) - More docs (
04fde46
) - Tweak docs (
eea27f5
) - Rename perf map and add docs (
5aa9cb1
) - Maps: add docs and make the hash_map and program_array modules public (
d94bfde
) - Add HashMap docs (
ce3f83a
) - Make HashMap::new private (
e28da88
) - Add ProgramArray docs (
24f7c37
) - Make ProgramArray::new private (
3fddc81
) - Remove pop() (
6682a5f
) - Add some docs for the crate and
Bpf
(1bbbf61
) - Maps: group syscall errors into MapError::SyscallError (
563ce46
) - Fix bindings for PERF_EVENT_IOC_{ENABLE|DISABLE|SET_BPF} (
f9554d6
) - Remove TryInto magic from program()/program_mut() too (
a92bfeb
) - Remove TryInto cleverness from map() and map_mut() (
42e0a65
) - Fix some badly completed match arms (
d3482c0
) - Fix verifier log handling (
ee05f9d
) - Add support for function calls (
92b4ed2
) - Section: collecting relocations can't fail anymore (
8b0eee3
) - Obj: rename symbol_table to symbols_by_index (
318c16c
) - Add Program::name() and make ::prog_type() public (
286e117
) - Bpf: Add Bpf::programs() (
0199e4b
) - Bpf: remove lifetime param from previous signature (
dcb5121
) - Maps: add Map::name() and Map::map_type() (
ed53f74
) - Add Bpf::maps() to get all the maps (
0a493ba
) - Switch to rustified enums (
29f2d9b
) - Generate code with xtask (
59ed237
) - Xdp BPF_LINK_CREATE was added in 5.9 (
8327ffb
) - Obj: implement sane defaults for license and kernel version (
1e779c5
) - Implement missing bit of retprobes (
f11df77
) - Sys: fix warning (
b7369d2
) - Rename gen-bindings to gen-bindings.sh (
82bcef3
) - Tweak error display (
245cd46
) - Fix build with musl (
3e8a279
) - Support max_entries=0 (
68a633f
) - Add possible_cpus() (
f56c32b
) - Format fixes (
a3ab2ef
) - Enable only the std feature for the futures crate (
0cf5d17
) - Fix RawFd import paths (
3abe9bb
) - Add explicit BTF argument to the load API (
2cec04c
) - Add support for attaching with custom xdp flags (
55d8bcf
) - Rework ProgramError a bit (
d326038
) - Add internal API to create links (
f88ca1f
) - Fail new() for high level wrappers if the underlying map hasn't been created (
ba992a2
) - Trim deps a bit more (
873691d
) - The futures crate is only needed when async is enabled (
f1da541
) - Remove unused methods (
14c9845
) - Fix warnings (
a5e19fc
) - Add AsyncPerfMap (
fdc4dad
) - Split in sub modules (
4be0c45
) - Implement AsRawFd (
95a24c6
) - Add IOError variants to PerfMapError and PerfBufferError (
5d6fe8b
) - Make aya::maps::perf_map public (
b9be2f1
) - Change the suffix of errors from *Failed to *Error (
160e0be
) - Bpf, perf_map: make maps usable from multiple threads (
d4e2825
) - Make online_cpus() util public (
d7c91ef
) - Generate arch specific bindings (
2215e20
) - Add src/generated/netlink_bindings.rs to repo (
1de3929
) - Turn the project into a workspace, move code under aya/ (
af8f769
)
- Copy readme into aya/ (