Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aya: add feature probing for program and map type #1063

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Commits on Oct 24, 2024

  1. chore: remove aya_obj -> obj alias

    When `aya::obj` was migrated to be its own crate `aya-obj`, the `obj`
    alias was created to preserve existing imports that relied on
    `crate::obj`.
    
    This resulted in 3 ways to import `aya-obj` objects:
    - `use aya_obj::*`
    - `use obj::*`
    - `use crate::obj::*`
    
    The `obj` alias is now removed to avoid confusion, and all `obj` imports
    should now refer to `aya_obj`.
    tyrone-wu committed Oct 24, 2024
    Configuration menu
    Copy the full SHA
    6c3b2a6 View commit details
    Browse the repository at this point in the history
  2. aya,aya-obj: add feature probing program type

    Adds API that probes whether kernel supports a program type.
    
    Additionally add `const fn bpf_insn::new()` so that common instructions
    are not re-computed from `copy_instructions()`.
    
    Assertions for `LircMode2` and `Lsm` are disabled because they require
    certain kernel configs to be enabled, which are not by default in VM
    tests.
    tyrone-wu committed Oct 24, 2024
    Configuration menu
    Copy the full SHA
    359b3ea View commit details
    Browse the repository at this point in the history
  3. aya: add feature probing for map type

    Add API that probes whether kernel supports a map type.
    
    Assertion for `InodeStorage` are disabled because they require
    CONFIG_BPF_LSM to be enabled, which is not be default in VM tests.
    tyrone-wu committed Oct 24, 2024
    Configuration menu
    Copy the full SHA
    27c28a6 View commit details
    Browse the repository at this point in the history
  4. aya,aya-obj: cache feat probed info fields

    Cached probed for ProgramInfo fields instead of exposing it through
    global FEATURE. Probing operation happens on cache miss, which happens
    when first accessing the field, *and* if the field is 0. No need to
    probe if non-zero.
    tyrone-wu committed Oct 24, 2024
    Configuration menu
    Copy the full SHA
    6075a11 View commit details
    Browse the repository at this point in the history