commit | df3037fc6be0ae065b86581029fc0b56e605d2be | [log] [tgz] |
---|---|---|
author | Pierre-Clément Tosi <ptosi@google.com> | Mon Jan 22 15:41:43 2024 +0000 |
committer | Pierre-Clément Tosi <ptosi@google.com> | Tue Feb 06 10:25:40 2024 +0000 |
tree | ce4dfba60cf8ae6451399916c4a2a8623fa4de12 | |
parent | 42613e600e6074d5a4eee17fbeed35670967c10f [diff] |
libfdt: Make ref casts & transmutes less unsafe Use (safe) zerocopy::transmute! to transmute [u32; _] into [u8; _]. Implement FdtNodeMut::parent() with FdtNode::parent(), removing an unsafe call to the C FFI fdt_parent_offset(). Give the compiler more information about Fdt::unchecked_from*_slice() by casting the reference, instead of transmuting its bytes (which are not the bytes of the type referred to!). The code remains unsafe (because we're dereferencing a raw pointer) but is already more robust. Rework the safety comments accordingly. Clearly distinguish the fdt_property-to-FdtPropertyStruct ref cast from the (*const)->& cast where the former is safe (thanks to 'transparent') while the latter is only safe if we blindly trust C (this assumption will be removed by a future patch). Test: m pvmfw Test: atest liblibfdt.integration_test Change-Id: I42785d2f5ae2dde2163d571869b36a480406cdd9
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: