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

adding support for clang relocations #102

Closed
wants to merge 16 commits into from
Closed

Commits on Jul 13, 2022

  1. Separate out JITting from interpreting

    This patch separates out the JITter from the interpreter.  It adds a
    "null" JIT which just errors out.
    
    After this patch is applied it is possible to build on non-x86-64
    platforms and run the interpreter without worrying about the JIT.
    
    This is achieved by adding a translate function-pointer member to
    the ubpf_vm struct. ubpf_create() then sets the pointer up to the
    correct JIT.  Finally ubpf_translate() now delegates to that function
    pointer.
    
    To enable code reuse some common code from ubpf_jit_x86_64.c is moved
    into a new file ubpf_jit.c.
    
    Also what was ubpf_translate() in ubpf_jit_x86_64.c is renmaed
    ubpf_translate_x86_64.c.
    
    The build process assumes that all backends can be compiled on all
    platforms.  It then relies on the linker to not link in unused backends.
    
    The code also assumes that only the JIT backend targeting the platform
    the code is run on will is needed.
    
    Finally, the testing infrastructure is updated to support non-x86-64
    platforms.
    Matthew Gretton-Dann authored and mdr78 committed Jul 13, 2022
    Configuration menu
    Copy the full SHA
    9e263f7 View commit details
    Browse the repository at this point in the history
  2. Work around test_elf failures

    The elf tests fail on Arm but not x86-64.  This seems to be due to the
    local field of st_other not eing set on symbols.
    
    We work around this issue by setting local to 0 on all symbols.  This is
    a good catch-all value as it generally means "default".
    Matthew Gretton-Dann authored and mdr78 committed Jul 13, 2022
    Configuration menu
    Copy the full SHA
    aea2e64 View commit details
    Browse the repository at this point in the history
  3. Fix address sanitizer failures.

    Matthew Gretton-Dann authored and mdr78 committed Jul 13, 2022
    Configuration menu
    Copy the full SHA
    b6e33da View commit details
    Browse the repository at this point in the history
  4. Added memfrob impl. for musl

    jpsamaroo authored and mdr78 committed Jul 13, 2022
    Configuration menu
    Copy the full SHA
    025fcc5 View commit details
    Browse the repository at this point in the history
  5. Added endian.h header for musl

    jpsamaroo authored and mdr78 committed Jul 13, 2022
    Configuration menu
    Copy the full SHA
    3d2f44e View commit details
    Browse the repository at this point in the history
  6. Expose VM registers.

    This can be useful to:
    - Inspect registers after program execution.
    - Determine where registers should be stored.
    
    Signed-off-by: Martin Ichilevici de Oliveira <martin.i.oliveira@gmail.com>
    iomartin authored and mdr78 committed Jul 13, 2022
    Configuration menu
    Copy the full SHA
    00456ac View commit details
    Browse the repository at this point in the history
  7. Add initial Arm64 JIT implementation

    This adds initial implementation of the Arm64 JIT.
    Matthew Gretton-Dann authored and mdr78 committed Jul 13, 2022
    Configuration menu
    Copy the full SHA
    1d3a04f View commit details
    Browse the repository at this point in the history
  8. Enable Arm64 JIT testing

    Matthew Gretton-Dann authored and mdr78 committed Jul 13, 2022
    Configuration menu
    Copy the full SHA
    0729595 View commit details
    Browse the repository at this point in the history
  9. Add test for large offset loads/stores.

    Matthew Gretton-Dann authored and mdr78 committed Jul 13, 2022
    Configuration menu
    Copy the full SHA
    a34e1b5 View commit details
    Browse the repository at this point in the history
  10. Update README.md with Arm64 support.

    Matthew Gretton-Dann authored and mdr78 committed Jul 13, 2022
    Configuration menu
    Copy the full SHA
    7d6f312 View commit details
    Browse the repository at this point in the history
  11. cmake: Initial commit

    alessandrogario authored and mdr78 committed Jul 13, 2022
    Configuration menu
    Copy the full SHA
    bad0643 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    eeba4ba View commit details
    Browse the repository at this point in the history
  13. vm: include ubpf_jit.o in dynamic library

    yoursunny authored and mdr78 committed Jul 13, 2022
    Configuration menu
    Copy the full SHA
    167bcfc View commit details
    Browse the repository at this point in the history
  14. cmake: Initial commit

    alessandrogario authored and mdr78 committed Jul 13, 2022
    Configuration menu
    Copy the full SHA
    e215432 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    5c11221 View commit details
    Browse the repository at this point in the history
  16. adding support for clang relocations

    Added support for clang function and string relocations, these show as up as
    R_BPF_64_64 and R_BPF_64_32 in *-readelf relocations. Support for nosetests elf
    tests is still TBD.
    
    Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
    mdr78 committed Jul 13, 2022
    Configuration menu
    Copy the full SHA
    3f28fd2 View commit details
    Browse the repository at this point in the history