Android CTS 17.0 release 1
Snap for 15063687 from 5030ec6653f3a0b0514d79c929d6d082d75050d1 to 26Q2-release

Change-Id: I8849cb48541dfa5cce5438edb38e51824773dbf8
tree: f5d8cd791fa06e6c97ad790ace06fd14972a4cd2
  1. .github/
  2. core/
  3. linux/
  4. subprojects/
  5. toolchains/
  6. tools/
  7. .clang-format
  8. .gitignore
  9. Android.bp
  10. config.h
  11. LICENSE
  12. meson.build
  13. meson_options.txt
  14. METADATA
  15. MODULE_LICENSE_MIT
  16. OWNERS
  17. README.md
  18. TEST_MAPPING
README.md

LFI Runtime

The LFI runtime is responsible for loading sandboxes and handling host calls. It is split into two sub-components:

  • core: provides functionality for reserving virtual address space, mapping sandbox memory, transferring control to/from the sandbox. It does not impose any runtime API on the sandbox beyond the minimum necessary.
  • linux: provides a Linux emulation layer on top of the core library.

Installation

meson setup build
cd build
ninja

This produces liblfi, along with the lfi-run tool that can be used to run binaries at the command-line.

See core/include/lfi_core.h and linux/include/lfi_linux.h for the API provided by liblfi.

Platform Support

The runtime currently targets Linux for Arm64 and x86-64. There is also experimental support for macOS (futexes are not yet supported), and support for RISC-V is in-progress.

Usage

Usage: lfi-run [OPTION...] INPUT...

  -h, --help                show help
  -V, --verbose             verbose output
  --perf                    enable perf support
  -v, --verify              enable verification
  -p, --sys-passthrough     pass most system calls directly to the host
  --pagesize=<int>          system page size
  --env=<var=val>           set environment variable
  --dir=<box=host>          map sandbox path to host directory
  --wd=<dir>                working directory within sandbox
  -r, --restricted          apply --dir and --wd flags (default is --dir /=/ --wd $PWD for testing)
  <input>                   input command