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

feat: Add an option to register allowed ranges of memory #110

Merged
merged 2 commits into from
Sep 13, 2024

Commits on Sep 13, 2024

  1. feat: Add an option to register allowed ranges of memory

    Certain kernel helpers return pointers to kernel managed memory, which
    the ebpf program is allowed to load and read.
    In order to implement stubs for these using rbpf, we need a way to mark
    these ranges of memory as safe for the check_mem function.
    
    The API specifically deals with adresses, because helpers need to be
    function types and not closures. This means the pointers to objects
    returned from them need to be static, and dealing with references to
    static objects gets clunky. So I have chosen to push the obtaining of
    the addresses into calling code.
    
    Signed-off-by: Wouter Dullaert <[email protected]>
    wdullaer committed Sep 13, 2024
    Configuration menu
    Copy the full SHA
    3634a7a View commit details
    Browse the repository at this point in the history
  2. fix(examples): Restructure allowed_memory test

    Moving the source code for the ebpf program into a subfolder will prevent
    it from accidentally being run as an example.
    We are still committing the resulting object file, to prevent creating
    a hard dependency on the aya build toolchain to run the example tests
    in this repository.
    
    Signed-off-by: Wouter Dullaert <[email protected]>
    wdullaer committed Sep 13, 2024
    Configuration menu
    Copy the full SHA
    b13ff15 View commit details
    Browse the repository at this point in the history