vmbase: Fix undetected EH stack overflows

If pvmfw receives a payload, it maps the region potentially containing
it (from ALIGN(bin_end, 4096) to ORIGIN(image) + LENGTH(image)) with
read-write permissions, meaning that the EH stack could overflow into it
and go undetected.

Address this by reserving a page of the writable_data region as guard
page instead and move the EH stack appropriately. Alternatively, we
could have "reserved" the last page of the image but this risks causing
unexpected issues when we say that the region available to the loader is
2 MiB but then unexpectedly crop it by one page.

Similar to the .stack, give the guard page its own section for clarity.

Bug: 381440625
Test: m {pvmfw,rialto,vmbase_example_{bios,kernel}}_bin
Change-Id: I17c32d5f8b5fae4fb7af325c05de3c08047922c1
1 file changed
tree: 7d00dcd4c249cb4fe8f61d0718e61e81c0d99689
  1. android/
  2. build/
  3. docs/
  4. guest/
  5. libs/
  6. microfuchsia/
  7. tests/
  8. .clang-format
  9. .gitignore
  10. Android.bp
  11. dice_for_avf_guest.cddl
  12. OWNERS
  13. PREUPLOAD.cfg
  14. README.md
  15. rustfmt.toml
  16. TEST_MAPPING
README.md

Android Virtualization Framework (AVF)

Android Virtualization Framework (AVF) provides secure and private execution environments for executing code. AVF is ideal for security-oriented use cases that require stronger isolation assurances over those offered by Android’s app sandbox.

Visit our public doc site to learn more about what AVF is, what it is for, and how it is structured. This repository contains source code for userspace components of AVF.

If you want a quick start, see the getting started guideline and follow the steps there.

For in-depth explanations about individual topics and components, visit the following links.

AVF components:

AVF APIs:

How-Tos: