Snap for 15063687 from e2c920e659cae5baade4b9b8d549211e7e7fcf14 to 26Q2-release

Change-Id: Id67d40c8d2eaad6c81d3cc7248402034f4a5cf55
tree: 042b1b886e2cf8dd5c5aa54b8d0a120677d7fd36
  1. include/
  2. src/
  3. test/
  4. .clang-format
  5. .clang-tidy
  6. .gitignore
  7. Android.bp
  8. CMakeLists.txt
  9. LICENSE
  10. meson-aarch64.txt
  11. METADATA
  12. MODULE_LICENSE_MIT
  13. OWNERS
  14. README.md
  15. TC-aarch64.cmake
  16. TEST_MAPPING
README.md

RLBox LFI Sandbox Integration

Integration with RLBox sandboxing API to leverage the sandboxing from the LFI compiler described in Lightweight Fault Isolation: Practical, Efficient, and Secure Software Sandboxing

For details about the RLBox sandboxing APIs, see here.

Building/Running the tests

This integration currently only supports Linux on x86-64 and aarch64 targets.

You can build and run the tests using cmake with the following commands.

cmake -S . -B ./build
cmake --build ./build --parallel
cmake --build ./build --target test

If you want to cross-compile aarch64 binaries on an x86-64 host, you can do this through

cmake -S . -B ./build --parallel -DCMAKE_TOOLCHAIN_FILE=TC-aarch64.cmake

The test binaries can run through qemu with the command

qemu-aarch64 -L /usr/aarch64-linux-gnu/ ./build/test_rlbox_glue

Contributing Code

  1. To contribute code, it is recommended you install clang-tidy which the build uses if available. Install using:

    On Ubuntu:

    sudo apt install clang-tidy
    

    On Arch Linux:

    sudo pacman -S clang-tidy
    
  2. It is recommended you use the dev mode for building during development. This treat warnings as errors, enables clang-tidy checks, runs address sanitizer etc. Also, you probably want to use the debug build. To do this, adjust your build settings as shown below

    cmake -DCMAKE_BUILD_TYPE=Debug -DDEV=ON -S . -B ./build
    
  3. After making changes to the source, add any new required tests and run all tests as described earlier.

  4. To make sure all code/docs are formatted with, we use clang-format. Install using:

    On Ubuntu:

    sudo apt install clang-format
    

    On Arch Linux:

    sudo pacman -S clang-format
    
  5. Format code with the format-source target:

    cmake --build ./build --target format-source
    
  6. Submit the pull request.