Snap for 15063687 from e2c920e659cae5baade4b9b8d549211e7e7fcf14 to 26Q2-release Change-Id: Id67d40c8d2eaad6c81d3cc7248402034f4a5cf55
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.
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
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
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
After making changes to the source, add any new required tests and run all tests as described earlier.
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
Format code with the format-source target:
cmake --build ./build --target format-source
Submit the pull request.