6 ms·
How does two way isolation work? How do you prevent the host kernel (which presumably has full control of the hardware?) from inspecting the guest VM?
by Shoop 3y ago
How does two way isolation work? How do you prevent the host kernel (which presumably has full control of the hardware?) from inspecting the guest VM?
- darig 3y ago[dead]
- ReactiveJelly 3y agoIt must be relying on a TPM somehow, right? That isn't possible with any normal software VM
- transpute 3y agoThis eschews hardware-based TEE (like TrustZone or TPM) in favor of hardware support for nested virtualization, plus open-source L0 hypervisor code. In the best case future, this will offer security properties based on a small OSS attack surface, rather than black box TEE firmware.
- haltist 3y agoYou can inspect their hypervisor code and verify the host kernel can not access the VM after creation but if you are running as root then you can obviously inspect whatever process is under host/hypervisor control.
- jbott 3y agoIt looks like the host kernel is not in full control – there is a EL2-level hypervisor, pKVM [1] that is actually the highest-privilege domain. This is pretty similar to the Xen architecture [1] where the dom0 linux os in charge of managing the machine is running as a guest of the hypervisor. 1. https://source.android.com/docs/core/virtualization/architecture#hypervisor https://source.android.com/docs/core/virtualization/architec... 2. https://wiki.xenproject.org/wiki/Xen_Project_Software_Overview https://wiki.xenproject.org/wiki/Xen_Project_Software_Overvi...
- pjmlp 3y agoCommonly known as type 1 hypervisor architecture, by opposition to type 2 hypervisor, which run as OS services. Ironically the revenge of microkernels, as most cloud workloads run on type 1 hypervisors.
- bonzini 3y agoNo, KVM is also a type 1 hypervisor but it doesn't attempt (with the exception of pKVM and of hardware protection features like SEV, neither of which is routinely used by cloud workloads) to protect the guest from a malicious host.
- pjmlp 3y agoWhere in my comment did I refer explicitly to KVM feature set, or that it is used by cloud vendors?
- bonzini 3y agoKVM is pretty much the only hypervisor that cloud vendors use these days. So it's true that "most cloud workloads run on type 1 hypervisors" (KVM is one) but not that most cloud vendors/workloads run on microkernel-like hypervisors, with the exception of Azure.
- transpute 3y agoThe architecture pattern is similar to Bromium/HP AX + Type 2 μXen on x86, https://www.youtube.com/watch?v=bNVe2y34dnM https://www.youtube.com/watch?v=bNVe2y34dnM (2018), which ships on HP business PCs. Bare metal runs a tiny L0 hypervisor making use of hardware support for nested virtualization. In turn, the L0 can run an L1 hypervisor, e.g. KVM or "host" OS, or minimal L1 VMs that are peers to the L1 "host"-guest of L0. Google pKVM-for-Arm tech talk (2022), hopefully x86 will follow, https://www.youtube.com/watch?v=9npebeVFbFw https://www.youtube.com/watch?v=9npebeVFbFw
- anonuser123456 3y agoYou make the various hardware modules security context aware. You then give the host a separate security context from guests. You need a trusted hypervisor to bootstrap it.
- fgoesbrrr 3y agoI don't know about Android, but AMD CPUs support encrypting regions of physical memory with different keys which are accessible only to one particular VM running, but also not accessible to the host: AMD Secure Encrypted Virtualization (SEV) https://www.amd.com/en/developer/sev.html https://www.amd.com/en/developer/sev.html
- fooker 3y agoDoes every memory read/write have to go through decryption/encryption or just the paging mechanism?
- ignoramous 3y agoProtected KVM on Arm64: A Technical Deep Dive, Quentin Perret (KVM Forum 2022), https://www.youtube.com/watch?v=9npebeVFbFw https://www.youtube.com/watch?v=9npebeVFbFw (first 5m)