8000 Tags · aya-rs/aya · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Tags: aya-rs/aya

Tags

aya-v0.13.1

Toggle aya-v0.13.1's commit message
### Chore

 - Add comments in `*_wrong_map` tests
 - Rename bpf -> ebpf
 - Fix unused_qualifications lints
   This was failing the docs build.

### Documentation

 - fix typo
 - Use `Ebpf` instead of `Bpf`

### New Features

 - Implement TCX
   This commit adds the initial support for TCX
   bpf links. This is a new, multi-program, attachment
   type allows for the caller to specify where
   they would like to be attached relative to other
   programs at the attachment point using the LinkOrder
   type.
 - Provide a deprecated `BpfError` alias
 - Rename Bpf to Ebpf
   And BpfLoader to EbpfLoader.
   This also adds type aliases to preserve the use of the old names, making
   updating to a new Aya release less of a burden. These aliases are marked
   as deprecated since we'll likely remove 
8000
them in a later release.

### Bug Fixes

 - Fill bss maps with zeros
   The loader should fill bss maps with zeros according to the size of the
   ELF section.
   Failure to do so yields weird verifier messages as follows:
   
   ```
   cannot access ptr member ops with moff 0 in struct bpf_map with off 0 size 4
   ```
   
   Reference to this in the cilium/ebpf code is here [1].
   I could not find a reference in libbpf.
 - Fix PerfEventArray resize logic
   There was a logic bug in the previously merged patch where we
   set the correctly calculated max_entries size with the original.
   
   To fix this and prevent regressions a unit test was added.
   This highlighted that the original map definition needs to be
   mutated in order for the max_entries change to be properly applied.
   
   As such, this resize logic moved out of aya::sys into aya::maps
 - Set PerfEventArray max_entries to nCPUs
   Both libbpf and cilium/ebpf have will set the max_entries of a
   BPF_MAP_TYPE_PERF_EVENT_ARRAY to the number of online CPUs if
   it was omitted at map definition time. This adds that same
   logic to Aya.
 - fix panic when creating map on custom ubuntu kernel
 - fix rustdocs-args ordering in taplo to -D warnings
   This fixes the current rustdoc build error by correcting the ordering of
   `rustdoc-args` to `-D warnings`. Additionally, this also removes the
   `recorder_arrays` field (defaults to false) so that the order is not
   modified, which is what caused the error in the first place.

### Other

 - use FdLink in SockOps programs
 - remove unwrap and NonZero* in info
   Addresses the feedback from #1007:
   - remove panic from `unwrap` and `expect`
   - Option<NonZero*> => Option<int> with `0` mapping to `None`
 - revamp MapInfo be more friendly with older kernels
   Adds detection for whether a field is available in `MapInfo`:
   - For `map_type()`, we treturn new enum `MapType` instead of the integer
     representation.
   - For fields that can't be zero, we return `Option<NonZero*>` type.
   - For `name_as_str()`, it now uses the feature probe `bpf_name()` to
     detect if field is available.
     Although the feature probe checks for program name, it can also be
     used for map name since they were both introduced in the same commit.
 - revamp ProgramInfo be more friendly with older kernels
   Purpose of this commit is to add detections for whether a field is
   available in `ProgramInfo`.
   - For `program_type()`, we return the new enum `ProgramType` instead of
     the integer representation.
   - For fields that we know cannot be zero, we return `Option<NonZero*>`
     type.
   - For `name_as_str()`, it now also uses the feature probe `bpf_name()`
     to detect if field is available or not.
   - Two additional feature probes are added for the fields:
     - `prog_info_map_ids()` probe -> `map_ids()` field
     - `prog_info_gpl_compatible()` probe -> `gpl_compatible()` field
   
   With the `prog_info_map_ids()` probe, the previous implementation that
   I had for `bpf_prog_get_info_by_fd()` is shortened to use the probe
   instead of having to make 2 potential syscalls.
   
   The `test_loaded_at()` test is also moved into info tests since it is
   better related to the info tests.
 - add conversion u32 to enum type for prog, link, & attach type
   Add conversion from u32 to program type, link type, and attach type.
   Additionally, remove duplicate match statement for u32 conversion to
   `BPF_MAP_TYPE_BLOOM_FILTER` & `BPF_MAP_TYPE_CGRP_STORAGE`.
   
   New error `InvalidTypeBinding<T>` is created to represent when a
   parsed/received value binding to a type is invalid.
   This is used in the new conversions added here, and also replaces
   `InvalidMapTypeError` in `TryFrom` for `bpf_map_type`.
 - improve integration tests for info API
   Improves the existing integraiton tests for `loaded_programs()` and
   `loaded_maps()` in consideration for older kernels:
     - Opt for `SocketFilter` program in tests since XDP requires v4.8 and
       fragments requires v5.18.
     - For assertion tests, first perform the assertion, if the assertion
       fails, then it checks the host kernel version to see if it is above
       the minimum version requirement. If not, then continue with test,
       otherwise fail.
       For assertions that are skipped, they're logged in stderr which can
       be observed with `-- --nocapture`.
   
   This also fixes the `bpf_prog_get_info_by_fd()` call for kernels below
   v4.15. If calling syscall  on kernels below v4.15, it can produce an
   `E2BIG` error  because `check_uarg_tail_zero()` expects the entire
   struct to all-zero bytes (which is caused from the map info).
   
   Instead, we first attempt the syscall with the map info filled, if it
   returns `E2BIG`, then perform syscall again with empty closure.
   
   Also adds doc for which version a kernel feature was introduced for
   better  awareness.
   
   The tests have been verified kernel versions:
     - 4.13.0
     - 4.15.0
     - 6.1.0
 - adjust bpf programs for big endian
   In aya/src/sys/bpf.rs, there are several simple bpf programs written as
   byte arrays. These need to be adjusted to account for big endian.
 - expose run_time_ns and run_cnt fields in ProgramInfo
   Added functions to expose `run_time_ns` & `run_cnt` statistics from
   ProgramInfo/bpf_prog_info.
 - add BPF_ENABLE_STATS syscall function
   Add bpf syscall function for BPF_ENABLE_STATS to enable stats tracking
   for benchmarking purposes.
   
   Additionally, move `#[cfg(test)]` annotation around the `Drop` trait
   instead. Having separate functions causes some complications when
   needing ownership/moving of the inner value `OwnedFd` when `Drop` is
   manually implemented.
 - :programs::uprobe: fix bad variable name
   The variable fn_name was very much *not* the fn_name, but rather the
   object file path.
 - adjust symbol lookup tests for object crate alignment requirements
   The object::File::parse API requires parameter to be aligned with 8 bytes.
   Adjusted the Vec in the tests with miri to meet this requirement.
 - add symbol lookup in associated debug files
   This change enhances the logic for symbol lookup in uprobe or uretprobe.
   If the symbol is not found in the original binary, the search continues
   in the debug file associated through the debuglink section. Before
   searching the symbol table, it compares the build IDs of the two files.
   The symbol lookup will only be terminated if both build IDs exist and do
   not match. This modification does not affect the existing symbol lookup
   logic.
 - Generate new bindings
 - include license in crate workspace
   This PR includes the licenses files in the crate workspace subdirectory.
   Without this, they won't be showing on crates.io and would be giving out
   errors on tooling such as rust2rpm.
 - appease new nightly clippy lints
   ```
     error: unnecessary qualification
        --> aya/src/maps/ring_buf.rs:434:22
         |
     434 |                 ptr: ptr::NonNull::new(ptr).ok_or(
         |                      ^^^^^^^^^^^^^^^^^
         |
     note: the lint level is defined here
        --> aya/src/lib.rs:72:5
         |
     72  |     unused_qualifications,
         |     ^^^^^^^^^^^^^^^^^^^^^
     help: remove the unnecessary path segments
         |
     434 -                 ptr: ptr::NonNull::new(ptr).ok_or(
     434 +                 ptr: NonNull::new(ptr).ok_or(
         |
   
     error: unnecessary qualification
        --> aya/src/maps/mod.rs:225:21
         |
     225 |     let mut limit = std::mem::MaybeUninit::<rlimit>::uninit();
         |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
         |
     help: remove the unnecessary path segments
         |
     225 -     let mut limit = std::mem::MaybeUninit::<rlimit>::uninit();
     225 +     let mut limit = mem::MaybeUninit::<rlimit>::uninit();
         |
   
     error: unnecessary qualification
        --> aya/src/programs/mod.rs:614:9
         |
     614 |         crate::obj::Program {
         |         ^^^^^^^^^^^^^^^^^^^
         |
     help: remove the unnecessary path segments
         |
     614 -         crate::obj::Program {
     614 +         obj::Program {
         |
   
     error: unnecessary qualification
        --> aya/src/util.rs:373:14
         |
     373 |     unsafe { std::slice::from_raw_parts(bpf_name.as_ptr() as
         *const _, length) }
         |              ^^^^^^^^^^^^^^^^^^^^^^^^^^
         |
     help: remove the unnecessary path segments
         |
     373 -     unsafe { std::slice::from_raw_parts(bpf_name.as_ptr() as
         *const _, length) }
     373 +     unsafe { slice::from_raw_parts(bpf_name.as_ptr() as *const _,
         length) }
         |
   
     error: unnecessary qualification
         --> aya/src/maps/mod.rs:1130:47
          |
     1130 |                     .copy_from_slice(unsafe {
          std::mem::transmute(TEST_NAME) });
          |                                               ^^^^^^^^^^^^^^^^^^^
          |
     note: the lint level is defined here
         --> aya/src/lib.rs:72:5
          |
     72   |     unused_qualifications,
          |     ^^^^^^^^^^^^^^^^^^^^^
     help: remove the unnecessary path segments
          |
     1130 -                     .copy_from_slice(unsafe {
          std::mem::transmute(TEST_NAME) });
     1130 +                     .copy_from_slice(unsafe {
          mem::transmute(TEST_NAME) });
          |
   ```

### Performance

 - cache `nr_cpus` in a thread_local

### Test

 - adjust test byte arrays for big endian
   Adding support for s390x (big endian architecture) and found that some
   of the unit tests have structures and files implemented as byte arrays.
   They are all coded as little endian and need a bug endian version to
   work properly.

### New Features (BREAKING)

 - Rename BpfRelocationError -> EbpfRelocationError
 - Rename BpfSectionKind to EbpfSectionKind

### Commit Statistics

 - 69 commits contributed to the release over the course of 241 calendar days.
 - 247 days passed between releases.
 - 32 commits were understood as [conventional](https://www.conventionalcommits.org).
 - 0 issues like '(#ID)' were seen in commit messages

### Commit Details

 * **Uncategorized**
    - Release aya-obj v0.2.1 (c6a34ca)
    - Merge pull request #1073 from dave-tucker/reloc-bug (b2ac9fe)
    - Fill bss maps with zeros (ca0c32d)
    - Release aya-obj v0.2.0, aya v0.13.0, safety bump aya v0.13.0 (c169b72)
    - Implement TCX (5478cac)
    - Cache `nr_cpus` in a thread_local (d05110f)
    - Clarify `Arc` usage (afd777b)
    - Replace `Arc` with `&'static` (e992c28)
    - Avoid intermediate allocations in parse_cpu_ranges (0e86757)
    - Reduce duplication in `{nr,possible}_cpus` (f3b2744)
    - Replace `lazy_static` with `std::sync::LazyLock` (2b299d4)
    - Appease clippy (0f16363)
    - Merge pull request #1023 from l2dy/fdlink/sockops (2cd3576)
    - Use FdLink in SockOps programs (c44f8b0)
    - Remove unwrap and NonZero* in info (02d1db5)
    - Merge pull request #985 from reyzell/main (40f3032)
    - Add the option to support multiple and overrideable programs per cgroup (f790685)
    - Merge pull request #1007 from tyrone-wu/aya/info-api (15eb935)
    - Revamp MapInfo be more friendly with older kernels (fbb0930)
    - Revamp ProgramInfo be more friendly with older kernels (88f5ac3)
    - Add conversion u32 to enum type for prog, link, & attach type (1634fa7)
    - Improve integration tests for info API (cb8e478)
    - Merge pull request #959 from tyrone-wu/aya/program_info_stats (ab000ad)
    - Merge pull request #974 from Billy99/billy99-arch-ppc64-s390x (ab5e688)
    - Adjust bpf programs for big endian (cd1db86)
    - Adjust test byte arrays for big endian (eef7346)
    - Simplify doctest (4362020)
    - Appease nightly clippy (bce3c4f)
    - Expose run_time_ns and run_cnt fields in ProgramInfo (a25f501)
    - Add BPF_ENABLE_STATS syscall function (fa6af6a)
    - Fix PerfEventArray resize logic (3d57d35)
    - Add comments in `*_wrong_map` tests (e575712)
    - Set PerfEventArray max_entries to nCPUs (25d986a)
    - Use MockableFd everywhere (e12fcf4)
    - Merge pull request #991 from l2dy/typo-1 (2cd9858)
    - Fix typo (f1773d5)
    - Merge pull request #983 from ajwerner/fix-variable-name (d5414bf)
    - :programs::uprobe: fix bad variable name (d413e2f)
    - Fix panic when creating map on custom ubuntu kernel (38d8e32)
    - Appease clippy (78acd74)
    - Don't deny unused_qualifications (781914f)
    - Fix rustdocs-args ordering in taplo to -D warnings (5e13283)
    - Remove deny(pointer_structural_match) (4e843a3)
    - Merge pull request #938 from swananan/enhance_urpobe_symbol_lookup (bde4b5f)
    - Fix clippy (c7898c5)
    - Adjust symbol lookup tests for object crate alignment requirements (462514e)
    - Add symbol lookup in associated debug files (e6e1bfe)
    - Merge pull request #928 from seanyoung/io-error (d0e9b95)
    - S/MiriSafeFd/MockableFd/ (a11b61e)
    - Remove miri ignores (cb6d3bd)
    - Document miri skip reasons (35962a4)
    - Avoid crashing under Miri (7a7d168)
    - Deduplicate test helpers (7e1666f)
    - Reduce duplication (58e154e)
    - Expose io_error in SyscallError (a6c45f6)
    - Appease clippy (09442c2)
    - Generate new bindings (b06ff40)
    - Appease clippy (0a32dac)
    - Merge pull request #528 from dave-tucker/rename-all-the-things (63d8d4d)
    - Include license in crate workspace (a4e68eb)
    - Use `Ebpf` instead of `Bpf` (57a69fe)
    - Provide a deprecated `BpfError` alias (110a76c)
    - Rename Bpf to Ebpf (8c79b71)
    - Rename BpfRelocationError -> EbpfRelocationError (fd48c55)
    - Rename BpfSectionKind to EbpfSectionKind (cf3e2ca)
    - Rename bpf -> ebpf (70ac91d)
    - Fix unused_qualifications lints (481b73b)
    - Add `CgroupDevice::query` (542306d)
    - Appease new nightly clippy lints (e38eac6)

aya-obj-v0.2.1

Toggle aya-obj-v0.2.1's commit message
### New Features

 - Rename Bpf to Ebpf
   And BpfLoader to EbpfLoader.
   This also adds type aliases to preserve the use of the old names, making
   updating to a new Aya release less of a burden. These aliases are marked
   as deprecated since we'll likely remove them in a later release.

### Bug Fixes

 - Fill bss maps with zeros
   The loader should fill bss maps with zeros according to the size of the
   ELF section.
   Failure to do so yields weird verifier messages as follows:
   
   ```
   cannot access ptr member ops with moff 0 in struct bpf_map with off 0 size 4
   ```
   
   Reference to this in the cilium/ebpf code is here [1].
   I could not find a reference in libbpf.

### Other

 - cgroup_iter_order NFPROTO* nf_inet_hooks
   Adds the following to codegen:
   - `bpf_cgroup_iter_order`: used in `bpf_link_info.iter.group.order`
   - `NFPROTO_*`: used in `bpf_link_info.netfilter.pf`
   - `nf_inet_hooks`: used in `bpf_link_info.netfilter.hooknum`
   
   Include `linux/netfilter.h` in `linux_wrapper.h` for `NFPROTO_*` and
   `nf_inet_hooks` to generate.
 - revamp MapInfo be more friendly with older kernels
   Adds detection for whether a field is available in `MapInfo`:
   - For `map_type()`, we treturn new enum `MapType` instead of the integer
     representation.
   - For fields that can't be zero, we return `Option<NonZero*>` type.
   - For `name_as_str()`, it now uses the feature probe `bpf_name()` to
     detect if field is available.
     Although the feature probe checks for program name, it can also be
     used for map name since they were both introduced in the same commit.
 - revamp ProgramInfo be more friendly with older kernels
   Purpose of this commit is to add detections for whether a field is
   available in `ProgramInfo`.
   - For `program_type()`, we return the new enum `ProgramType` instead of
     the integer representation.
   - For fields that we know cannot be zero, we return `Option<NonZero*>`
     type.
   - For `name_as_str()`, it now also uses the feature probe `bpf_name()`
     to detect if field is available or not.
   - Two additional feature probes are added for the fields:
     - `prog_info_map_ids()` probe -> `map_ids()` field
     - `prog_info_gpl_compatible()` probe -> `gpl_compatible()` field
   
   With the `prog_info_map_ids()` probe, the previous implementation that
   I had for `bpf_prog_get_info_by_fd()` is shortened to use the probe
   instead of having to make 2 potential syscalls.
   
   The `test_loaded_at()` test is also moved into info tests since it is
   better related to the info tests.
 - add conversion u32 to enum type for prog, link, & attach type
   Add conversion from u32 to program type, link type, and attach type.
   Additionally, remove duplicate match statement for u32 conversion to
   `BPF_MAP_TYPE_BLOOM_FILTER` & `BPF_MAP_TYPE_CGRP_STORAGE`.
   
   New error `InvalidTypeBinding<T>` is created to represent when a
   parsed/received value binding to a type is invalid.
   This is used in the new conversions added here, and also replaces
   `InvalidMapTypeError` in `TryFrom` for `bpf_map_type`.
 - add archs powerpc64 and s390x to aya
   bpfman, a project using aya, has a requirement to support powerpc64 and
   s390x architectures. Adding these two architectures to aya.
 - Generate new bindings

### Test

 - adjust test to not use byte arrays
   Where possible, replace the hardcoded byte arrays in the tests with the
   structs they represent, then convert the structs to byte arrays.
 - adjust test byte arrays for big endian
   Adding support for s390x (big endian architecture) and found that some
   of the unit tests have structures and files implemented as byte arrays.
   They are all coded as little endian and need a bug endian version to
   work properly.

### New Features (BREAKING)

 - Rename BpfRelocationError -> EbpfRelocationError
 - Rename BpfSectionKind to EbpfSectionKind

### Commit Statistics

 - 25 commits contributed to the release over the course of 241 calendar days.
 - 247 days passed between releases.
 - 12 commits were understood as [conventional](https://www.conventionalcommits.org).
 - 0 issues like '(#ID)' were seen in commit messages

### Commit Details

 * **Uncategorized**
    - Merge pull request #1073 from dave-tucker/reloc-bug (b2ac9fe)
    - Fill bss maps with zeros (ca0c32d)
    - Merge pull request #1055 from aya-rs/codegen (59b3873)
    - [codegen] Update libbpf to 80b16457cb23db4d633b17ba0305f29daa2eb307 (f8ad84c)
    - Cgroup_iter_order NFPROTO* nf_inet_hooks (366c599)
    - Release aya-obj v0.2.0, aya v0.13.0, safety bump aya v0.13.0 (c169b72)
    - Appease clippy (aa240ba)
    - Merge pull request #1007 from tyrone-wu/aya/info-api (15eb935)
    - Revamp MapInfo be more friendly with older kernels (fbb0930)
    - Revamp ProgramInfo be more friendly with older kernels (88f5ac3)
    - Add conversion u32 to enum type for prog, link, & attach type (1634fa7)
    - Merge pull request #974 from Billy99/billy99-arch-ppc64-s390x (ab5e688)
    - Adjust test to not use byte arrays (4dc4b5c)
    - Add archs powerpc64 and s390x to aya (b513af1)
    - Adjust test byte arrays for big endian (eef7346)
    - Merge pull request #989 from aya-rs/codegen (8015e10)
    - [codegen] Update libbpf to 686f600bca59e107af4040d0838ca2b02c14ff50 (8d7446e)
    - Merge pull request #978 from aya-rs/codegen (06aa5c8)
    - [codegen] Update libbpf to c1a6c770c46c6e78ad6755bf596c23a4e6f6b216 (8b50a6a)
    - Document miri skip reasons (35962a4)
    - Generate new bindings (b06ff40)
    - Merge pull request #528 from dave-tucker/rename-all-the-things (63d8d4d)
    - Rename Bpf to Ebpf (8c79b71)
    - Rename BpfRelocationError -> EbpfRelocationError (fd48c55)
    - Rename BpfSectionKind to EbpfSectionKind (cf3e2ca)

aya-v0.13.0

Toggle aya-v0.13.0's commit message
### Chore

 - Add comments in `*_wrong_map` tests
 - Rename bpf -> ebpf
 - Fix unused_qualifications lints
   This was failing the docs build.

### Documentation

 - fix typo
 - Use `Ebpf` instead of `Bpf`

### New Features

 - Implement TCX
   This commit adds the initial support for TCX
   bpf links. This is a new, multi-program, attachment
   type allows for the caller to specify where
   they would like to be attached relative to other
   programs at the attachment point using the LinkOrder
   type.
 - Provide a deprecated `BpfError` alias
 - Rename Bpf to Ebpf
   And BpfLoader to EbpfLoader.
   This also adds type aliases to preserve the use of the old names, making
   updating to a new Aya release less of a burden. These aliases are marked
   as deprecated since we'll likely remove them in a later release.

### Bug Fixes

 - Fix PerfEventArray resize logic
   There was a logic bug in the previously merged patch where we
   set the correctly calculated max_entries size with the original.
   
   To fix this and prevent regressions a unit test was added.
   This highlighted that the original map definition needs to be
   mutated in order for the max_entries change to be properly applied.
   
   As such, this resize logic moved out of aya::sys into aya::maps
 - Set PerfEventArray max_entries to nCPUs
   Both libbpf and cilium/ebpf have will set the max_entries of a
   BPF_MAP_TYPE_PERF_EVENT_ARRAY to the number of online CPUs if
   it was omitted at map definition time. This adds that same
   logic to Aya.
 - fix panic when creating map on custom ubuntu kernel
 - fix rustdocs-args ordering in taplo to -D warnings
   This fixes the current rustdoc build error by correcting the ordering of
   `rustdoc-args` to `-D warnings`. Additionally, this also removes the
   `recorder_arrays` field (defaults to false) so that the order is not
   modified, which is what caused the error in the first place.

### Other

 - use FdLink in SockOps programs
 - remove unwrap and NonZero* in info
   Addresses the feedback from #1007:
   - remove panic from `unwrap` and `expect`
   - Option<NonZero*> => Option<int> with `0` mapping to `None`
 - revamp MapInfo be more friendly with older kernels
   Adds detection for whether a field is available in `MapInfo`:
   - For `map_type()`, we treturn new enum `MapType` instead of the integer
     representation.
   - For fields that can't be zero, we return `Option<NonZero*>` type.
   - For `name_as_str()`, it now uses the feature probe `bpf_name()` to
     detect if field is available.
     Although the feature probe checks for program name, it can also be
     used for map name since they were both introduced in the same commit.
 - revamp ProgramInfo be more friendly with older kernels
   Purpose of this commit is to add detections for whether a field is
   available in `ProgramInfo`.
   - For `program_type()`, we return the new enum `ProgramType` instead of
     the integer representation.
   - For fields that we know ca
8000
nnot be zero, we return `Option<NonZero*>`
     type.
   - For `name_as_str()`, it now also uses the feature probe `bpf_name()`
     to detect if field is available or not.
   - Two additional feature probes are added for the fields:
     - `prog_info_map_ids()` probe -> `map_ids()` field
     - `prog_info_gpl_compatible()` probe -> `gpl_compatible()` field
   
   With the `prog_info_map_ids()` probe, the previous implementation that
   I had for `bpf_prog_get_info_by_fd()` is shortened to use the probe
   instead of having to make 2 potential syscalls.
   
   The `test_loaded_at()` test is also moved into info tests since it is
   better related to the info tests.
 - add conversion u32 to enum type for prog, link, & attach type
   Add conversion from u32 to program type, link type, and attach type.
   Additionally, remove duplicate match statement for u32 conversion to
   `BPF_MAP_TYPE_BLOOM_FILTER` & `BPF_MAP_TYPE_CGRP_STORAGE`.
   
   New error `InvalidTypeBinding<T>` is created to represent when a
   parsed/received value binding to a type is invalid.
   This is used in the new conversions added here, and also replaces
   `InvalidMapTypeError` in `TryFrom` for `bpf_map_type`.
 - improve integration tests for info API
   Improves the existing integraiton tests for `loaded_programs()` and
   `loaded_maps()` in consideration for older kernels:
     - Opt for `SocketFilter` program in tests since XDP requires v4.8 and
       fragments requires v5.18.
     - For assertion tests, first perform the assertion, if the assertion
       fails, then it checks the host kernel version to see if it is above
       the minimum version requirement. If not, then continue with test,
       otherwise fail.
       For assertions that are skipped, they're logged in stderr which can
       be observed with `-- --nocapture`.
   
   This also fixes the `bpf_prog_get_info_by_fd()` call for kernels below
   v4.15. If calling syscall  on kernels below v4.15, it can produce an
   `E2BIG` error  because `check_uarg_tail_zero()` expects the entire
   struct to all-zero bytes (which is caused from the map info).
   
   Instead, we first attempt the syscall with the map info filled, if it
   returns `E2BIG`, then perform syscall again with empty closure.
   
   Also adds doc for which version a kernel feature was introduced for
   better  awareness.
   
   The tests have been verified kernel versions:
     - 4.13.0
     - 4.15.0
     - 6.1.0
 - adjust bpf programs for big endian
   In aya/src/sys/bpf.rs, there are several simple bpf programs written as
   byte arrays. These need to be adjusted to account for big endian.
 - expose run_time_ns and run_cnt fields in ProgramInfo
   Added functions to expose `run_time_ns` & `run_cnt` statistics from
   ProgramInfo/bpf_prog_info.
 - add BPF_ENABLE_STATS syscall function
   Add bpf syscall function for BPF_ENABLE_STATS to enable stats tracking
   for benchmarking purposes.
   
   Additionally, move `#[cfg(test)]` annotation around the `Drop` trait
   instead. Having separate functions causes some complications when
   needing ownership/moving of the inner value `OwnedFd` when `Drop` is
   manually implemented.
 - :programs::uprobe: fix bad variable name
   The variable fn_name was very much *not* the fn_name, but rather the
   object file path.
 - adjust symbol lookup tests for object crate alignment requirements
   The object::File::parse API requires parameter to be aligned with 8 bytes.
   Adjusted the Vec in the tests with miri to meet this requirement.
 - add symbol lookup in associated debug files
   This change enhances the logic for symbol lookup in uprobe or uretprobe.
   If the symbol is not found in the original binary, the search continues
   in the debug file associated through the debuglink section. Before
   searching the symbol table, it compares the build IDs of the two files.
   The symbol lookup will only be terminated if both build IDs exist and do
   not match. This modification does not affect the existing symbol lookup
   logic.
 - Generate new bindings
 - include license in crate workspace
   This PR includes the licenses files in the crate workspace subdirectory.
   Without this, they won't be showing on crates.io and would be giving out
   errors on tooling such as rust2rpm.
 - appease new nightly clippy lints
   ```
     error: unnecessary qualification
        --> aya/src/maps/ring_buf.rs:434:22
         |
     434 |                 ptr: ptr::NonNull::new(ptr).ok_or(
         |                      ^^^^^^^^^^^^^^^^^
         |
     note: the lint level is defined here
        --> aya/src/lib.rs:72:5
         |
     72  |     unused_qualifications,
         |     ^^^^^^^^^^^^^^^^^^^^^
     help: remove the unnecessary path segments
         |
     434 -                 ptr: ptr::NonNull::new(ptr).ok_or(
     434 +                 ptr: NonNull::new(ptr).ok_or(
         |
   
     error: unnecessary qualification
        --> aya/src/maps/mod.rs:225:21
         |
     225 |     let mut limit = std::mem::MaybeUninit::<rlimit>::uninit();
         |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
         |
     help: remove the unnecessary path segments
         |
     225 -     let mut limit = std::mem::MaybeUninit::<rlimit>::uninit();
     225 +     let mut limit = mem::MaybeUninit::<rlimit>::uninit();
         |
   
     error: unnecessary qualification
        --> aya/src/programs/mod.rs:614:9
         |
     614 |         crate::obj::Program {
         |         ^^^^^^^^^^^^^^^^^^^
         |
     help: remove the unnecessary path segments
         |
     614 -         crate::obj::Program {
     614 +         obj::Program {
         |
   
     error: unnecessary qualification
        --> aya/src/util.rs:373:14
         |
     373 |     unsafe { std::slice::from_raw_parts(bpf_name.as_ptr() as
         *const _, length) }
         |              ^^^^^^^^^^^^^^^^^^^^^^^^^^
         |
     help: remove the unnecessary path segments
         |
     373 -     unsafe { std::slice::from_raw_parts(bpf_name.as_ptr() as
         *const _, length) }
     373 +     unsafe { slice::from_raw_parts(bpf_name.as_ptr() as *const _,
         length) }
         |
   
     error: unnecessary qualification
         --> aya/src/maps/mod.rs:1130:47
          |
     1130 |                     .copy_from_slice(unsafe {
          std::mem::transmute(TEST_NAME) });
          |                                               ^^^^^^^^^^^^^^^^^^^
          |
     note: the lint level is defined here
         --> aya/src/lib.rs:72:5
          |
     72   |     unused_qualifications,
          |     ^^^^^^^^^^^^^^^^^^^^^
     help: remove the unnecessary path segments
          |
     1130 -                     .copy_from_slice(unsafe {
          std::mem::transmute(TEST_NAME) });
     1130 +                     .copy_from_slice(unsafe {
          mem::transmute(TEST_NAME) });
          |
   ```

### Performance

 - cache `nr_cpus` in a thread_local

### Test

 - adjust test byte arrays for big endian
   Adding support for s390x (big endian architecture) and found that some
   of the unit tests have structures and files implemented as byte arrays.
   They are all coded as little endian and need a bug endian version to
   work properly.

### New Features (BREAKING)

 - Rename BpfRelocationError -> EbpfRelocationError
 - Rename BpfSectionKind to EbpfSectionKind

### Commit Statistics

 - 65 commits contributed to the release.
 - 223 days passed between releases.
 - 31 commits were understood as [conventional](https://www.conventionalcommits.org).
 - 0 issues like '(#ID)' were seen in commit messages

### Commit Details

 * **Uncategorized**
    - Implement TCX (5478cac)
    - Cache `nr_cpus` in a thread_local (d05110f)
    - Clarify `Arc` usage (afd777b)
    - Replace `Arc` with `&'static` (e992c28)
    - Avoid intermediate allocations in parse_cpu_ranges (0e86757)
    - Reduce duplication in `{nr,possible}_cpus` (f3b2744)
    - Replace `lazy_static` with `std::sync::LazyLock` (2b299d4)
    - Appease clippy (0f16363)
    - Merge pull request #1023 from l2dy/fdlink/sockops (2cd3576)
    - Use FdLink in SockOps programs (c44f8b0)
    - Remove unwrap and NonZero* in info (02d1db5)
    - Merge pull request #985 from reyzell/main (40f3032)
    - Add the option to support multiple and overrideable programs per cgroup (f790685)
    - Merge pull request #1007 from tyrone-wu/aya/info-api (15eb935)
    - Revamp MapInfo be more friendly with older kernels (fbb0930)
    - Revamp ProgramInfo be more friendly with older kernels (88f5ac3)
    - Add conversion u32 to enum type for prog, link, & attach type (1634fa7)
    - Improve integration tests for info API (cb8e478)
    - Merge pull request #959 from tyrone-wu/aya/program_info_stats (ab000ad)
    - Merge pull request #974 from Billy99/billy99-arch-ppc64-s390x (ab5e688)
    - Adjust bpf programs for big endian (cd1db86)
    - Adjust test byte arrays for big endian (eef7346)
    - Simplify doctest (4362020)
    - Appease nightly clippy (bce3c4f)
    - Expose run_time_ns and run_cnt fields in ProgramInfo (a25f501)
    - Add BPF_ENABLE_STATS syscall function (fa6af6a)
    - Fix PerfEventArray resize logic (3d57d35)
    - Add comments in `*_wrong_map` tests (e575712)
    - Set PerfEventArray max_entries to nCPUs (25d986a)
    - Use MockableFd everywhere (e12fcf4)
    - Merge pull request #991 from l2dy/typo-1 (2cd9858)
    - Fix typo (f1773d5)
    - Merge pull request #983 from ajwerner/fix-variable-name (d5414bf)
    - :programs::uprobe: fix bad variable name (d413e2f)
    - Fix panic when creating map on custom ubuntu kernel (38d8e32)
    - Appease clippy (78acd74)
    - Don't deny unused_qualifications (781914f)
    - Fix rustdocs-args ordering in taplo to -D warnings (5e13283)
    - Remove deny(pointer_structural_match) (4e843a3)
    - Merge pull request #938 from swananan/enhance_urpobe_symbol_lookup (bde4b5f)
    - Fix clippy (c7898c5)
    - Adjust symbol lookup tests for object crate alignment requirements (462514e)
    - Add symbol lookup in associated debug files (e6e1bfe)
    - Merge pull request #928 from seanyoung/io-error (d0e9b95)
    - S/MiriSafeFd/MockableFd/ (a11b61e)
    - Remove miri ignores (cb6d3bd)
    - Document miri skip reasons (35962a4)
    - Avoid crashing under Miri (7a7d168)
    - Deduplicate test helpers (7e1666f)
    - Reduce duplication (58e154e)
    - Expose io_error in SyscallError (a6c45f6)
    - Appease clippy (09442c2)
    - Generate new bindings (b06ff40)
    - Appease clippy (0a32dac)
    - Merge pull request #528 from dave-tucker/rename-all-the-things (63d8d4d)
    - Include license in crate workspace (a4e68eb)
    - Use `Ebpf` instead of `Bpf` (57a69fe)
    - Provide a deprecated `BpfError` alias (110a76c)
    - Rename Bpf to Ebpf (8c79b71)
    - Rename BpfRelocationError -> EbpfRelocationError (fd48c55)
    - Rename BpfSectionKind to EbpfSectionKind (cf3e2ca)
    - Rename bpf -> ebpf (70ac91d)
    - Fix unused_qualifications lints (481b73b)
    - Add `CgroupDevice::query` (542306d)
    - Appease new nightly clippy lints (e38eac6)

aya-obj-v0.2.0

Toggle aya-obj-v0.2.0's commit message
### New Features

 - Rename Bpf to Ebpf
   And BpfLoader to EbpfLoader.
   This also adds type aliases to preserve the use of the old names, making
   updating to a new Aya release less of a burden. These aliases are marked
   as deprecated since we'll likely remove them in a later release.

### Other

 - revamp MapInfo be more friendly with older kernels
   Adds detection for whether a field is available in `MapInfo`:
   - For `map_type()`, we treturn new enum `MapType` instead of the integer
     representation.
   - For fields that can't be zero, we return `Option<NonZero*>` type.
   - For `name_as_str()`, it now uses the feature probe `bpf_name()` to
     detect if field is available.
     Although the feature probe checks for program name, it can also be
     used for map name since they were both introduced in the same commit.
 - revamp ProgramInfo be more friendly with older kernels
   Purpose of this commit is to add detections for whether a field is
   available in `ProgramInfo`.
   - For `program_type()`, we return the new enum `ProgramType` instead of
     the integer representation.
   - For fields that we know cannot be zero, we return `Option<NonZero*>`
     type.
   - For `name_as_str()`, it now also uses the feature probe `bpf_name()`
     to detect if field is available or not.
   - Two additional feature probes are added for the fields:
     - `prog_info_map_ids()` probe -> `map_ids()` field
     - `prog_info_gpl_compatible()` probe -> `gpl_compatible()` field
   
   With the `prog_info_map_ids()` probe, the previous implementation that
   I had for `bpf_prog_get_info_by_fd()` is shortened to use the probe
   instead of having to make 2 potential syscalls.
   
   The `test_loaded_at()` test is also moved into info tests since it is
   better related to the info tests.
 - add conversion u32 to enum type for prog, link, & attach type
   Add conversion from u32 to program type, link type, and attach type.
   Additionally, remove duplicate match statement for u32 conversion to
   `BPF_MAP_TYPE_BLOOM_FILTER` & `BPF_MAP_TYPE_CGRP_STORAGE`.
   
   New error `InvalidTypeBinding<T>` is created to represent when a
   parsed/received value binding to a type is invalid.
   This is used in the new conversions added here, and also replaces
   `InvalidMapTypeError` in `TryFrom` for `bpf_map_type`.
 - add archs powerpc64 and s390x to aya
   bpfman, a project using aya, has a requirement to support powerpc64 and
   s390x architectures. Adding these two architectures to aya.
 - Generate new bindings

### Test

 - adjust test to not use byte arrays
   Where possible, replace the hardcoded byte arrays in the tests with the
   structs they represent, then convert the structs to byte arrays.
 - adjust test byte arrays for big endian
   Adding support for s390x (big endian architecture) and found that some
   of the unit tests have structures and files implemented as byte arrays.
   They are all coded as little endian and need a bug endian version to
   work properly.

### New Features (BREAKING)

 - Rename BpfRelocationError -> EbpfRelocationError
 - Rename BpfSectionKind to EbpfSectionKind

### Commit Statistics

 - 19 commits contributed to the release.
 - 223 days passed between releases.
 - 10 commits were understood as [conventional](https://www.conventionalcommits.org).
 - 0 issues like '(#ID)' were seen in commit messages

### Commit Details

 * **Uncategorized**
    - Appease clippy (aa240ba)
    - Merge pull request #1007 from tyrone-wu/aya/info-api (15eb935)
    - Revamp MapInfo be more friendly with older kernels (fbb0930)
    - Revamp ProgramInfo be more friendly with older kernels (88f5ac3)
    - Add conversion u32 to enum type for prog, link, & attach type (1634fa7)
    - Merge pull request #974 from Billy99/billy99-arch-ppc64-s390x (ab5e688)
    - Adjust test to not use byte arrays (4dc4b5c)
    - Add archs powerpc64 and s390x to aya (b513af1)
    - Adjust test byte arrays for big endian (eef7346)
    - Merge pull request #989 from aya-rs/codegen (8015e10)
    - [codegen] Update libbpf to 686f600bca59e107af4040d0838ca2b02c14ff50 (8d7446e)
    - Merge pull request #978 from aya-rs/codegen (06aa5c8)
    - [codegen] Update libbpf to c1a6c770c46c6e78ad6755bf596c23a4e6f6b216 (8b50a6a)
    - Document miri skip reasons (35962a4)
    - Generate new bindings (b06ff40)
    - Merge pull request #528 from dave-tucker/rename-all-the-things (63d8d4d)
    - Rename Bpf to Ebpf (8c79b71)
    - Rename BpfRelocationError -> EbpfRelocationError (fd48c55)
    - Rename BpfSectionKind to EbpfSectionKind (cf3e2ca)

aya-log-v0.2.1

Toggle aya-log-v0.2.1's commit message
### Chore

 - Rename bpf -> ebpf

### Documentation

 - reword rustdocs a bit

### New Features

 - Rename Bpf to Ebpf
   And BpfLoader to EbpfLoader.
   This also adds type aliases to preserve the use of the old names, making
   updating to a new Aya release less of a burden. These aliases are marked
   as deprecated since we'll likely remove them in a later release.
 - Rename BpfLogger to EbpfLogger

### Bug Fixes

 - print &[u8] using full width
   Otherwise `&[1u8, 0u8]` cannot be distinguished from `&[0x10u8]` (they both become 10)

### Other

 - remove unwrap and NonZero* in info
   Addresses the feedback from #1007:
   - remove panic from `unwrap` and `expect`
   - Option<NonZero*> => Option<int> with `0` mapping to `None`
 - revamp MapInfo be more friendly with older kernels
   Adds detection for whether a field is available in `MapInfo`:
   - For `map_type()`, we treturn new enum `MapType` instead of the integer
     representation.
   - For fields that can't be zero, we return `Option<NonZero*>` type.
   - For `name_as_str()`, it now uses the feature probe `bpf_name()` to
     detect if field is available.
     Although the feature probe checks for program name, it can also be
     used for map name since they were both introduced in the same commit.
 - revamp ProgramInfo be more friendly with older kernels
   Purpose of this commit is to add detections for whether a field is
   available in `ProgramInfo`.
   - For `program_type()`, we return the new enum `ProgramType` instead of
     the integer representation.
   - For fields that we know cannot be zero, we return `Option<NonZero*>`
     type.
   - For `name_as_str()`, it now also uses the feature probe `bpf_name()`
     to detect if field is available or not.
   - Two additional feature probes are added for the fields:
     - `prog_info_map_ids()` probe -> `map_ids()` field
     - `prog_info_gpl_compatible()` probe -> `gpl_compatible()` field
   
   With the `prog_info_map_ids()` probe, the previous implementation that
   I had for `bpf_prog_get_info_by_fd()` is shortened to use the probe
   instead of having to make 2 potential syscalls.
   
   The `test_loaded_at()` test is also moved into info tests since it is
   better related to the info tests.
 - Allow logging `core::net::Ipv4Addr` and `core::net::Ipv6Addr`
   IP address types are available in `core`, so they can be used also in
   eBPF programs. This change adds support of these types in aya-log.
   
   * Add implementation of `WriteTuBuf` to these types.
   * Support these types in `Ipv4Formatter` and `Ipv6Formatter`.
   * Support them with `DisplayHint::Ip`.
   * Add support for formatting `[u8; 4]`, to be able to handle
     `Ipv4Addr::octets`.
 - allow re-attach and read previously created logs
   This feature is useful if someone wants to view the log contents
   of a program that is already running. For e.g. a pinned program
   or an XDP program attached to a net interface.

### Test

 - adjust test byte arrays for big endian
   Adding support for s390x (big endian architecture) and found that some
   of the unit tests have structures and files implemented as byte arrays.
   They are all coded as little endian and need a bug endian version to
   work properly.

### Commit Statistics

 - 20 commits contributed to the release.
 - 223 days passed between releases.
 - 11 commits were understood as [conventional](https://www.conventionalcommits.org).
 - 1 unique issue was worked on: #1008

### Commit Details

 * **#1008**
    - Print &[u8] using full width (55ed9e0)
 * **Uncategorized**
    - Release aya-log-common v0.1.15, aya-log-ebpf v0.1.1 (04bbbcc)
    - Release aya-obj v0.2.0, aya v0.13.0, safety bump aya v0.13.0 (c169b72)
    - Reduce duplication in `{nr,possible}_cpus` (f3b2744)
    - Remove unwrap and NonZero* in info (02d1db5)
    - Merge pull request #1007 from tyrone-wu/aya/info-api (15eb935)
    - Revamp MapInfo be more friendly with older kernels (fbb0930)
    - Revamp ProgramInfo be more friendly with older kernels (88f5ac3)
    - Merge pull request #974 from Billy99/billy99-arch-ppc64-s390x (ab5e688)
    - Adjust test byte arrays for big endian (eef7346)
    - Revert "Remove unused `allow(dead_code)`" (4161993)
    - Remove unused `allow(dead_code)` (5397c1c)
    - Allow logging `core::net::Ipv4Addr` and `core::net::Ipv6Addr` (a75fc2f)
    - Merge pull request #900 from catalin-h/log_init_from_program_id (e5d107d)
    - Reword rustdocs a bit (8830c0b)
    - Allow re-attach and read previously created logs (e66f954)
    - Merge pull request #528 from dave-tucker/rename-all-the-things (63d8d4d)
    - Rename Bpf to Ebpf (8c79b71)
    - Rename BpfLogger to EbpfLogger (a93e354)
    - Rename bpf -> ebpf (41c6156)

aya-log-common-v0.1.15

Toggle aya-log-common-v0.1.15's commit message
### Other

 - <csr-id-a75fc2f7691dad21822c2eff35281abd3c4b5d23/> Allow logging `core::net::Ipv4Addr` and `core::net::Ipv6Addr`
   IP address types are available in `core`, so they can be used also in
   eBPF programs. This change adds support of these types in aya-log.
   
   * Add implementation of `WriteTuBuf` to these types.
   * Support these types in `Ipv4Formatter` and `Ipv6Formatter`.
   * Support them with `DisplayHint::Ip`.
   * Add support for formatting `[u8; 4]`, to be able to handle
     `Ipv4Addr::octets`.

### Chore

 - Prepare for aya-log-ebpf release

### Commit Statistics

 - 3 commits contributed to the release.
 - 223 days passed between releases.
 - 2 commits were understood as [conventional](https://www.conventionalcommits.org).
 - 0 issues like '(#ID)' were seen in commit messages

### Commit Details

 * **Uncategorized**
    - Prepare for aya-log-ebpf release (c3f0c7d)
    - Allow logging `core::net::Ipv4Addr` and `core::net::Ipv6Addr` (a75fc2f)
    - Appease clippy (09442c2)

aya-ebpf-v0.1.1

Toggle aya-ebpf-v0.1.1's commit message
Release aya-ebpf-cty v0.2.2, aya-ebpf-bindings v0.1.1, aya-ebpf-macro…

…s v0.1.1, aya-ebpf v0.1.1

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

aya-ebpf-macros-v0.1.1

Toggle aya-ebpf-macros-v0.1.1's commit message
Release aya-ebpf-cty v0.2.2, aya-ebpf-bindings v0.1.1, aya-ebpf-macro…

…s v0.1.1, aya-ebpf v0.1.1

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

aya-ebpf-cty-v0.2.2

Toggle aya-ebpf-cty-v0.2.2's commit message
### Other

 - add archs powerpc64 and s390x to aya
   bpfman, a project using aya, has a requirement to support powerpc64 and
   s390x architectures. Adding these two architectures to aya.

### Commit Statistics

 - 3 commits contributed to the release.
 - 185 days passed between releases.
 - 1 commit was understood as [conventional](https://www.conventionalcommits.org).
 - 0 issues like '(#ID)' were seen in commit messages

### Commit Details

 * **Uncategorized**
    - Merge pull request #974 from Billy99/billy99-arch-ppc64-s390x (ab5e688)
    - Add archs powerpc64 and s390x to aya (b513af1)
    - Allowlist expected cfgs (e4f9ed8)

aya-ebpf-bindings-v0.1.1

Toggle aya-ebpf-bindings-v0.1.1's commit message
### Other

 - add archs powerpc64 and s390x to aya
   bpfman, a project using aya, has a requirement to support powerpc64 and
   s390x architectures. Adding these two architectures to aya.

### Commit Statistics

 - 8 commits contributed to the release.
 - 185 days passed between releases.
 - 1 commit was understood as [conventional](https://www.conventionalcommits.org).
 - 0 issues like '(#ID)' were seen in commit messages

### Commit Details

 * **Uncategorized**
    - Merge pull request #974 from Billy99/billy99-arch-ppc64-s390x (ab5e688)
    - Add archs powerpc64 and s390x to aya (b513af1)
    - Merge pull request #1010 from aya-rs/codegen (bdbd042)
    - [codegen] Update libbpf to b07dfe3b2a6cb0905e883510f22f9f7c0bb66d0dUpdate libbpf to b07dfe3b2a6cb0905e883510f22f9f7c0bb66d0d (e217727)
    - Merge pull request #978 from aya-rs/codegen (06aa5c8)
    - [codegen] Update libbpf to c1a6c770c46c6e78ad6755bf596c23a4e6f6b216 (8b50a6a)
    - Allowlist expected cfgs (e4f9ed8)
    - Deny warnings (b603c66)
0