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

program: support tracing of kernel modules #737

Merged
merged 4 commits into from Jul 20, 2022
Merged

Commits on Jul 19, 2022

  1. Copy the full SHA
    a5b967c View commit details
    Browse the repository at this point in the history
  2. btf: make HandleIterator own the Handle

    Add HandleIterator.Handle instead of taking **Handle in Next(). This
    allows adding a Take() function which makes it clearer how ownership
    is handled in code using HandleIterator.
    lmb committed Jul 19, 2022
    Copy the full SHA
    2b8def6 View commit details
    Browse the repository at this point in the history
  3. btf: add FindHandle

    Add a helper that iterates all BTF objects in the kernel and returns
    the first one for which a user supplied callback returns true.
    lmb committed Jul 19, 2022
    Copy the full SHA
    efc4a24 View commit details
    Browse the repository at this point in the history
  4. program: support tracing of kernel modules

    Allow tracing functions in kernel modules via fentry, fexit, fmod_ret
    and tp_btf programs. The behaviour follows libbpf and is transparent
    to the user: if we can't find a target in vmlinux we attempt to find
    it in any loaded kernel module.
    
    Refactor TestProgramTypeLSM to test attaching via BTF. This removes
    LSM tests for BPF_F_SLEEPABLE, since they don't excercise library
    behaviour beyond passing ProgramSpec.Flags to the kernel.
    
    Updates cilium#705
    lmb committed Jul 19, 2022
    Copy the full SHA
    b19a393 View commit details
    Browse the repository at this point in the history